Productivity Analytics: Trendline chart not loading because 'n.response' undefined
Summary
Similar to Issue #219933 (closed) - A customer has been experiencing an issue with viewing productivity analytics trendlines, only they are not getting TypeError: Cannot read property 'status' of undefined
- they are repeatedly getting:
Uncaught (in promise) TypeError: n.response is undefined
Ne https://on-premise-gitlab-host/assets/webpack/commons-pages.analytics.productivity_analytics-pages.groups.analytics.productivity_analytics.9d853785.chunk.js:1
m https://on-premise-gitlab-host/assets/webpack/main.6d2ca3af.chunk.js:133
dispatch https://on-premise-gitlab-host/assets/webpack/main.6d2ca3af.chunk.js:139
dispatch https://on-premise-gitlab-host/assets/webpack/main.6d2ca3af.chunk.js:133
dispatch https://on-premise-gitlab-host/assets/webpack/main.6d2ca3af.chunk.js:133
Ge https://on-premise-gitlab-host/assets/webpack/commons-pages.analytics.productivity_analytics-pages.groups.analytics.productivity_analytics.9d853785.chunk.js:1
promise callback*Ge https://on-premise-gitlab-host/assets/webpack/commons-pages.analytics.productivity_analytics-pages.groups.analytics.productivity_analytics.9d853785.chunk.js:1
The same manifestation - where they click back-and-forth between merged_before
(From: ) dates in the UI results in the spinning Trendline.
GitLab logs from the server, showed one single unexpected 0
return code in Rails, and a 302
in Workhorse, which looked like the group
and merged_after
/merged_before
params were not included.
However all other requests to /groups/apps/-/analytics/productivity_analytics
, even with n.Response
errors result in 200
responses back to the browser, and what looks to be appropriate JSON data.
At the time of the report, customer was on GitLab 13.10.2
Self-managed.
Steps to reproduce
I was unable to reproduce this. I could only generate status
errors.
In code investigation, I took the data the customer included in the request responses and hand parsed that with the transformScatterData
function (creating/defining supporting console functions). The data parsing and output seemed fine.
The only place I saw a response get involved is in the fetchChartData
: ( v13.10.2-ee code here ) - coming out of the call to axios.get
- but I don't see any condition from reading the axios
docs that should have resulted in the response
being undefined.
What is the current bug behavior?
Trendline doesn't display, error in Browser console.
What is the expected correct behavior?
Trendline displays, no errors.
Relevant logs and/or screenshots
Please see the referenced ticket link for an .mp4
demonstrating the error behavior.