Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Unlocking private key from JSON wallet file results in unresponsive script error #43

Open
apmilen opened this issue May 11, 2016 · 6 comments

Comments

@apmilen
Copy link

apmilen commented May 11, 2016

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?

@tayvano
Copy link
Contributor

tayvano commented May 11, 2016

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).

@apmilen
Copy link
Author

apmilen commented May 11, 2016

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.

error.txt

@apmilen apmilen closed this as completed May 11, 2016
@tayvano tayvano reopened this May 19, 2016
@tayvano
Copy link
Contributor

tayvano commented May 19, 2016

Reopening this as someone else just reported same thing. Firefox 45, Mac 10.11.

@kvhnuke is going to look into this

@tayvano
Copy link
Contributor

tayvano commented Jun 13, 2016

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. 😜

@linagee
Copy link

linagee commented Apr 8, 2017

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". 👍

(Also, assuming the delay is inside scrypt(), I'm 90% confident of this from the stacktrace.)

@rkagerer
Copy link

rkagerer commented Jan 7, 2018

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).

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

No branches or pull requests

4 participants