Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jjmaster's avatar

Inertia + VUE: Error when using router.visit | Failed to execute 'replaceState' on 'History': #<Object> could not be cloned.

Hello:

I am facing an issue I hope you could help me with. Thanks in advance.

I am using VUE, and when I execute a function after changing the value of an el-select (element-plus vue component library), and inside that function, if I try to run a router.visit, I get the following error in the console:

vendor.js?id=7ed9....91:84776 Uncaught (in promise) DOMException: Failed to execute 'replaceState' on 'History': #<Object> could not be cloned.

Even if I take the router.visit method to its smallest expression I get the error:

router.visit('/endPoint',{
      method:"get"
 }

The call to the backend (Laravel) doesn't even triggers, as I have a dd() in that specific endPoint and the message doesn't show up. No messages in the Network Tab either.

I have checked for Non-Clonable and cyclic data in window.history.state too. No non-conable nor cyclic data.

Thanks a lot for all your help.

1 like
1 reply
ThatGardnerOne's avatar

Hey @jjmaster, this usually happens when your website is being loaded over HTTPS but the Inertia requests are using HTTP. Make sure your APP_ENV is using the correct scheme in your .env file.

The reason you don't see the dump and die in Laravel is because it's being blocked on the browser level.

Please or to participate in this conversation.