Troubleshooting¶
Common issues and solutions for mkdocs-to-confluence.
Authentication Issues¶
Authentication Failed¶
Symptoms:
- 401 Unauthorized error
- Authentication failed message
Solutions:
-
Verify Credentials
-
Check Username Format
- Confluence Cloud: Use email address (e.g.,
user@example.com) -
Confluence Server: Use username (e.g.,
jsmith) -
Verify API Token
- Generate new token at https://id.atlassian.com/manage-profile/security/api-tokens
- Ensure token hasn't expired
-
Check token has correct permissions
-
Test Authentication
API Token Not Working¶
Issue: Token authentication fails
Solutions:
-
Use HTTP Basic Auth with API token:
-
Check
auth_typesetting: basic- For API tokens (default)bearer- For OAuth tokens only
Connection Issues¶
Cannot Connect to Confluence¶
Symptoms:
- DNS resolution failed
- Connection refused
- Network timeout
Solutions:
-
Verify URL Format
-
Check Network Access
-
Firewall/VPN Issues
- Check if VPN is required
- Verify firewall allows HTTPS (443)
-
Test from same network as CI/CD
-
Proxy Configuration
Space and Page Issues¶
Space Not Found¶
Symptoms:
- Space 'XXX' not found
- 404 Not Found error
Solutions:
- Verify Space Key
- Space key is case-sensitive
- Find in URL:
https://.../wiki/spaces/SPACEKEY/ -
Or in Confluence: Space Settings → Overview
-
Check Permissions
-
Verify Account Access
- Log into Confluence web UI
- Navigate to the space
- Confirm you can view/edit pages
Parent Page Not Found¶
Symptoms:
- Parent page 'Title' not found
- Pages created at wrong location
Solutions:
- Create Parent Page First
- Manually create parent page in Confluence
-
Or set
parent_page_nameto existing page -
Verify Exact Title
-
Check Page Permissions
- Ensure you can edit the parent page
-
Verify page isn't restricted
-
Use Space as Parent
Page Already Exists¶
Symptoms: - Duplicate pages created - "Page with this title already exists" error
Solutions:
- Check for Duplicates
- Search Confluence for existing page
- Delete duplicates manually
-
Ensure unique page titles
-
Review Navigation
-
Enable Debug Mode
Check logs for page ID resolution
Image and Attachment Issues¶
Images Not Uploading¶
Symptoms: - Images missing in Confluence - Broken image links
Solutions:
-
Verify Image Paths
-
Check File Exists
-
Supported Formats
- PNG, JPG, JPEG, GIF
- SVG (check Confluence version)
-
PDF (as attachments)
-
File Size Limits
- Confluence has file size limits (typically 100MB)
-
Compress large images
-
Debug Attachment Process
Look for attachment upload messages
Attachments Not Updating¶
Symptoms: - Old image versions in Confluence - Changes not reflected
Solutions:
- Check Hash Updates
- Plugin uses SHA1 hash to track changes
-
Look for log:
Attachment: file.png - *UPDATE* -
Clear Confluence Cache
- Confluence may cache images
-
Hard refresh browser (Ctrl+F5)
-
Force Re-upload
- Delete attachment in Confluence
- Rebuild documentation
Build and Sync Issues¶
Pages Not Syncing¶
Symptoms: - Build succeeds but pages missing - No changes in Confluence
Solutions:
-
Check Plugin Enabled
-
Verify Environment Variable
-
Check Dry Run Mode
-
Review Build Logs
Content Not Updating¶
Symptoms:
- Build shows *NO CHANGE*
- Content appears different
Solutions:
- Check Normalized Comparison
- Plugin normalizes content before comparison
-
Enable debug_diff mode to see content comparison:
-
Review Debug Files
-
Force Update
- Delete page in Confluence
- Rebuild documentation
Build Hangs or Times Out¶
Symptoms: - Build process hangs - Timeout errors
Solutions:
- Check Rate Limiting
- Confluence may rate-limit API calls
-
Add delays between requests
-
Reduce Page Count
- Build smaller sets of pages
-
Use conditional publishing
-
Check Network Stability
- Verify consistent connectivity
-
Test with smaller builds
-
Increase Timeout
Permission Issues¶
Permission Denied¶
Symptoms:
- 403 Forbidden error
- "You don't have permission" message
Solutions:
- Verify Space Permissions
- Log into Confluence
- Navigate to Space Settings → Permissions
-
Ensure account has "Add Pages" permission
-
Check Page Restrictions
- Parent page may have restrictions
- View page → Restrictions
-
Add your account to allowed users/groups
-
Admin Rights
- Some operations require admin rights
-
Contact Confluence administrator
-
API Token Scope
- Ensure token has write permissions
- Regenerate token with correct scopes
Debugging Strategies¶
Enable Debug Logging¶
plugins:
- mkdocs-to-confluence:
debug: true # General debug info (API calls, parent chain, etc.)
debug_diff: true # Detailed content comparison (creates temp files)
verbose: true
Output includes:
- debug: API request/response details, parent chain resolution, attachment processing
- debug_diff: Content comparison details, normalized diff files, character counts
Use Dry Run Mode¶
Benefits: - Preview converted HTML - Verify page hierarchy - Check attachment paths - Test without publishing
Check Debug Files¶
# Content comparison
ls /tmp/confluence-debug/
# View normalized content
cat /tmp/confluence-debug/Page_Title_current_normalized.html
cat /tmp/confluence-debug/Page_Title_new_normalized.html
# Compare
diff /tmp/confluence-debug/Page_Title_current_normalized.html \
/tmp/confluence-debug/Page_Title_new_normalized.html
Test API Access¶
# Test authentication
curl -u "email:token" \
https://your-domain.atlassian.net/wiki/rest/api/space
# Test space access
curl -u "email:token" \
https://your-domain.atlassian.net/wiki/rest/api/space/SPACEKEY
# Test page creation
curl -u "email:token" -X POST \
-H "Content-Type: application/json" \
-d '{"type":"page","title":"Test","space":{"key":"SPACEKEY"},"body":{"storage":{"value":"<p>Test</p>","representation":"storage"}}}' \
https://your-domain.atlassian.net/wiki/rest/api/content
Getting Help¶
If you're still stuck:
- Check Logs Carefully
- Enable debug mode
- Look for specific error messages
-
Note line numbers and context
-
Search Existing Issues
- GitHub Issues
-
Check closed issues too
-
Create Minimal Reproduction
- Simplify configuration
- Test with minimal docs
-
Isolate the problem
-
Report Issue
- Include configuration (redact credentials!)
- Include error messages
- Include debug output
- Include MkDocs/Python versions
Common Error Messages¶
"YOU HAVE EMPTY VALUES IN YOUR CONFIG"¶
Cause: Required configuration parameters missing
Solution: Verify all required fields:
host_url: <must be set>
space: <must be set>
username: <must be set or env var>
api_token: <must be set or env var>
"ROOT PARENT 'XXX' UNKNOWN. ABORTING!"¶
Cause: Parent page specified in config doesn't exist
Solution:
- Create the parent page in Confluence first
- Or remove parent_page_name to use space root
"PAGE DOES NOT EXIST YET!"¶
Cause: Trying to update non-existent page (internal error)
Solution: Should auto-create. If persistent, report bug.
"HTTP error on adding page"¶
Cause: Parent page not yet synced to Confluence
Solution: Plugin will retry automatically. If fails, check logs.
Next Steps¶
- Configuration Reference - Review all options
- Basic Usage - Understand workflow
- Contributing - Report bugs or contribute fixes