smogon / pokemon-showdown-client

The client for Pokémon Showdown
http://pokemonshowdown.com
GNU Affero General Public License v3.0
560 stars 786 forks source link

Opera crashes in teambuilder #911

Closed asgdf closed 7 years ago

asgdf commented 7 years ago

There have been multiple reports of Opera crashing when opening/using the teambuilder. I am able to reproduce this using Opera's newest version. The issue seems to be calling navigator.storage.persist() (as introduced by https://github.com/Zarel/Pokemon-Showdown-Client/commit/b3b2eea2f218745b20f56dc135b2445e0c0c9af2), which immediately crashes the browser for me (this happens regardless of how or where it's called, even in the browser console of a blank tab). I've submitted a bug report for Opera, until that gets fixed I suppose we might want to prevent Opera users from executing that part of the code? I'd do it, but I don't know the extent of the issue, maybe it's just the windows version or the 32 bit version or something.

RillingDev commented 7 years ago

I tested and reproduced this issue on Windows10/Opera 44(x64)

RillingDev commented 7 years ago

After more research I confirmed that the problem is the following code:

navigator.storage.persisted()

This crashes Opera but works in all other browsers. This seems like an issue in Opera, not this repo.

AustinXII commented 7 years ago

@FelixRilling asgdf already stated that in the issue

RillingDev commented 7 years ago

Yes, I just wanted to confirm the stated problem.

AustinXII commented 7 years ago

@FelixRilling ah makes sense although it seems kinda redundant to just reiterate what was already said.

Zarel commented 7 years ago

If someone wants to rig up an Opera detector?

asgdf commented 7 years ago

Would checking the user agent for "OPR" or "opera" be enough?

Zarel commented 7 years ago

I'd actually only detect a specific version of Opera, the version that crashes.

KamilaBorowska commented 7 years ago

zrzut ekranu z 2017-06-28 18-52-19

Seems to have been fixed in Opera 46 (tested on touch screen GNOME tablet)? I cannot get Opera to crash even when changing user agent, when I was able to do this before with changed user agent.

Zarel commented 7 years ago

@xfix feel free to update the test in #912