polis icon indicating copy to clipboard operation
polis copied to clipboard

Report page fails to load

Open Trentondmiller opened this issue 6 years ago • 10 comments

I recently created my first poll using the Polis tool. It's pretty cool and I look forward to using it, however as soon as I got to the point where I wanted to start looking at results I navigated to the "Report" tab, clicked "Generate Report", then navigated to that page.

That page however does not load. I believe it is public so you should be able to view the report here: https://pol.is/report/r36rvjyzyxaxbazyh89sm

I opened the console because it looks like a javascript issue and sure enough there is a fair about on console errors being logged:

image

I'm unfortunately not a contributor, just a user, however I thought I would raise this issue, as it seems to be pretty big. With this problem I am prevented from actually viewing the results of my poll.

Happy to answer questions if need be

Trentondmiller avatar Dec 01 '20 23:12 Trentondmiller

Thanks a ton @Trentondmiller! Honestly, bug reports are 100% appreciated, so no worries about not having spacetime for contributions 👍

I'm actually seeing the report page load fine: https://pol.is/report/r36rvjyzyxaxbazyh89sm

Perhaps it's something to do with math processing happening slowly, or perhaps a service was restarting when you were trying to access (which is non-ideal, but hey, it happens :) )

Is it working now?

@metasoarous can prob offer more insight

patcon avatar Dec 02 '20 04:12 patcon

Ah thanks for the quick response, You're right, it is loading now for me as well, my apologies for the false alarm. I expect you can close this issue as a non-problem.

Trentondmiller avatar Dec 02 '20 05:12 Trentondmiller

Hi @Trentondmiller. Thanks for the report here, and glad it's resolved itself.

@patcon is correct; This was likely the result of a piece of the system being temporarily down. But it's also possible that this could have resulted from there not being enough participants in the system for the report to be properly generated. Participants are only counted in the report after having voted on more than 7 comments, and I don't recall the details, but there may also be a limit on the number of participants before a report gets generated.

Anyway, glad that issue #666 didn't end up being a whammy <knocks-on-wood/>.

Thanks again

metasoarous avatar Dec 02 '20 06:12 metasoarous

Hey @metasoarous, this seems like it comes up quite regularly (reports not generating and it confusing people).

Would it make sense to think through the failure modes and spawn tickets to offer more helpful output? Off the top of my head:

  • math worker is down or sending back error codes.
  • math worker is sending back empty data.
  • less than 7 participants. (this particularly should be handled more gracefully, bc everyone i know tried to view report right away)
  • statements existed, but were all rejected. (i think i've come across edge-cases around this)
  • others?

does this feel like a common user pain point to you? if so, worth my ticketing it?

patcon avatar Dec 04 '20 04:12 patcon

Hey @patcon

Yeah, I think you're right; This has been coming up more frequently, and there's definitely some low hanging fruit we can tackle as far reducing this friction. It shouldn't be hard to catch these edge cases in the the client-report and display a message which helps triangulate the issue, perhaps something like:

We weren't able to load a report for this conversation. Here's a few possible reasons why:

  • fewer than N participants have cast at least 7 votes (the threshold for being included in the results)
  • fewer than N comments were moderated into the conversation
  • if you just started the conversation, and the above explanations don't fit, the math worker may be temporarily down, but should be back up and running within an hour or so

If none of these criteria match and the report still isn't loading after an hour or two, please let us know, and we'll look into it for you.

Thanks!

There's a "known unknown" bug or two on my radar in the math worker which, once resolved, should reduce the frequency of math worker related blockage. In the meantime...

Thanks again!

metasoarous avatar Dec 04 '20 07:12 metasoarous

Thanks a ton for this issue, and to @patcon for offering to create a general issue.

Report should have a graceful failure mode. Some aspects CAN render — they should say zero. Aspects of the report need to check whether they can render.

image

More broadly, report code should be integrated into admin dash, but look more public — ie., it needs a different left sidebar and top bar, and a proper footer.

colinmegill avatar Dec 04 '20 08:12 colinmegill

Yeah, that's a good idea; Should show the information it can, and display a message giving as much info as it can about why it's not showing everything.

metasoarous avatar Dec 04 '20 08:12 metasoarous

Hi everyone, I just came across the same issue. I did a trial run using pol.is with about 10 people with the idea of then using it with our whole department. When I tried to generate a report to show them what it looks like, the page just says "Loading...". I have the same errors in my console as @Trentondmiller in the first comment.

jzkelter avatar May 13 '21 18:05 jzkelter

Thanks @jzkelter! As alluded to in https://github.com/compdemocracy/polis/issues/666#issuecomment-738555023, it's likely that the "math worker" is down

This is a long-standing issue that's complex to address, as the "math worker" can go down for any number of reasons that I believe are challenging to mitigate rn.

EDIT: @metasoarous does math worker reset on any sort of regular timeline (a kinda min SLA we could assure ppl), or should people just email compdem when it happens, or something else?

~~One possible mitigation is to expose the up/down health status of math worker via API, and so a better error message can be provided when it's down like this. This issue is tracking one such proposal: https://github.com/compdemocracy/polis/issues/957~~

patcon avatar May 13 '21 22:05 patcon

@jzkelter I've started keeping an unofficial FAQ here, to make it easier to share best-practices for this common question 🙂 https://hackmd.io/@patcon/conversa-calls/https%3A%2F%2Fhackmd.io%2F%40patcon%2FB1rwrXiu_#Why-does-my-report-page-say-%E2%80%9CLoading%E2%80%A6%E2%80%9D

patcon avatar May 15 '21 04:05 patcon