# Failed to execute 'pushState' on 'History'

**URL:** <https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225>\
**Category:** Questions\
**Tags:** v3\
**Created:** [December 13, 2021, 1:04pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225 "2021-12-13T13:04:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipptrenz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/philipptrenz/32/11084_2.png) [@philipptrenz](https://forum.getkirby.com/u/philipptrenz)\
**Post date:** [December 13, 2021, 1:04pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/1 "2021-12-13T13:04:04Z")

</div>

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](https://github.com/philipptrenz/plainkit-tailwindcss)

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

```auto
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 😉

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

---

<div class="post-metadata">

**Author:** ![Mattrushka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mattrushka/32/7775_2.png) [@Mattrushka](https://forum.getkirby.com/u/Mattrushka)\
**Post date:** [December 13, 2021, 2:04pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/2 "2021-12-13T14:04:28Z")

</div>

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 ☹

Any ideas anyone?

---

<div class="post-metadata">

**Author:** ![portobien](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/portobien/32/7162_2.png) [@portobien](https://forum.getkirby.com/u/portobien)\
**Post date:** [December 22, 2021, 6:15pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/3 "2021-12-22T18:15:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 22, 2021, 6:19pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/4 "2021-12-22T18:19:13Z")

</div>

> [@portobien](#):
>
> on shared hosting my panel is a blank page.

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

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 22, 2021, 6:20pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/5 "2021-12-22T18:20:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![portobien](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/portobien/32/7162_2.png) [@portobien](https://forum.getkirby.com/u/portobien)\
**Post date:** [December 22, 2021, 8:07pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/6 "2021-12-22T20:07:44Z")

</div>

No, nothing!

---

<div class="post-metadata">

**Author:** ![Mattrushka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mattrushka/32/7775_2.png) [@Mattrushka](https://forum.getkirby.com/u/Mattrushka)\
**Post date:** [December 23, 2021, 4:16pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/7 "2021-12-23T16:16:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 23, 2021, 4:31pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/8 "2021-12-23T16:31:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mattrushka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mattrushka/32/7775_2.png) [@Mattrushka](https://forum.getkirby.com/u/Mattrushka)\
**Post date:** [December 23, 2021, 4:38pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/9 "2021-12-23T16:38:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 23, 2021, 5:27pm UTC](https://forum.getkirby.com/t/failed-to-execute-pushstate-on-history/24225/10 "2021-12-23T17:27:20Z")

</div>

> [@Mattrushka](#):
>
> What does the history state object relates to

> **[History - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/History)**
>
> The History interface allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.
