UPM fails to upgrade plugins with Unexpected token message on console
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
Sometimes UPM fails to upgrade plugins and a popup error message appears. It says it failed and to check the Confluence logs but the logs have no errors.
Environment
Confluence 7.x
Diagnosis
Open the browser’s console and try to upgrade a plugin. You will observe the following message:
1
Failed to parse response text: SyntaxError: Unexpected token U in JSON at position 0
Cause
The "Unexpected token U in JSON at position 0" is a typically Javascript error that will show up in your console log if the client has been directed to execute JSON.parse()
on a string beginning with u instead of a stringified object. "u" is typically a stringified version of the undefined primitive.
Solution
Clear the browser's cache or use the incognito mode
Try to upgrade the plugins again
Was this helpful?