question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[possible regression] window.history.replaceState fails in iframes and native webviews

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
timneutkenscommented, May 28, 2019

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

0reactions
github-actions[bot]commented, Dec 24, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found