Unable to upload attachments to confluence page
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Unable to upload attachments in Confluence
While uploading attachment we see error message "Error retrieving attachments from Confluence. The server may be unavailable."
Environment
Confluence 7 & 8
Diagnosis
Uploading an attachment throws "Error retrieving attachments from Confluence. The server may be unavailable." error
We see following error in atlassian-confluence.log
1
2
3
4
5
6
7
8
9
2024-09-05 14:45:54,656 ERROR [http-nio-8090-exec-7] [teamfiles.server.authentication.Authentication] validateToken Error validating team files jwt:
-- url: /plugins/servlet/teamfiles-local/settings | userName: xxxxx | referer: xxxxxxxx/pages/resumedraft.action?draftId=249561093&draftShareId=1a68b025-bc0f-4f3d-9c1b-da327e755ddc& | traceId: b193214625d055e2
com.auth0.jwt.exceptions.JWTDecodeException: The token was expected to have 3 parts, but got 0.
at com.auth0.jwt.TokenUtils.wrongNumberOfParts(TokenUtils.java:45)
at com.auth0.jwt.TokenUtils.splitToken(TokenUtils.java:23)
at com.auth0.jwt.JWTDecoder.<init>(JWTDecoder.java:37)
at com.auth0.jwt.JWTVerifier.verify(JWTVerifier.java:444)
at app.teamfiles.server.authentication.Authentication.validateToken(Authentication.java:69)
at app.teamfiles.server.filters.AuthorizationFilter.doFilter(AuthorizationFilter.java:81)
Cause
The issue is being caused when a third-party app is trying to authenticate with Teams or Sharepoint and results in failure. We have seen that following third-party apps could cause this issue but there could be more.
Solution
Enable safe mode (Disabling and enabling apps) and verify whether the issue has been resolved.
If issue gets resolved in safe mode,
Disable the third-party apps which is related to Teams or Sharepoint and verify if issue gets resolved.
If similar third-party apps are not visible, then disable third-party apps one by one to identify the problematic app.
Once problematic third-party app is identified, disable the same and contact corresponding third-party vendor support for further troubleshooting.
Was this helpful?