Failed to execute 'pushState' on 'History'

Hey there,

I’m using Kirby together with tailwindcss. Therefore I extended plainkit with gulp and browser-sync for automated browser refresh. It works by proxying a PHP server and adding the browser-sync javascript libraries to the frontend. You can find the template here: GitHub - philipptrenz/plainkit-tailwindcss: The most minimal setup of Kirby + tailwindcss, hot reload and some other awesome things

Unfortunately, I just upgraded to Kirby 3.6 and now with each navigation I get the following error message within the panel:

Failed to execute 'pushState' on 'History': A history state object with URL 'http://127.0.0.1:8989/panel/system' cannot be created in a document with origin 'http://localhost:3000' and URL 'http://localhost:3000/panel/system'.

The proxied PHP server runs on port 8989 and I access the page at port 3000. When accessing the panel via 8989 it works as expected. Nevertheless I’d like to understand the issue :wink:

Is it something CORS related or do I need some url rewriting within my proxy?

Same error on my local site.
My setup does not include tailwindcss, but I am using Codekit for browser refreshing and building.

The error is thrown on the panel only.
Codekit uses port 5757. When I switch to localhost:8888 the panel works as expected. But then I lose the Codekit functionalities :frowning:

Any ideas anyone?

I like to follow this. Also running into this. Locally everything works fine, on shared hosting my panel is a blank page.

Nothing in console? No errors in php error log or apache/server error log?

I think it would probably make sense to create an issue on GitHub with detailed error descriptions and steps to reproduce the issue.

1 Like

No, nothing!

I checked my console: no message either.

@texnixe I can create the issue in Github. But to be honest, I am unsure what to report. This bug seems to appear on 3 totally different setups and occassions and so far I can’t identify a common pattern you could investigate to solve the issue. Any recommendations or ideas?

Not really, there is an issue regarding replaceState on GitHub, but I have no idea if that is in any way related.

The only pattern I see is that it is somehow related to ports (and browser-syncing), although not sure if that applies to what @portobien experiences on his shared hosting setup.

What does the history state object relates to? What is its function?