Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App stopped working completely, unhandled promise rejection 'browserName' #4191

Closed
Siilwyn opened this issue Jun 5, 2017 · 14 comments
Closed

Comments

@Siilwyn
Copy link

Siilwyn commented Jun 5, 2017

Description

I've been using Riot for a long time but it suddenly stopped working. I tried clearing my browser data and opening Riot in private mode to no avail.

Steps to reproduce

  1. Open the web app
  2. Get stuck on a blank loading page

This is what's seen in the console:
screenshot from 2017-06-05 11-17-15

Version information

@Siilwyn Siilwyn changed the title App stopped working completely App stopped working completely, unhandled promise rejection 'browserName' Jun 5, 2017
@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

[sprintf] errors are related to i18n. Sounds like a broken language

@Siilwyn
Copy link
Author

Siilwyn commented Jun 5, 2017

@MTRNord can I test that theory somehow? I'm using "English (US)".

@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

@Siilwyn currently no Idea but normaly it says that a %(browserName)s is missing somewhere

@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

@Siilwyn do you have any type of AdBlocker running? On my side Firefox and Chrome are working fine.

@Siilwyn
Copy link
Author

Siilwyn commented Jun 5, 2017

Yes uBlock, just tried with all extensions disabled but that didn't work either.

@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

@Siilwyn can you take a look at your Networking Tab in the Console if it is downloading a en_EN.json ? And if possible give a pastebin with the content.

@Siilwyn
Copy link
Author

Siilwyn commented Jun 5, 2017

Yes, it's there. 200 OK.

@Siilwyn
Copy link
Author

Siilwyn commented Jun 5, 2017

Just noticed I have the same problem in Chromium... I tried stepping through with the debugger but can't pinpoint where it goes wrong. After Counterpart.prototype.translate returns entry containing "%(appName)s via %(browserName)s on %(osName)s" it jumps to the tryCatch function inside runtime.js.

@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

@Siilwyn I know where it fails but cannot reproduce it :/ I check some things to find a trace. Both Chrome and Firefox are working fine on my side

@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

It could be that https://github.com/vector-im/riot-web/blob/24a5297fc8b38dce7790f98a3b25a29372e612db/src/vector/platform/WebPlatform.js#L163 Does not return a string which could cause it to fail.

@Siilwyn
Copy link
Author

Siilwyn commented Jun 5, 2017

Yes that line returns undefined, it shouldn't throw an error right? I would assume it should fall back to an empty string or a default?

@kegsay
Copy link
Contributor

kegsay commented Jun 5, 2017

I would hope that passing an undefined value to _t wouldn't cause the entire thing to fail, given how the equivalent ES6 template strings work regardless.

> s = {}
{}
> console.log(`hello ${s.foo}`)
hello undefined

@MTRNord
Copy link
Contributor

MTRNord commented Jun 5, 2017

@kegsay I guess that is a bug that should also be addressed to counterpart or sprintf-js

kegsay added a commit that referenced this issue Jun 5, 2017
@kegsay
Copy link
Contributor

kegsay commented Jun 5, 2017

matrix-org/matrix-react-sdk#1035 will fix this in all cases, then will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants