Invalid response received from the server when uploading files via drag and drop
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Problem
You are unable to upload files in Confluence via Drag and Drop. In the UI, we see an Invalid response received from the server and the file isn't uploaded.
To verify the problem, we use the steps below:
- Go to a page
- Enter its edit mode
- Find a file that you want to upload to drag and drop in the page
- The Attach Files window shows the error Invalid response received from the server
The following appears in a .har file:
404 on POST https://confluence.com/plugins/drag-and-drop/upload.action
The following appears in the atlassian-confluence.log:
2019-06-07 03:15:39,865 ERROR [localhost-startStop-1] [confluence.plugin.descriptor.XWorkModuleDescriptor] getPackages Could not add package: {PackageConfig Name:drag-and-drop namespace:/plugins/drag-and-drop abstract:false parents:[{PackageConfig Name:default namespace: abstract:false parents:[]}]} because: com.opensymphony.xwork.config.ConfigurationException: Error building results for action upload in namespace /plugins/drag-and-drop
with nested exception
com.opensymphony.xwork.config.ConfigurationException: There is no result type defined for type 'readonly-json' mapped with name 'readonly'
com.opensymphony.xwork.config.ConfigurationException: Error building results for action upload in namespace /plugins/drag-and-drop
with nested exception
com.opensymphony.xwork.config.ConfigurationException: There is no result type defined for type 'readonly-json' mapped with name 'readonly'
Diagnosis
Confluence running with SSO and unable to upload files via drag and drop functionality. Here are some SSO examples that use this method based on our General Documentation:
- https://www.surekhatech.com/blog/cas-integration-with-confluence
- https://apereo.atlassian.net/wiki/spaces/CASC/pages/103252576/Configuring+Confluence+with+JASIG+CAS+Client+for+Java+3.1
Cause
Certain SSO integrations require a change on the xwork.xml file in Confluence (extracted from <confluence_install>/confluence/WEB-INF/lib/confluence-x.x.x.jar). This file handles certain webwork actions of Confluence, such as login. If not configured correctly, this file can cause issues. The file in question should reside in the directory: <confluence-install-folder>/confluence/WEB-INF/classes/
Workaround
Remove this file from Confluence until it's fixed or no longer used. This will break the SSO functionality applied to your instance via this file.
Resolution
We recommend reviewing this file with the person responsible from implementing this on your Confluence Server/Data Center. Atlassian won't provide help for its configuration as it's not covered under our support scope.