-
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
Error when running karma without internet connection #2050
Comments
@dignifiedquire Is there anything I need to provide to speed up the investigation? |
Any chance on this getting picked up? |
@RobertDiebels is it reproduced on latest version of karma? Thanks |
Which command do you run in terminal to start karma? |
@maksimr I've created a repo for reproduction purposes https://github.com/RobertDiebels/karma-test/tree/master . I'll update my initial description with version numbers and the like. |
@maksimr just updated the description and checked if I get the same on 1.3.0. I think it's caused by running in the browser? Shutting off the network adapter disables the websockets I think, I haven't looked at the code. Still the thing with unit tests is that they should be able to run with or without a functioning or connected network adapter. |
@RobertDiebels Thanks! I totally agree that karma should work without internet connection (offline). I have tested on MacOs all work as expected if disable network( but be carefully |
@maksimr yea the part about the adapter makes sense. I think I first encountered this when my connection dropped for an hour or two when I was working from home. So I tried reproducing by just shutting off the adapter (not the same ofc. I just didn't feel like crawling under my desk xD). I'll try to simulate by disconnecting my LAN cable or turning off my router. EDIT: EDIT2: |
@RobertDiebels thanks, very strange I will try check it on windows 10 |
@RobertDiebels how workaround you cuold set |
I have investigated the problem and the problem in nodejs iteself - nodejs/node-v0.x-archive#25489 I don't think that add workaround to runner.js is best solution because it could break ipv6. |
@maksimr thanks for the investigation. Will use the work-around. |
Consider node-offline-localhost. Add the following before the breaking code:
And it just works (hopefully), at least until RFC 3493 gets fixed. Full disclosure: I authored this package to streamline https in my dev environment when offline. |
Expected behavior
I would expect to be able to run unittests even when I do not have an internet connection available.
My internet provider decided to ditch my connection today, I was working from home and I thought well, while they fix this I'll go write some more unittests.
No go. Apparently something goes wrong when it tries to lookup address information (which is not available).
Actual behavior
I get the following error:
Enviroment Details
karma --version
): 0.13.22 (reproducible on 1.3.0)karma.config.js
file: NoneSee: https://github.com/RobertDiebels/karma-test/tree/master for further details.
Steps to reproduce the behaviour
karma start
karma run --conf karma.conf.js --file jasmine-test.spec.js
This is reproducible on Karma version: 1.3.0 just ran the steps above again.
The text was updated successfully, but these errors were encountered: