I'd like to add that, after the user closes the app or it crashes, the page will try to load on the next start. If it succeeds or is cached, then the script will run again and this will repeat until the user manages to close the page, which was not an easy task for me. I didn't catch this the first time because where I initially ran into the problem, the watchPosition call was behind a button, and I only ran the test page once.
(In reply to Brad Alfirevic from comment #0)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
Steps to reproduce:
Call navigator.geolocation.watchPosition() with an error function that alerts the user and the option to timeout after a short period of time (250ms, in my case). A minimum page to reproduce this is pasted below. I had to run a webserver to open this on my phone.
The client is flooded with alerts at a speed where clicking "Prevent this page from making additional dialogs" and the "Ok" button are not possible. This forces the user to completely exit the application or the browser will crash.
I expected one alert to appear at a time, or for Firefox to have prevented this in some way.