404 causes DOMException
See original GitHub issueI’m using the latest version of Turbo (beta 4 at the time of writing) and I’ve noticed that when you hit a 404 page it causes the following error in the console:
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "turbo-frame" has already been used with this registry
This only happens when hitting a 404 from another link… if you refresh the non existent page the error doesn’t happen.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:9
Top Results From Across the Web
Error 404: 4 Ways to Fix It - Hostinger
Error 404 is a response code, meaning the server could not locate the requested content. Check this article to learn 4 steps to...
Read more >404 error when trying to register serviceWorker - Stack Overflow
I get this error when trying to register the service worker: Failed to register a ServiceWorker: A bad HTTP response code (404) was...
Read more >DOMException - Web APIs | MDN
A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name). ReadOnlyError ......
Read more >Error 404 not found - What does it mean & how to fix it! - IONOS
The typical trigger for an error 404 message is when website content has been removed or moved to another URL. There are also...
Read more >Common Errors - PouchDB
PouchDB throws 404 (Object Not Found) for '_local' document ... javascript file to the unminified one, since code comments can also cause parse...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed this with
data-turbo-eval="false"
on the script tag with turbo bundleThis looks to be related to #104 and a similar issue from Turbolinks: https://github.com/turbolinks/turbolinks/issues/179
Essentially Turbo handles 404/500 pages differently, and ends up re-rendering the page and initializing itself twice which leads to these errors. Unfortunately, the monkey patch from the issue above doesn’t work on Turbo (or I can’t get it to work at least)