next version: 4.1.0
When we load our nextjs app in an iframe we get an error at the following line and our component doesn't respond to input.
replaceState@[native code]
changeState@http://localhost:8081/_next/1508243766275/main.js:8667:33
Router@http://localhost:8081/_next/1508243766275/main.js:8298:23
Router@[native code]
createRouter@http://localhost:8081/_next/1508243766275/main.js:1055:102
_callee$@http://localhost:8081/_next/1508243766275/main.js:18220:63
tryCatch@http://localhost:8081/_next/1508243766275/main.js:7005:44
invoke@http://localhost:8081/_next/1508243766275/main.js:7239:30
step@http://localhost:8081/_next/1508243766275/main.js:1823:30
http://localhost:8081/_next/1508243766275/main.js:1834:17
promiseReactionJob@[native code]
I鈥檓 getting a similar error in Chrome/Firefox when I run my Next.js app inside an IFrame (works great outside the IFrame):
Failed to execute 'replaceState' on 'History': A history state object with URL 'http://localhost:3000/' cannot be created in a document with origin 'http://localhost:8000' and URL 'http://localhost:8000/'.
Error: Failed to execute 'replaceState' on 'History': A history state object with URL 'http://localhost:3000/' cannot be created in a document with origin 'http://localhost:8000' and URL 'http://localhost:8000/'
From what I can tell, it鈥檚 this line that鈥檚 crashing:
https://github.com/zeit/next.js/blob/master/lib/router/router.js#L188
@philipheinser is this similar to your issue?
Any clues on how to solve?
This has been fixed in Next 5+ if i remember correctly.
I鈥檓 seeing this issue still in Next.js 7.0.2, wasn鈥檛 this patched in #3437?
@timneutkens, do you know if #3437 was patched in?
Failed to execute 'replaceState' on 'History': A history state object with URL 'https://MYSERVER1/page' cannot be created in a document with origin 'https://MYSERVER2.com' and URL 'https://MYSERVER2.com/page'.
Most helpful comment
I鈥檓 getting a similar error in Chrome/Firefox when I run my Next.js app inside an IFrame (works great outside the IFrame):
From what I can tell, it鈥檚 this line that鈥檚 crashing:
https://github.com/zeit/next.js/blob/master/lib/router/router.js#L188
@philipheinser is this similar to your issue?
Any clues on how to solve?