Why might Chrome (inside Electron) suddenly 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.
trusktr
Joe Pea trusktr.io (personal site) lume.io (open source 3D toolkit I'm working on) twitter github codepen
Updated on June 04, 2022Comments
-
trusktr almost 2 years
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
containschrome-error://chromewebdata
instead ofhttp://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
? -
Freddy Daniel over 4 yearswhat should i do, If i need to handle deep link coming from browser window?
-
snwflk over 4 yearsHow to handle dead links in Electron? I think that's a different question, warranting a new SO question.
-
Freddy Daniel over 4 yearsI found the way to handle it via registerFileProtocol. I will link an answer here later : )
-
Admin over 2 yearsAs it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.