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

Karma, PhantomJS : Disconnected during run, waiting for reconnecting. #818

Closed
calystoramesh opened this issue Nov 6, 2013 · 3 comments
Closed

Comments

@calystoramesh
Copy link

WARN [config]: urlRoot normalized to "/e2e/"
DEBUG [config]: autoWatch set to false, because of singleRun
DEBUG [plugin]: Loading plugin karma-ng-scenario.
DEBUG [plugin]: Loading plugin karma-chrome-launcher.
DEBUG [plugin]: Loading plugin karma-firefox-launcher.
DEBUG [plugin]: Loading plugin karma-phantomjs-launcher.
DEBUG [plugin]: Loading plugin karma-junit-reporter.
DEBUG [plugin]: Loading inlined plugin (defining ).
INFO [karma]: Karma v0.10.4 server started at http://localhost:9876/_e2e_/
INFO [launcher]: Starting browser PhantomJS
DEBUG [launcher]: Creating temp dir at C:\DOCUME1\sweet\LOCALS1\Temp\karma-57108655
DEBUG [launcher]: C:\Documents and Settings\sweet\Application Data\npm\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\phantomjs.exe C:\DOCUME1\sweet\LOCALS1\Temp\karma-57108655/capture.js
DEBUG [watcher]: Resolved files:
C:/Documents and Settings/sweet/Application Data/npm/node_modules/karma-ng-scenario/lib/angular-scenario.js
C:/Documents and Settings/sweet/Application Data/npm/node_modules/karma-ng-scenario/lib/adapter.js

DEBUG [PhantomJS 1.9.2 (Windows XP)]: Disconnected during run, waiting for reconnecting.
WARN [PhantomJS 1.9.2 (Windows XP)]: Disconnected
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing PhantomJS

Node: v0.10.21
Karma v0.10.4

@vojtajina
Copy link
Contributor

For some reason PhantomJS browser has disconnected (the socket.io connection).

@calystoramesh Did you try regular browser (eg. Chrome, Safari, FF) ?
If other browsers work fine, can you try debug PhantomJS to see if there is any errors ?
See https://github.com/ariya/phantomjs/wiki/Troubleshooting#remote-debugging

@calystoramesh
Copy link
Author

Hi,
yes, test script are working fine in FF and Chrome ( windows XP).
following step i was done to debug the Script :

c:\Documents and Settings\sweet\Application Data\npm\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom\

phantomjs --remote-debugger-port=9000 remotedebug.js http://localhost:8888/client/test/e2e/runner.html

remotedebug.js:
var system = require('system' ), fs = require('fs'), webpage = require('webpage');

(function(phantom){
var page=webpage.create();

function debugPage(){
    console.log("Refresh a second debugger-port page and open a second webkit inspector for the target page.");
    console.log("Letting this page continue will then trigger a break in the target page.");
    debugger; // pause here in first web browser tab for steps 5 & 6
    page.open(system.args[1]);
    page.evaluateAsync(function() {
        debugger; // step 7 will wait here in the second web browser tab
    });
}
debugPage();

}(phantom));

is it's correct ?
Please correct me if i am going to Wrong way

i tried to pass the arg in config file
"browsers = ['PhantomJS --remote-debugger-port=9000'];" not working

@vojtajina
Copy link
Contributor

Moving this discussion to karma-runner/karma-phantomjs-launcher#20

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

2 participants