Open TonyGiorgio opened 1 year ago
Here are a few workarounds:
Web Workers: If your setupMutinyWallet is doing some heavy computation and that's what's causing the script to timeout, you could consider moving that computation to a Web Worker. Web Workers run in a separate thread and don't block the main thread, so they won't cause the browser to become unresponsive and terminate your script.
Async/Await with small delays: If your setupMutinyWallet involves looping through a large array or doing some other operation many times, you can try breaking up that operation into smaller parts and using setTimeout or asynchronous functions to allow the browser to update in between each part. This can prevent the browser from thinking that your script is unresponsive and terminating it.
Progressive loading: If your setupMutinyWallet is loading a lot of data, consider loading it in smaller chunks and updating the user interface after each chunk. This can keep the browser responsive and prevent your script from being terminated.
Unfortunately, if the browser is terminating your script, there's no way to catch that event or to know when it happens from within the script itself. You would have to use one of the above workarounds to prevent the browser from terminating your script in the first place.
Just stalls out on the empty state loading screen.
Looks like it never finishes processing gossip data before it stalls out. Unfortunately an error screen does not appear after the script times out, so it will forever have an empty loading state which would be good to catch.