Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Uncaught InvalidStateError #2

Open
niniun1024 opened this issue May 12, 2016 · 8 comments
Open

Error: Uncaught InvalidStateError #2

niniun1024 opened this issue May 12, 2016 · 8 comments

Comments

@niniun1024
Copy link

使用F5自动刷新工具起本地服务,页面加载的时候就会出现下面的报错,换另外的本地服务,xhr请求的时候会报下面的错,请问是什么原因导致的?

Error: Uncaught InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable. Script: http://192.168.172.126/alloy_lever.js Line: 2950 Column: 24 StackTrace: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.

@dntzhang
Copy link
Contributor

@jyy12 你说的问题已经修复了。是AlloyLever的问题,在xhr send之前提前去读取xhr的状态会报这个错。你使用最新版的 AlloyLever 就ok了。

@niniun1024
Copy link
Author

用了最新版的,ajax请求txt或json的时候报类似下面的错误:
Error: Uncaught SyntaxError: Unexpected end of input Script: http://192.168.172.126/console.html Line: 0 Column: -1 StackTrace: SyntaxError: Unexpected end of input

Error: Uncaught SyntaxError: Unexpected token a Script: http://192.168.172.126/console.html Line: 1 Column: 0 StackTrace: SyntaxError: Unexpected token a

@dntzhang
Copy link
Contributor

@jyy12 你的json不符合格式。JSON.parse的时候出错了。我把JSON.parse try catch一下吧。

@dntzhang
Copy link
Contributor

@jyy12 最新的OK了。可以输出非json和非标准格式的json。 多谢多谢!!

@ouvens
Copy link

ouvens commented Jun 16, 2016

实现原理应该比较简单,捕获error或try-catch的msg信息和performance timing等数据插到到页面上展示,好早一些php框架debug模式也有实现,比如输出php的log信息~

@holidaying
Copy link

本地启动,报了两个错,一个是queryseletAll of null还有就是跨域问题

@dntzhang
Copy link
Contributor

@sessionStorage queryseletAll 是怎么报出来的?代码里都没有queryseletAll 啊

@holidaying
Copy link

在AlloyLever.js里面。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants