Disabling Analytics throws Configuration change could not be saved, check your connection with the server

This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Functional differences in Atlassian Cloud, the contents of this article cannot be applied to Atlassian Cloud applications.

Problem

When attempting to disable the Analytics plugin on an Atlassian product results in the following error is thrown on the UI:

Configuration change could not be saved, check your connection with the server.

 

No error raised in the application logs.

Diagnosis

Environment

  •  We were able to replicate this by installing AdBlock on a Chrome browser and configuring it by going to AdBlock options > Filter Lists > Other Filter Lists, and enabling "EasyPrivacy (privacy protection)".

Diagnostic Steps

  • When you click "Enable" and then save on the screen above, there is a request being sent to a REST endpoint (i.e. on Bitbucket Server). The analysis below can be obtained from the "Network" tab of the "developer tool" of your browser. Refer to Generate a HAR file for more details on how to get there.

  • The error displayed above is caused by a JavaScript error. That's why there is nothing in the application server logs - the request doesn't make it to the server and the page errors that out.

  • From the Developer Tools of your browser, you can see that by doing these calls manually from a client machine you should be able Enable/Disable analytics by using, for example, cURL:

    To Enable Analytics:
    curl -vvv -H "Content-Type:application/json" -H "Accept:application/json" --user admin:admin -X PUT -d '{"analyticsEnabled": "true"}' http://localhost:7990/rest/analytics/1.0/config/enable
    To Disable Analytics:
    curl -vvv -H "Content-Type:application/json" -H "Accept:application/json" --user admin:admin -X PUT -d '{"analyticsEnabled": "false"}' http://localhost:7990/rest/analytics/1.0/config/enable
  • If you were able to successfully enable/disable Analytics by using cURL, the problem is in your browser. 
  • It is likely that if you open an "Incognito Window" on your browser you won't hit the issue as this measure bypasses any browser user-installed add-on.

Cause

The error displayed above is caused by a JavaScript error. That's why there is nothing in the application server logs - the request doesn't make it to the server and the page errors that out. We were able to replicate this by installing AdBlock on a Chrome browser and configuring it by going to AdBlock options > Filter Lists > Other Filter Lists, and enabling "EasyPrivacy (privacy protection)".

Resolution

Identify and fix the root cause by following the steps above. We've identified that the "AdBlock" browser add-on may cause this issue.

 

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.