Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-73196

Jira Dashboard gadgets fail to load on Chrome 97/98/99 when caching is enabled in browser

XMLWordPrintable

    • 8.05
    • 44
    • Severity 2 - Major
    • 1,233
    • Hide
      Atlassian Update – 26 January 2022

      Hello everyone, we have released LTS versions with the fix - 8.13.17 and 8.20.5 are available for download. To make the upgrade as smooth as possible we decided to isolate the change - having that said fix for this particular issue is the only change since the previous bugfix cadence.

      At the same time, we are preparing the 8.22.0 and 8.21.1 releases which should be available soon.

      Stay tuned.

      Mateusz.

      Atlassian Update – 24 January 2022

      Hello everyone,

      I'm pleased to announce that we have a fix for this issue which we're planning to release soon - you can expect it in Jira 8.13.x, 8.20.x, and 8.22.0. To ensure the highest quality we want to run a series of tests on different instances to check whether the fix works properly on previous versions of Chrome as well as on these yet to be released. 

      In this place, I'd like to thank you for your suggestions, snippets, and very quick feedback loop which helped us prepare a fix for this issue.

      Also, please be notified that we deployed the fix to this instance (jira.atlassian.com) - you can check it out, don't forget to leave us a comment if something isn't working as expected.

      Last but not least, many of you commented that the workaround we provided comes with a few side effects - please accept my sincere apologies. Please, have a look at the newest workaround which is available in the issue description, and give it a try. Feel free to reach out to us in case you have any questions. 

      I'm going to update this ticket with more details & planned release dates once we finish testing the fix.

      Stay tuned.  

      Regards,
      Mateusz Marzęcki
      Jira Dev team

      Show
      Atlassian Update – 26 January 2022 Hello everyone, we have released LTS versions with the fix - 8.13.17 and 8.20.5 are available for download. To make the upgrade as smooth as possible we decided to isolate the change - having that said fix for this particular issue is the only change since the previous bugfix cadence. At the same time, we are preparing the 8.22.0 and 8.21.1 releases which should be available soon. Stay tuned. Mateusz. Atlassian Update – 24 January 2022 Hello everyone, I'm pleased to announce that we have a fix for this issue which we're planning to release soon - you can expect it in Jira 8.13.x, 8.20.x, and 8.22.0. To ensure the highest quality we want to run a series of tests on different instances to check whether the fix works properly on previous versions of Chrome as well as on these yet to be released.  In this place, I'd like to thank you for your suggestions, snippets, and very quick feedback loop which helped us prepare a fix for this issue. Also, please be notified that we deployed the fix to this instance (jira.atlassian.com) - you can check it out, don't forget to leave us a comment if something isn't working as expected. Last but not least, many of you commented that the workaround we provided comes with a few side effects - please accept my sincere apologies. Please, have a look at the newest workaround which is available in the issue description, and give it a try. Feel free to reach out to us in case you have any questions.  I'm going to update this ticket with more details & planned release dates once we finish testing the fix. Stay tuned.   Regards, Mateusz Marzęcki Jira Dev team

      Issue Summary

      On Chrome 97 (reproduced with Version 97.0.4692.71), Jira dashboard gadgets will fail to load (sometimes intermittently).  Often this only occurs if cache is disabled in the browser console but this can also occur under different circumstances depending on latency and browser configuration.  

      Problem is caused by a race condition caused by the assumption about the timing of attaching the event listener and triggering the event. A recent change in Chrome broke that assumption.

      Steps to Reproduce

      1. Open Chrome 97.0.4692.71 (released on Jan 4th 2022, Chrome blog post)
      2. Disable cache, you can do this by opening the Chrome console, click the network tab and check disable cache.
      3. Open any Jira dashboard with gadgets. You may need to refresh. Note gadgets fail to load.

      Expected Results

      Dashboard gadgets load correctly. Caching settings should not impact Jira's ability to load gadgets. 

      Actual Results

      Dashboard gadgets fail to load. HAR capture doesn't show any errors either but notably requests to /plugins/servlet/gadgets/makeRequest are not seen in the HAR capture.

      Screenshot 1, cache disabled gadgets don't load

      When cache is enabled, page loads as expected. This is not always the case, as there are other variables including internet speed that seems to impact whether or not the gadgets load. 

      Workaround

      Do not use this workaround on the 8.21.1 or later, otherwise gadgets may be shown duplicated on dashboards!

      There is a way to fix race condition, you can do it by manually adding the snippet below (credit to 5bb89677a8a8) to Jira Announcement banner or other UserScript plugins.

      Step for Jira:

      1. Click on the Cog icon on the upper right corner in Jira, select System, Click on Go Announcement Banner on the left side, Enter Edit Announcement Banner page.
      2. Paste the following script into the announcement banner page:
        <script>
        // Workaround for JRASERVER-73196
        jQuery(function() {
          setTimeout(function() {
            const dashboardEl = document.getElementsByTagName('dashboard')[0];
            if (dashboardEl && document.getElementById('dashboard').classList.contains('initializing')) {
              AG.DashboardManager.setup({
                layouts: JSON.parse(dashboardEl.getAttribute('layouts')).layouts,
                params: JSON.parse(dashboardEl.getAttribute('params'))
              });
              console.log("Workaround for JRASERVER-73196 in announcement banner is done");
            }
          }, 100);
        });
        </script> 

      Or you can also switch to a different browser

              mmarzecki Mateusz Marzęcki
              7f0ad53b5538 Jackson
              Votes:
              85 Vote for this issue
              Watchers:
              139 Start watching this issue

                Created:
                Updated:
                Resolved: