lbryio / lbry-desktop

A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.
https://lbry.tech
MIT License
3.56k stars 413 forks source link

RangeError: Unsupported time zone specified undefined #2498

Closed tzarebczan closed 3 years ago

tzarebczan commented 5 years ago

The Issue

This pops up once in a while - not sure which timezone or bug is causing it.

 RangeError: Unsupported time zone specified undefined
   at new DateTimeFormat (native)
   at Date.toLocaleDateString (native)
   at p.render (file:///opt/LBRY/resources/app.asar/ui.js:12:100049)
   at Po (file:///opt/LBRY/resources/app.asar/ui.js:269:63001)
   at To (file:///opt/LBRY/resources/app.asar/ui.js:269:62796)
   at Io (file:///opt/LBRY/resources/app.asar/ui.js:269:66630)
   at qi (file:///opt/LBRY/resources/app.asar/ui.js:269:90674)
   at $i (file:///opt/LBRY/resources/app.asar/ui.js:269:91058)
   at Pl (file:///opt/LBRY/resources/app.asar/ui.js:269:97945)
   at Sl (file:///opt/LBRY/resources/app.asar/ui.js:269:97325)

Tell us your suggested solutions if you have any.

System Configuration

Anything Else

Screenshots

tzarebczan commented 5 years ago

Think this is related to the local in https://github.com/lbryio/lbry-desktop/blob/be89a119046c31d238056a935848adfc7c440398/src/ui/index.jsx#L195

A user in South Africa ran into this and it was fixed by changing their locale. Maybe try/catch and then default to US if it fails?

tzarebczan commented 5 years ago

Here's a recent similar one: User(xxxxx) Desktop Error: Uncaught error app version: 0.35.3 sdk version: 0.40.0 page: #/@MaxWrist:0/maxwrist-hits-one-million:5 RangeError: Invalid language tag: de_DE at new DateTimeFormat (native) at Date.toLocaleDateString (native) at p.render (file:///opt/LBRY/resources/app.asar/ui.js:22:15089) at Oa (file:///opt/LBRY/resources/app.asar/ui.js:240:63001) at ja (file:///opt/LBRY/resources/app.asar/ui.js:240:62796) at La (file:///opt/LBRY/resources/app.asar/ui.js:240:66630) at Yo (file:///opt/LBRY/resources/app.asar/ui.js:240:90674) at $o (file:///opt/LBRY/resources/app.asar/ui.js:240:91058) at As (file:///opt/LBRY/resources/app.asar/ui.js:240:97945) at js (file:///opt/LBRY/resources/app.asar/ui.js:240:97325)

AdityaSrivast commented 5 years ago

@tzarebczan I would like to work on this issue. Can you guide me on what's to be done, please?

neb-b commented 5 years ago

Sorry @AdityaSrivast

I'm pretty sure this has been fixed. The issue was just never closed.

tzarebczan commented 5 years ago

This is still an issue in some cases. Reaching out to the user to see what localization settings they are using:

app version: 0.36.1
sdk version: 0.42.1
page: #/@TheLinuxGamer:f/i-got-my-hands-on-the-librem5-phone:2
RangeError: Unsupported time zone specified undefined
   at new DateTimeFormat (native)
   at Date.toLocaleDateString (native)
   at d.render (file:///app/lbry-app/resources/app.asar/ui.js:22:14876)
   at Oi (file:///app/lbry-app/resources/app.asar/ui.js:226:63001)
   at ji (file:///app/lbry-app/resources/app.asar/ui.js:226:62796)
   at Ni (file:///app/lbry-app/resources/app.asar/ui.js:226:66630)
   at qo (file:///app/lbry-app/resources/app.asar/ui.js:226:90674)
   at $o (file:///app/lbry-app/resources/app.asar/ui.js:226:91058)
   at As (file:///app/lbry-app/resources/app.asar/ui.js:226:97945)
   at js (file:///app/lbry-app/resources/app.asar/ui.js:226:97325)
neb-b commented 4 years ago

Will be included in the next app release

tzarebczan commented 4 years ago

Still happens on the wallet page:


User(2205995) Desktop Error: Uncaught error
app version: 0.38.2
sdk version: 0.50.1
page: #/$/wallet
RangeError: Unsupported time zone specified undefined```
tzarebczan commented 4 years ago

Also on settings page:

User(2590497) Desktop Error: Uncaught error
app version: 0.39.1
sdk version: 0.54.1
page: #/$/settings
RangeError: Unsupported time zone specified undefined
   at new DateTimeFormat (native)
   at Date.toLocaleTimeString (native)
   at n.r.to12Hour (file:///app/lbry-app/resources/app.asar/ui.js:211:60724)
   at file:///app/lbry-app/resources/app.asar/ui.js:211:67365
   at Array.map (<anonymous>)
   at n.r.render (file:///app/lbry-app/resources/app.asar/ui.js:211:67299)
   at ja (file:///app/lbry-app/resources/app.asar/ui.js:286:63002)
   at Oa (file:///app/lbry-app/resources/app.asar/ui.js:286:62797)
   at Ia (file:///app/lbry-app/resources/app.asar/ui.js:286:66631)
   at qo (file:///app/lbry-app/resources/app.asar/ui.js:286:90675)
   at Yo (file:///app/lbry-app/resources/app.asar/ui.js:286:91059)
   at As (file:///app/lbry-app/resources/app.asar/ui.js:286:97946)
   at Os (file:///app/lbry-app/resources/app.asar/ui.js:286:97326)
   at Le (file:///app/lbry-app/resources/app.asar/ui.js:286:103717)
   at Ne (file:///app/lbry-app/resources/app.asar/ui.js:286:10304)
   at On (file:///app/lbry-app/resources/app.asar/ui.js:286:30826)
harshkhandeparkar commented 4 years ago

Hi! Is this open for grabs? I am new here and I want to contribute. I may need some guidance initially as I am not familiar with the codebase.

tzarebczan commented 4 years ago

@HarshKhandeparkar thanks for taking a shot. This one may be tougher to reproduce since we aren't sure of the exact scenario yet, but it was fixed previously in other components.

Welcome to LBRY and check out lbry.tech/contribute to get an overview

harshkhandeparkar commented 4 years ago

I looked through the good first issues but couldn't find one that is not taken up or already fixed. Can you suggest something for me to do? Like search a specific keyword or label?

On Sun, 19 Apr, 2020, 12:06 AM Thomas Zarebczan, notifications@github.com wrote:

@HarshKhandeparkar https://github.com/HarshKhandeparkar thanks for taking a shot. This one may be tougher to reproduce since we aren't sure of the exact scenario yet, but it was fixed previously in other components.

Welcome to LBRY and check out lbry.tech/contribute to get an overview

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lbryio/lbry-desktop/issues/2498#issuecomment-615922985, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJI5H6N757OQAXTRWGHKJTRNHXLHANCNFSM4HODQ7CQ .

harshkhandeparkar commented 4 years ago

I want to try something super simple or even stupid like a typo fix just get used to the codebase and the development. After that, I can contribute to other issues.

On Sun, 19 Apr, 2020, 12:08 AM M K, mjkgoa@gmail.com wrote:

I looked through the good first issues but couldn't find one that is not taken up or already fixed. Can you suggest something for me to do? Like search a specific keyword or label?

On Sun, 19 Apr, 2020, 12:06 AM Thomas Zarebczan, notifications@github.com wrote:

@HarshKhandeparkar https://github.com/HarshKhandeparkar thanks for taking a shot. This one may be tougher to reproduce since we aren't sure of the exact scenario yet, but it was fixed previously in other components.

Welcome to LBRY and check out lbry.tech/contribute to get an overview

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lbryio/lbry-desktop/issues/2498#issuecomment-615922985, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJI5H6N757OQAXTRWGHKJTRNHXLHANCNFSM4HODQ7CQ .

tzarebczan commented 4 years ago

I've tagged a few more issues as help wanted and good first issue, check some of those out. Or maybe find something else you come across while familiarizing yourself with the app.

harshkhandeparkar commented 4 years ago

Oh thank you! I'll have a look tomorrow.

On Sun, 19 Apr, 2020, 12:54 AM Thomas Zarebczan, notifications@github.com wrote:

I've tagged a few more issues as help wanted and good first issue, check some of those out. Or maybe find something else you come across while familiarizing yourself with the app.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lbryio/lbry-desktop/issues/2498#issuecomment-615931479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJI5H62P2ABXZBW5TD445TRNH45ZANCNFSM4HODQ7CQ .

tzarebczan commented 3 years ago

Have not seen this happen.