etherwallet
etherwallet copied to clipboard
Unlocking private key from JSON wallet file results in unresponsive script error
Hello,
I'm trying to generate a signed transaction on my offline computer using your nice webapp, however the page freezes with an unresponsive script error whenever I click "Unlock Wallet", and won't complete if I dismiss the warning by clicking continue. I'm using Firefox 45 on Ubuntu 16.04
Any suggestions?
Any chance you have Chrome? I can definitely run some tests in the AM and see if I can determine what is happening and push a hotfix. I'm guessing it's just a random issue with FIrefox on Ubuntu - we've had a couple slightly similar ones
Can you do the same but have your console open and let me know if you can see any errors in there?
You can access your browser console from the menu: select "Browser Console" from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on OS X) or from the keyboard: press Ctrl+Shift+J (or Cmd+Shift+J on a Mac).
Chrome worked like a charm! Thanks for the tip 😄 I've attached the stacktrace that was logged when I killed the unresponsive script in FF.
Reopening this as someone else just reported same thing. Firefox 45, Mac 10.11.
@kvhnuke is going to look into this
Issue is: Firefox has a shorter timeout period than Chrome. Mist hashes the keystore files something like 30k times and javascript isn't the most ideal way to handle decrypting it. Chrome seems to just take longer. Firefox gives you an unresponsive script error.
Temporary solution:
- Add loading icons to buttons when you click them so at least you know it's doing something
- Add warning for Firefox (and others?) that Mist keystore files may take a bit longer than expected to decrypt and to say "Wait" on the unresponsive script issue on firefox and eventually it will unlock.
Real solution:
- See if we can change or implement a better way to handle decrypting that will avoid unresponsive script issue on those affected browsers. 😜
I think the easiest and most straightforward way to solve this is likely to switch from https://github.com/cryptocoinjs/scryptsy to https://github.com/dchest/scrypt-async-js
I don't know how difficult it would be, but this seems like a solved problem luckily, myetherwallet just has to implement/test/etc the different library.
https://github.com/kvhnuke/etherwallet/blob/d8fb316162b3fecce29bfd3be545e1921e76e72f/app/scripts/main.js#L19
It's probably not easy, but at least one step easier than trying to modify scryptsy to use setTImeouts, scrypt-async-js seems to do that already.
On some sort of callback, it would be nice to have a progress bar. (I've experienced the same strange "things just lock up for a few seconds" in Chrome.)
Sorry if this is a gross oversimplification. It's kind of like saying "you just have to replace your car engine with a new hopefully compatible car engine, instead of redesigning a car engine from scratch". :+1:
(Also, assuming the delay is inside scrypt(), I'm 90% confident of this from the stacktrace.)
I had the same problem, using a more recent offline MEW (etherwallet-3.11.1.7) under Firefox. I followed these instructions to increase the script timeout to 100 (lower than that didn't finish - it's pretty old hardware).