New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[possible regression] window.history.replaceState fails in iframes and native webviews #7426
Comments
By the way, I only have this issue on exported html that i render on a iframe like this: <iframe srcDoc={data.htmlReturned} /> data.htmlReturned is the html exported by the method app.renderToHtml() that comes from nextjs server side rendering. Also it has a base url that appends the url of the micro service that generates this html. |
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 |
I'm getting the same error while trying to render a Next.js app inside react-frame-component. |
I'm not getting this error inside a iframe neither native webview.I get this when my page url end with two or more slashes. Any help appreciated. |
@smddzcy could you help me to build an example where this is failing? I put an example in here but it seems to be working fine. I also tried to add the app to a regular iframe as src and it's working fine too. @omryshap is there any simple way to create a webview on a native app for a non-mobile developer like me? :) |
We are facing same issue in MS word extension which is using IE11 underneath. Works well if the iframe is opened in chrome. |
I've tried reproducing this with
We are not supporting IE: https://nextjs.org/docs/basic-features/supported-browsers-features
I wasn't able to reproduce this. I'll close this issue, but feel free to open a new one if you can reproduce this in a supported browser. |
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. |
Bug 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.
The text was updated successfully, but these errors were encountered: