[possible regression] window.history.replaceState fails in iframes and native webviews
See original GitHub issueBug report
Describe the bug
As reported here (#3118, #3437, #5523), using next inside a iframe or native webview (android for example), fails on this error Error: Failed to execute 'replaceState' on 'History': A history state object with URL.
To Reproduce
create a webview in a native app, add src to a nextjs app, console will show the above error
Expected behavior
should not throw an error
Additional context
seems like this was handled in the past but either wasn’t merged or somehow was removed from the codebase.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:8 (3 by maintainers)
Top Results From Across the Web
history.replaceState issue with iframes - Stack Overflow
I have tried history.replaceState in all possible ways I believe to no avail. I got some results with Firefox but not Chrome nor...
Read more >content/browser/navigation_browsertest.cc - chromium/src - Git at ...
Regression test for https://crbug.com/796561. // 1) Start on a document with history.length == 1. // 2) Create an iframe and call history.pushState at...
Read more >3D WebView Release Notes
3.1 October 11, 2022. Windows and macOS: Fixed a regression where ExecuteJavaScript() failed when called multiple times for a web page.
Read more >navigation_browsertest.cc - Chromium Code Search
Regression test for https://crbug.com/796561. // 1) Start on a document with history.length == 1. // 2) Create an iframe and call history.pushState at...
Read more >docs - Apple Open Source
<rdar://problem/8672000> REGRESSION (r72040): Error image with alt text can ... fast/loader/stateobjects/replacestate-base-legal.html * page/History.cpp: ...
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 Free
Top 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

Instead of posting “same issue” “ping” or similar use GitHub’s reaction system and 👍 on the issue.
https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.