-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Script error. at 0: #543
Comments
It sounds like http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox Don't think this is a Karma issue. If you think otherwise, please re-open this issue. |
How did you solve this @adamwynne ? |
I moved to PhantomJS and it worked Sent from my iPhone
|
I also moved to PhantomJS and I still get this error, has someone an idea why this happens? my problem is similiar to this one: http://stackanswers.com/questions/24787444/phantomjs-and-karma-jasmine-tests-linux-error |
@lpsBetty What version of |
|
@lpsBetty problem on CI, only? |
yes unfortunately.. |
@lpsBetty try run |
I don't know how a can connect to the remote build.. but I now have tried different browsers on my SSH connected Debug build.. and Firefox works.. I really don't know why, but I got this:
|
ok now I know what's the problem.. there was an external JS file which caused that error. I used $.getScript to get a external library ... now I can finally fix this :) do you know why it only says |
@lpsBetty awesome!)
|
Thanks I already read that ;) Strange though, that it worked with Firefox. |
@lpsBetty just wondering what you did to fix this. I have the same exact scenario and just trying to figure out a way around it. |
I just moved to PhantomJS and it went away On Wed, Mar 11, 2015 at 6:27 PM, Kyle Thornton [email protected]
|
@kylethornton if you debug your tests in the browser you can see the error in the console.. my error was caused by an external JS which was expecting a specific ID on a form element.. so I added the HTML in the test.. |
Thanks @lpsBetty. My error messages in the browser weren't as helpful, but I ended up just mocking $.getScript to give me more control of what happened with the callback. Since these are unit tests I only care about how my code is functioning anyway. |
ok, I am glad you found a solution! |
why phantomJs witrh karma throw error : ""Some of your tests did a full page reload!"" most of the time during UI Unit-Test-case . & how to fix it..? |
I've had the exact same problem with angular cli. Turns out it was a circular dependency (and I'm pretty glad that it was caught). So if you've got that error when running |
probably you need ts-helpers |
I had this problem (the "Script error" message with no helpful information), and here's how I fixed it. This might not work for you, and maybe there are more causes than what I fixed in my case, but the following might help debug. In my case I am using karma-electron, but that may not matter much, as this error appears to happen with different browsers, as mentioned here and in #1268. It appears that when there are uncaught errors, the browser propagates the error to Karma somehow, but without all the details. So what I did (and it is ugly) was I made karma wrap all my tests with This completely solved the issue for me, now any errors are logged to console. One way that you can set this up is, at the top of your
Basically that's what I did, more or less. Now when I run Karma, I see helpful error messages logged to console instead of just Note, a more robust way to do it is make new entry points in the Your mileage may vary if it isn't the same issue. |
EDIT: #1268 is still open. |
Whenever I use Karma on my CI server I get:
Chrome 26.0 (Linux) ERROR
Script error.
at :0
I've seen it before on my local dev (mac) box where it happens occasionally, but it happens every time on my CI (linux) box
Has anyone ever seen this, or does anyone have any ideas to try?
The text was updated successfully, but these errors were encountered: