HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
11.82k stars 4.05k forks source link

Gibberish code makes site unusable #13160

Closed trs4ece closed 3 years ago

trs4ece commented 3 years ago

General Info

Description

//: # See a bunch of gibberish code at the top of the screen after logging in on Chrome. In Safari, clicking on Log in with Google results in a pop up with gibberish. Clicking refresh after the pop up appears will log me in and the site looks okay on Safari.

Console Errors

//: # logging.js:6 Unhandled error JS code. window.onerror @ logging.js:6 error (async) mm @ logging.js:5 56d7 @ main.js:32 c @ bootstrap:89 0 @ app.6f005eef.js:1 c @ bootstrap:89 a @ bootstrap:45 (anonymous) @ bootstrap:267 (anonymous) @ app.6f005eef.js:1 logging.js:7 Message: Uncaught Error: No options detected. Please consult documentation. window.onerror @ logging.js:7 error (async) mm @ logging.js:5 56d7 @ main.js:32 c @ bootstrap:89 0 @ app.6f005eef.js:1 c @ bootstrap:89 a @ bootstrap:45 (anonymous) @ bootstrap:267 (anonymous) @ app.6f005eef.js:1 logging.js:8 Source: https://habitica.com/static/js/chunk-vendors.0a21de6d.js window.onerror @ logging.js:8 error (async) mm @ logging.js:5 56d7 @ main.js:32 c @ bootstrap:89 0 @ app.6f005eef.js:1 c @ bootstrap:89 a @ bootstrap:45 (anonymous) @ bootstrap:267 (anonymous) @ app.6f005eef.js:1 logging.js:9 Line: 63 Column: 6062 window.onerror @ logging.js:9 error (async) mm @ logging.js:5 56d7 @ main.js:32 c @ bootstrap:89 0 @ app.6f005eef.js:1 c @ bootstrap:89 a @ bootstrap:45 (anonymous) @ bootstrap:267 (anonymous) @ app.6f005eef.js:1 logging.js:10 Error; Error: No options detected. Please consult documentation. at t.value (smartbanner.js:317) at smartbanner.js:125 window.onerror @ logging.js:10 error (async) mm @ logging.js:5 56d7 @ main.js:32 c @ bootstrap:89 0 @ app.6f005eef.js:1 c @ bootstrap:89 a @ bootstrap:45 (anonymous) @ bootstrap:267 (anonymous) @ app.6f005eef.js:1 smartbanner.js:317 Uncaught Error: No options detected. Please consult documentation. at t.value (smartbanner.js:317) at smartbanner.js:125 value @ smartbanner.js:317 (anonymous) @ smartbanner.js:125 load (async) 3../smartbanner.js @ smartbanner.js:119 o @ smartbanner.js:5 t @ smartbanner.js:5 (anonymous) @ smartbanner.js:5 8b3d @ chunk-vendors.0a21de6d.js:63 c @ bootstrap:89 56d7 @ app.6f005eef.js:1 c @ bootstrap:89 0 @ app.6f005eef.js:1 c @ bootstrap:89 a @ bootstrap:45 (anonymous) @ bootstrap:267 (anonymous) @ app.6f005eef.js:1

trs4ece commented 3 years ago

Screen Shot 2021-04-05 at 10 56 53 AM

SabreCat commented 3 years ago

We're investigating this now, but no Habitica staff or volunteers have yet been able to reproduce it on their own browsers.

If a session is already logged in, starting from a different page than habitica.com (the login or tasks page) may help--e.g. go to https://habitica.com/shops/quests and navigate from there.

Help from the community is urgently desired on this one! A solution would earn the Critical Hammer of Bug-Crushing and our undying gratitude!

SabreCat commented 3 years ago

JS console errors from smartbanner.js are unlikely to be the culprit; the error there occurs when smartbanner is unable to read the meta tags we've supplied. If the whole HTML document is garbled, that comes as no surprise. bootstrap may be a more likely avenue of investigation.

trs4ece commented 3 years ago

Going directly to https://habitica.com/shops/quests loads fine for me. The Inventory, Shops, Party, Guilds, Group, Challenges, and Help tabs all seem to work well.

If I go to the Tasks tab, it actually loads fine.... until I refresh the page. Other tabs refresh just fine. Then the top part of the page has gibberish and then the rest of the site has everything super zoomed in. So it seems that going to the main page directly or refreshing the main page causes these issues somehow.

image

Here are some console logs from that page: habitica.com-1617656100510.log

This can be compared against the market page which displays fine despite also showing some console errors: habitica.com-1617656408893.log

I've got a couple of HAR logs that I could share, but I saw a few calls to Stripe, so I'm not sure if it'd okay to post those on a public space like this. One thing that I noticed is that the list of network requests is far fewer when going to the tab directly.

Works: image

Does not work: image

The habitica.com document is the one that has the gibberish in it.

SabreCat commented 3 years ago

@trs4ece I deployed an update to move us up to the latest version of bootstrap, which would incidentally cause us to rebuild cached frontend files and so forth--there's been one report of it getting better after that, already, can you take a look and see if it does the same for you?

trs4ece commented 3 years ago

Things seem to be working now in multiple browsers. Did someone change something? Was failing and then as soon as I posted the comment above, I tried refreshing again and it seems okay.

SabreCat commented 3 years ago

sync! 😸

trs4ece commented 3 years ago

@trs4ece I deployed an update to move us up to the latest version of bootstrap, which would incidentally cause us to rebuild cached frontend files and so forth--there's been one report of it getting better after that, already, can you take a look and see if it does the same for you?

Looks great now! Thanks for the quick fix!

Alys commented 3 years ago

We had another report of this. It's no longer happening for the person who reported it but I want to get their debugging information recorded here.

Tigran Khachaturian / @immacodder (fcee98d4-629a-4bfd-910b-064adb484755) wrote in the Report a Bug guild at 2021-05-07 18:11 UTC:

[screenshot link - see below] Here's what just happened to me. What I noticed is that if I go to this url - https://habitica.com/groups/guild/a29da26b-37de-4a71-b0c6-48e72a900dac and not habitica.com directly, everything will be just fine. I tested with Brave, Firefox and Chrome, issue is the same. I have also restarted computer, doesn't help any extensions that can affect habitica are turned off (brave's shield and adguard)

@shanaqui wrote:

Hmm. We've seen this happen a couple of times now after we deploy, so I wonder if it's that, especially since with different browsers it can't be your cache... .... use your browser's developer tools to grab the console messages ... copy/paste to paste.ee or pastebin

@immacodder wrote:

problem seems to be gone now, so I can't really provide the logs via pastebin, but I've made a screenshot with dev tools opened, in that gdrive screenshot

@citrusella wrote:

I know at least one time @SabreCat noted that what fixed it was a bootstrap update deploy (unrelated? half-related?) that would have caused cached frontend files to be rebuilt https://github.com/HabitRPG/habitica/issues/13160#issuecomment-813649253. I only remember that one set of reports, though.

image image

Inseut commented 3 years ago

It's been like this since yesterday for here and my partner, we're in Brazil. I posted about this on Twitter and another Brazilian person reported the same issue. I tried opening Habitica in Tor, where it simulated a German connection, and it worked. Maybe it's region-specific?

NameLessGO commented 3 years ago

The link https://habitica.com/groups/guild/a29da26b-37de-4a71-b0c6-48e72a900dac opened the habitica page, but as said above, the problem might be about the Brazil connection to the server

citrusella commented 3 years ago

IIRC it's not a country specific problem--I think a number of other people who have had the issue in past instances of it occurring have not been in Brazil.

They have some idea of what fixes it, too, I believe, even if they're not sure about the cause, and I'm fairly beginner but the fix (a deploy that caused cached frontend files to be rebuilt) wouldn't have been something that fixed things differently based on location, AFAIK?