You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Router - SecurityError: Failed to execute 'pushState' #5218
EXCEPTION: SecurityError: Failed to execute 'pushState' on 'History': A history state object with URL 'http://about-us/' cannot be created in a document with origin 'http://localhost:3000'.
@jvbianchi it sounds like you are missing something. The URL that is trying to create it should be relative to your path. Did you specify <base href="..." /> tag? Or at least APP_BASE_HREF? It looks like it needs it, showing us your code would be super useful :)
Uncaught SecurityError: Failed to execute 'pushState' on 'History': A history state object with URL 'file:///E:/design' cannot be created in a document with origin 'null' and URL 'file:///E:/important/html_website_gtg/html/animation.html'
I am having the same issue while trying to pack an app with Electron. It occurs both with { useHash: true } and { useHash: false }. Using an HTTP server solves the problem but I would prefer to avoid this solution as I would need to ship that too with Electron.
@zoechi do you know if there's any other solution? Any hint of what's the root cause of the problem? Is the angular router causing it? Testing Electron with other apps with no navigation gives me no problem so I was wondering why it's happening on mine.
@luongvancuong did you manage to solve it without an HTTP server?
Thanks!
edit: <base href="."> is defined
angular-automatic-lock-bot commented on Jun 2, 2021
Activity
ericmartinezr commentedon Nov 11, 2015
@jvbianchi it sounds like you are missing something. The URL that is trying to create it should be relative to your path. Did you specify
<base href="..." />tag? Or at leastAPP_BASE_HREF? It looks like it needs it, showing us your code would be super useful :)luongvancuong commentedon Oct 10, 2016
Uncaught SecurityError: Failed to execute 'pushState' on 'History': A history state object with URL 'file:///E:/design' cannot be created in a document with origin 'null' and URL 'file:///E:/important/html_website_gtg/html/animation.html'
who can help me? Please. Thanks so much.
zoechi commentedon Oct 10, 2016
@luongvancuong use an HTTP server instead of direct file access
damnko commentedon Apr 7, 2017
I am having the same issue while trying to pack an app with Electron. It occurs both with
{ useHash: true }and{ useHash: false }. Using an HTTP server solves the problem but I would prefer to avoid this solution as I would need to ship that too with Electron.@zoechi do you know if there's any other solution? Any hint of what's the root cause of the problem? Is the angular
routercausing it? Testing Electron with other apps with no navigation gives me no problem so I was wondering why it's happening on mine.@luongvancuong did you manage to solve it without an HTTP server?
Thanks!
edit:
<base href=".">is definedangular-automatic-lock-bot commentedon Jun 2, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.