Systrace错误.未捕获的SecurityError: Failed to execute 'pushSta
Systrace Error. Uncaught SecurityError: Failed to execute 'pushState' on 'History'
我正在尝试打开系统生成的HTML文件。当我点击一个块时,我过去常常获得所选择的切片信息,如"持续时间","总时间"等。但是对于最新版本的chrome来说,这是行不通的。
在最新的chrome(ver.45), chrome beta(ver.46)和chrome Dev(ver.47)版本上尝试过,我看到所有版本都有同样的问题。
我看到当我点击切片时,它不是显示细节,而是抛出错误:
Uncaught SecurityError: Failed to execute 'pushState' on 'History: A带有URL的历史状态对象'文件:///C:/用户/ssundark/桌面/vsync_off_default_sclk.html '不能
谁能告诉我解决这个问题的方法?或者,如果有某种方式,我们可以打开这个文件,以了解所选择的切片信息。
我能够按照这里的说明修复它:https://stackoverflow.com/a/13262673/1292598
长话短说:启动Chrome使用——allow-file-access-from-files标志
问题是当window.history.state
为null
或undefined
时,window.history.pushState
抛出错误。
要解决这个问题,只需执行:
if (window.history.state) {
window.history.pushState(state, title, href);
}
在构建客户端路由器时,我找到了解决方案,即确保我在html文档中有一个基本href标签,然后配置路由器,使其具有在html5历史模式下设置路由器根目录使用基本href的选项。在使用HTML 5历史API时,代码中的基本Href属性和根属性都应该匹配,否则我发现你会得到这样的错误:
此安全错误来自浏览器,您必须在web服务器上运行。我在webstorm测试运行,它的工作!
- 节点Js:How to catch a“;没有这样的文件或目录“;读取线模块出错
- jQuery AJAX write to XML
- grep in JQuery to C#
- vimeo eventlistener to execute jquery function
- JS, how to stop process execution if it's beeing execute
- Android to execute web js
- 未捕获DOMException: Failed to execute 'on 'FileReader
- 未捕获类型错误:Failed to execute 'appendChild'on 'Node&
- 未捕获的SecurityError: Failed to execute 'replaceState'&
- 尝试调用另一个peer时PeerJS错误:Failed to execute 'addStream'on
- Systrace错误.未捕获的SecurityError: Failed to execute 'pushSta
- 未捕获的SecurityError: Failed to execute 'replaceState'o
- 未捕获类型错误:Failed to execute 'appendChild'on 'Node&
- 为什么我得到错误“Uncaught SecurityError: Failed to execute 'toDa
- 未捕获的NetworkError: Failed to execute 'importScripts'&
- InvalidStateError: Failed to execute 'dispatchEvent'
- 未捕获的TypeError: Failed to execute 'insertBefore'on
- 未捕获NotFoundError: Failed to execute 'appendChild'on
- TypeError: Failed to execute 'appendChild'on 'No
- OpenLayers: 'Failed to execute 'toDataURL' on