Expanding poll responses loaded dynamically does nothing

AI-generated summary

A user reports a bug where expanding poll responses dynamically in a Discourse post results in a never-ending spinner. The issue is linked to an XHR request returning an empty JSON object, causing a JavaScript error in the browser console stacktrace. The user identifies the problematic request and notes that the issue may be related to the poll’s visibility or privacy settings. After further testing, the user is unable to reproduce the bug, suggesting it might have been resolved or is intermittent. barryvan barryvan barryvan barryvan

I just posted a poll and voted, and left the post open to watch responses come in. I noticed the number of respondents go up, and a small :arrow_down_small: button appear below the first option. Clicking this resulted in a never-ending spinner.

I’m not sure how useful the stacktrace I can see in the browser console is, but here it is:

stacktrace
e is undefined
html/s<@https://cdn.discourse.org/seqta/brotli_asset/plugin-0398114eaff68cd6047762c8c60d29920ca988026d8b9ac09cf59ec48d34a8cb.js:6:8806
html@https://cdn.discourse.org/seqta/brotli_asset/plugin-0398114eaff68cd6047762c8c60d29920ca988026d8b9ac09cf59ec48d34a8cb.js:6:8733
p@https://cdn.discourse.org/seqta/brotli_asset/application-4dcc23c78636d5801a104c6de506c156696f8f0aa43029d4ea93d706106be3b2.js:54:18398
value@https://cdn.discourse.org/seqta/brotli_asset/application-4dcc23c78636d5801a104c6de506c156696f8f0aa43029d4ea93d706106be3b2.js:54:21075
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:14898
i@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:14813
l@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18816
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17739
o@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18369
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17974
o@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18369
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17974
i@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17666
l@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18825
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17739
o@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18369
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17974
i@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17666
l@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18825
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17739
o@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18369
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17974
o@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18369
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17974
i@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17666
l@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:18825
r@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17739
i@https://cdn.discourse.org/seqta/brotli_asset/vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:7:17666
value@https://cdn.discourse.org/seqta/brotli_asset/application-4dcc23c78636d5801a104c6de506c156696f8f0aa43029d4ea93d706106be3b2.js:51:22512
invokeWithOnError@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:7:17919
flush@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:7:18364
flush@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:7:19124
end@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:7:19469
run@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:7:20538
u@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:13:1629
e/i.success@https://cdn.discourse.org/seqta/brotli_asset/application-4dcc23c78636d5801a104c6de506c156696f8f0aa43029d4ea93d706106be3b2.js:2:704
l@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:2:6359
fireWith@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:2:7127
r@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:3:9988
n/<@https://cdn.discourse.org/seqta/brotli_asset/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:3:15842
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:28913:6
u
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:28913:6
o
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:28892:6
invokeWithOnError
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:12024:6
flush
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:12080:8
flush
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:12204:8
end
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:12274:6
run
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:12388:10
u
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:33455:11
e/i.success
_application-4dcc23c78636d5801a104c6de506c156696f8f0aa43029d4ea93d706106be3b2.js:1944:8
l
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:3186:10
fireWith
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:3316:6
r
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:8758:4
n/<
_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:9124:8

Looks like this XHR is returning an empty JSON object:

https://.../polls/voters.json?post_id=3948&poll_name=poll&option_id=f15a5fb652188185434bf1f95a86d0b7&offset=1

which causes the stacktrace above.

Is this still an issue?

Not sure – I haven’t posted a poll for a while. :wink: I’ll put one in here for testing purposes so that we can check.

  • Alpha
  • Beta
0 voters

Hmm, can’t repro this any more here – it could be because the poll’s not public, though. It’s not a huge issue by any means.

2 лайка