My electron app is randomly redirecting to chrome-error://chromewebdata
, and I've no idea why. There's no errors in the console, etc.
When the Electron app first starts, the window opens, and it redirects away from my application to that URL and I see an empty blank white screen. No user interaction is necessary, it just happens when the app starts.
If I open devtools, I can see that window.location.href
contains chrome-error://chromewebdata
instead of http://localhost:9080
(the Electron app runs using a localhost URL).
I tried deleting the local Electron/Chrome data folder at ~/Library/Application Support/my-app-name
and starting over, but no luck.
What are reasons that Chrome (in Electron?) can decide to redirect to chrome-error://chromewebdata
?
For some reason, your code is trying to navigate to an invalid (non-existing) URL, which then results in window.location.href
being chrome-error://chromewebdata
.
To reiterate: there is no direct redirection to chrome-error://chromewebdata
, but instead to a URL that doesn't exist or is not reachable.
Check if your code causes this navigation (possibly a redirect). It is very useful to inspect the Network tab in DevTools, making sure that "Preserve log" is checked. This should give some indication about what exactly is happening.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With