Javascript error when adding comment to design | causes failure in QA test browser_ui/3_create/design_management/add_design_content_spec.rb
Summary
An error appears when adding a comment to a design in an issue:
Could not create new discussion. Please try again.
Steps to reproduce
- Upload a design
- Try to add a comment in a new discussion
It also seems to silently fail when adding a comment to an existing discussion.
In both cases the comment appears after refreshing the page.
Here's a design that reproduces the bug (but I suspect any will do): https://gitlab.com/gitlab-qa-sandbox-group/qa-test-2022-02-14-16-42-08-8dfcf85f5e82b6a9/project-for-issues-92b29a066d653961/-/issues/1/designs/503.png
Logs
The browser console shows the following error:
instrument.js:109 Error: Cannot read properties of null (reading 'project')
at new t (index.js:26:28)
at Object.next (QueryManager.js:110:57)
at g (Observable.js:135:18)
at O (Observable.js:179:3)
at e.value (Observable.js:235:7)
at iteration.js:4:61
at Array.forEach (<anonymous>)
at Z (iteration.js:4:25)
at Object.next (Concast.js:25:21)
at g (Observable.js:135:18)
at O (Observable.js:179:3)
at e.value (Observable.js:235:7)
at Object.next (index.js:29:34)
at g (Observable.js:135:18)
at O (Observable.js:179:3)
at e.value (Observable.js:235:7)
at Object.next (Observable.js:327:22)
at g (Observable.js:135:18)
at O (Observable.js:179:3)
at e.value (Observable.js:235:7)
at Object.next (Observable.js:327:22)
at g (Observable.js:135:18)
at O (Observable.js:179:3)
at e.value (Observable.js:235:7)
at Object.next (Observable.js:467:26)
at g (Observable.js:135:18)
at O (Observable.js:179:3)
at e.value (Observable.js:235:7)
at Observable.js:589:22
at Observable.js:73:7
(anonymous) @ instrument.js:109
zt @ vue.runtime.esm.js:1888
Ht @ vue.runtime.esm.js:1879
qt @ vue.runtime.esm.js:1839
Ut @ vue.runtime.esm.js:1862
n @ vue.runtime.esm.js:2179
Ut @ vue.runtime.esm.js:1854
t.$emit @ vue.runtime.esm.js:3888
(anonymous) @ vue-apollo.esm.js:1899
Promise.catch (async)
mutate @ vue-apollo.esm.js:1895
Ut @ vue.runtime.esm.js:1854
n @ vue.runtime.esm.js:2179
Ut @ vue.runtime.esm.js:1854
t.$emit @ vue.runtime.esm.js:3888
click @ design_reply_form.vue?b947:1
Ut @ vue.runtime.esm.js:1854
n @ vue.runtime.esm.js:2179
Ut @ vue.runtime.esm.js:1854
n @ vue.runtime.esm.js:2175
Cr.o._wrapper @ vue.runtime.esm.js:6917
r @ helpers.js:72
QA failure details
Full description
Create Design Management user adds a design and annotates it
File path
./qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb
Stack trace
Failure/Error: issue.add_annotation(annotation)
NameError:
uninitialized constant QA::Page::Component::DesignManagement::ExpectationNotMet
First happened in https://gitlab.com/gitlab-org/gitlab-qa-mirror/-/jobs/2090252835.
Edited by Mark Lapierre