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

複数製品に共通のナレッジ

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

When attempting to disable or enable 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.

診断

環境

  •  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.

原因

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)".

ソリューション

Identify and fix the root cause by following the steps above. We've identified that the "AdBlock" (or uBlock, or any Ads blocker extensions) browser add-on may cause this issue.


最終更新日: 2019 年 12 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.