Loading Chunk Failed! .push is not a function

Global variables always creates a mess and comes back and bite you, especially in shared environments like Atlassian P2 plugins. Jira itself and most add-ons still creates some global variables and sometimes they conflict with each other. Some users reported that they have upgraded add-ons in their Jira to latest versions and they have now issues with worklogs loading.

After long investigation it turned out two add-ons, “Extensions for Jira Service Desk” and “WorklogPRO-Timesheets for Jira” are conflicting with each other. Each add-on was working when the other one does not exist and for this reason we haven’t able to reproduce the problem in our development environment for a long time. Luckily our customer noticed this incompatibility and we could able to reproduce it.

We found that, both add-ons were trying to load a JavaScript using Webpack’s dynamic module loading feature but each one were using different versions of Webpack. Webpack was relying on a global variable which it adds to global scope and version 3 was expecting this variable to be a function and version 4 was expecting this variable to be an array. Fortunately solution was easy. Webpack allows you to set name of this global variable (output.webpackJsonp) to a custom value so that it will not conflict with other instances of Webpack runtime within the same environment. If you face this issue, place upgrade to 4.3.4 version of WorklogPRO. You can check related issue, WLP-907, in our issue tracker.