phantomjs://platform/console++.js:263 in error when

Created on 5 May 2016  路  36Comments  路  Source: ariya/phantomjs

  1. Which version of PhantomJS are you using? Tip: run phantomjs --version.
    2.1.1
  2. What steps will reproduce the problem?
    This only happens when running as a suite from terminal when I run individually from intellij I have no problem. Also, these tests run fine as a suite and without error with the chromedriver. As soon as I installed and ran with phantom I got the following error, adjusting waittime does not resolve the issue, phantom just never finds the element, it seems:

What is happening at this point is is one test has finished and logged out and now I am attempting to start a new test and login, the login elements are never found:

[INFO] Waiting for element By.cssSelector: input[name=username]
[ERROR - 2016-05-04T22:12:50.831Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1462399970815
phantomjs://platform/console++.js:263 in error
[ERROR - 2016-05-04T22:12:56.609Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1462399976572
phantomjs://platform/console++.js:263 in error
[ERROR - 2016-05-04T22:13:02.307Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1462399982302

  1. Which operating system are you using?
    mac osx 10.10.5
  2. Did you use binary PhantomJS or did you compile it from source?
    binary
  3. Please provide any additional information below.
stale

Most helpful comment

Same here

All 36 comments

error phantomjs://platform/console++.js:263 for unknown reason on Ubuntu 14.04 LTS with latest PhantomJS binary

This same exception occurs when attempting to register with a hub

  • Version: 2.1.1
  • Binary or Source: Binary phantomjs
  • Platform: Windows 2012
phantomjs.exe --webdriver=5555 --webdriver-selenium-grid-hub=http://localhost:4444
[INFO  - 2016-05-18T21:00:00.569Z] GhostDriver - Main - running on port 5555
[INFO  - 2016-05-18T21:00:00.581Z] GhostDriver - Main - registering to Selenium
HUB 'http://localhost:4444' version:  using '127.0.0.1:5555' with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy.
[ERROR - 2016-05-18T21:00:00.622Z] GhostDriver - main.fail - {"line":97,"sourceU
RL":"phantomjs://platform/hub_register.js","stack":"register@phantomjs://platform/hub_register.js:97:79\nglobal code@phantomjs://code/main.js:78:37"}

  phantomjs://platform/console++.js:263 in error
  • Version: 2.1.1
  • Binary or Source: Source
  • Platform: OSX 10.11.5
phantomjs --webdriver=5555
[ERROR - 2016-05-18T20:57:35.133Z] GhostDriver - main.fail - {"line":85,"sourceURL":"phantomjs://code/main.js","stack":"global code@phantomjs://code/main.js:85:56"}

  phantomjs://platform/console++.js:263 in error

Same problem when i ran in in Java programming language,using Eclipse
Language:java
jar file version of PhatomJS:1.2.1
exe version of phatom js:2.1.1

Jun 02, 2016 3:27:11 PM org.openqa.selenium.phantomjs.PhantomJSDriverService
INFO: executable: C:\Program Files\phantomjs-2.1.1-windows\bin\phantomjs.exe
Jun 02, 2016 3:27:11 PM org.openqa.selenium.phantomjs.PhantomJSDriverService
INFO: port: 14890
Jun 02, 2016 3:27:11 PM org.openqa.selenium.phantomjs.PhantomJSDriverService
INFO: arguments: [--webdriver=14890, --webdriver-logfile=D:\Auto\seven\phantomjsdriver.log]
Jun 02, 2016 3:27:11 PM org.openqa.selenium.phantomjs.PhantomJSDriverService
INFO: environment: {}
[INFO - 2016-06-02T09:57:13.828Z] GhostDriver - Main - running on port 14890
[INFO - 2016-06-02T09:57:14.371Z] Session [61e8ead0-28a8-11e6-87bf-937f9ad4e474] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","webSecurityEnabled":true}
[INFO - 2016-06-02T09:57:14.371Z] Session [61e8ead0-28a8-11e6-87bf-937f9ad4e474] - page.customHeaders: - {}
[INFO - 2016-06-02T09:57:14.372Z] Session [61e8ead0-28a8-11e6-87bf-937f9ad4e474] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.1.1","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"windows-8.1-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
[INFO - 2016-06-02T09:57:14.372Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 61e8ead0-28a8-11e6-87bf-937f9ad4e474
Page title is: Welcome to KiSSFLOW
[ERROR - 2016-06-02T09:57:43.670Z] Session [61e8ead0-28a8-11e6-87bf-937f9ad4e474] - page.onError - msg: TypeError: undefined is not an object (evaluating 'element.offset().top')

phantomjs://platform/console++.js:263 in error
[ERROR - 2016-06-02T09:57:43.670Z] Session [61e8ead0-28a8-11e6-87bf-937f9ad4e474] - page.onError - stack:
(anonymous function)
,can anyone suggest any workaround

Same error goes for me.

phantomjs --webdriver=3080 --webdriver-selenium-grid-hub=http://127.0.0.1:4444

error infomation:

[INFO  - 2016-07-04T09:19:16.032Z] GhostDriver - Main - running on port 3080
[INFO  - 2016-07-04T09:19:16.033Z] GhostDriver - Main - registering to Selenium HUB 'http://127.0.0.1:4444' version:  using '127.0.0.1:3080' with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy.
[ERROR - 2016-07-04T09:19:16.039Z] GhostDriver - main.fail - {"line":97,"sourceURL":"phantomjs://platform/hub_register.js","stack":"register@phantomjs://platform/hub_register.js:97:79\nglobal code@phantomjs://code/main.js:78:37"}

  phantomjs://platform/console++.js:263 in error

And, the hardware is:

phantomjs --version --> 2.1.1    installed by homebrew

OS X EI Capitan   10.11.5

Same here

Same here.

If it can help, it happenned to me because the port I was trying to run on (port 4444) was already used by another phantomjs that wasn't killed correctly. Make sure the port is not used!

Looking at the source on my local machine - I find that there is a file called console++.js, which github can't find because it disregards the ++ part of the name. So that's part of it. 263 being the line number, we're simply showing the error on console.log, and this is the "source" of the error. And it's "console.error" as the error level. So that means we're seeing an actual error being reported, but it's mislabeled - we're seeing where the error is reported from ("I processed an error, and this is where I processed the error at"), rather than what the error is. Which makes this noise and not very useful. I think the thinking is that the author of Ghost wants to show as much on the phantomjs console as possible, since it's headless...but instead it just leads to lots of confusion and people asking "what is this for?" and things like that. I don't think we need to know where the error was processed, what file/line number did the processing. I don't see a useful purpose in that.

same here. I meet with the same problem. Have somebody solved this problem?

same problem,
i have running on docker with debian:jessie
any solution?

[ERROR - 2016-10-11T08:38:53.870Z] RouterReqHand - _handle.error - {"name":"Missing Command Parameter","message":"{\"headers\":{\"Accept\":\"application/json, image/png\",\"Host\":\"localhost:8910\"},\"httpVersion\":\"1.1\",\"method\":\"DELETE\",\"url\":\"/session/\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"\",\"directory\":\"/session/\",\"path\":\"/session/\",\"relative\":\"/session/\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/session/\",\"queryKey\":{},\"chunks\":[\"session\",\"\"]}}","line":117,"sourceURL":"phantomjs://code/session_manager_request_handler.js","stack":"_deleteSessionCommand@phantomjs://code/session_manager_request_handler.js:117:73\n_handle@phantomjs://code/session_manager_request_handler.js:53:38\n_handle@phantomjs://code/router_request_handler.js:70:37"}
2016-10-11T08:38:53.870956200Z
phantomjs://platform/console++.js:263 in error

[INFO - 2016-10-11T08:42:33.177Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW

The solution to this problem is to comment the line
//platform: ghostdriver.system.os.name + '-' + ghostdriver.system.os.version + '-' + ghostdriver.system.os.architecture,
in the file hub_register.js
My problem is that i don't know how to build a phantomjs for windows with that modification ...
If somebody can explain ... 馃槃

In my case the port was already in use, did not work on 4444 but with 5555

I just built a new version of PhantomJS for Windows with the commented line in hub_register.js. That is clearly the solution for my problem. I tried to change the port like @rehanvdm mentionned but never worked for me.
Maybe the problem is not the same with Linux build.

this looks like an issue in ghostdriver. see issue detro/ghostdriver#483.

I can reproduce this issue when I use phantomJS 2.1.1 (Lubuntu 16.10) as a headless browser (Selenium grid node), you just need to use WebDriver ExpectedConditions() and wait for an element that does not exist:
IWait<IWebDriver> waitSave = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); waitSave.Until(ExpectedConditions.TextToBePresentInElement(caseTypePage.InfoPanelMessage, "saved"));
This will reproduce the issue for 100%. I have two running phantomJS nodes and when I run over 100 tests in parallel with NUnit 3 at some point nodes fail at all, I guess due to hanging queue of sessions.

Hello, @InkUisitor , can you share rebuild phantomjs.exe with commented row in hub_register.js file. I can't rebuild for myself.
Thanks

Hi !
I have uploaded my file on dropbox : https://www.dropbox.com/s/lcxnha14uqj7123/phantomjs-heavy.zip?dl=0
The size of my file if about 4 times bigger than the file you can download on the phantomjs site. Maybe i have missed some parameters during my build. But it's too long to rebuild (more than 30 min) and it's working. It's a version with the commented line. Hope you will enjoy this ! :)

@InkUisitor thanks for the rebuild version. I already downloaded and tested my test suit but i have the same error:
`[ERROR - 2016-11-16T11:46:01.536Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1479296761521

phantomjs://platform/console++.js:263 in error`
When i use geckodriver or chromedriver the test suit working fine
I use:
Windows 10 Pro
Selenium 3.0.1
PhantomJS 2.1.1
TestNG
Eclipse Neon
If someone can help me i will appreciate this :)

@nedka-taskova Some of my test failed with phantomjs because phantomjs is far quicker than chrome/gecko. Can you just try a simple test like : wait for an element to be shown in a google page ? If you have always the same error, i can't explain what's going on with your problem. If it works, you have to modify your tests in order to be sure that the WebElement you're working on are truely shown.
If you make automated test everyday, you must work witrh phantomjs. I can run 4 times much more test with phantomjs than with chrome during the same time.

Hello @InkUisitor, thanks for the answer. I think I've found a problem in my case. PhantomJs WebDriver in Selenium it seems doesn't support click() and getText() methods for some HTML elements. I used JavascriptExecutor class to execute Javascript code to click the button and now the test work fine.

        WebElement button= driver.findElement(By.xpath("//[@id='elementId']"));
        if (driver instanceof JavascriptExecutor) {
            js = (JavascriptExecutor)driver;
            js.executeScript("arguments[0].click();", button);
        } 
        else {
            button.click();
        }

Thanks again for support 馃憤

Same error here-- Looks like it is still open. Anybody has alternative solution?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
phantomjs --version
2.1.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C:\Automation\software>phantomjs --webdriver=8080 --webdriver-selenium-grid-hub
=http ://localhost:4444
[INFO - 2017-01-08T11:23:11.391Z] GhostDriver - Main - running on port 8080
[INFO - 2017-01-08T11:23:11.399Z] GhostDriver - Main - registering to Selenium
HUB 'http' version: using '127.0.0.1:8080' with org.openqa.grid.selenium.proxy.
DefaultRemoteProxy as remote proxy.
[ERROR - 2017-01-08T11:23:11.424Z] GhostDriver - main.fail - {"line":97,"sourceU
RL":"phantomjs://platform/hub_register.js","stack":"register@phantomjs://platfor
m/hub_register.js:97:79\nglobal code@phantomjs://code/main.js:78:37"}

phantomjs://platform/console++.js:263 in error

the same,i found that some useragent such as "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; .NET4.0C; .NET4.0E; Zune 4.7; InfoPath.3)" could cause this issue. and ghostdriver.log show this error "page.onError - msg: TypeError: Attempting to configurable attribute of unconfigurable property." maybe this is a bug.hurry to fix it.

+1 same issue on mac osx sierra version 10.12.5

the same +1

+1

+1

PhantomJS will be no longer updated. There is no more commit since June. Switch to Chrome Headless, it's the best solution you can have now

PhantomJS will be no longer updated. There is no more commit since June. Switch to Chrome Headless, it's the best solution you can have now

But if I don't want to install qt/gtk on my server machine that is dedicated to run Jenkins only and has no graphical system whatsoever?

@kgusarov That's why I talked about Chrome Headless, I run it on a Ubuntu Server 17.04 without IDE to have a very light server. Modzilla made a Firefox Headless too but i didn't tried it.

@InkUisitor And when I tried installing it on minimal CentOS, it offered me to pull full graphical subsystem which is an overkill - I mean we're talking 60Mb executable vs several gigs of libs. It is sad that PhantomJS died, guess will have to live without headless tests and wait longer for test suite to complete.

@kgusarov I'm not really strong with Linux distributions but I think you can do it without downloading too much libraries. I was running Selenium with Hub/Nodes when I used PhantomJS. I installed it on a Windows Server 2016. I migrate all this in Chrome Headless and I'm not waiting longer than before.
With PhantomJS, I had 1 hub, 20 instances with 1 session of PJS. My server needed more than 8GB of RAM (because 1 instance of PhantomJS is heavy)
Today, I have 1 hub, 1 instance with 20 sessions of Chrome Headless. My server needs the same amount of RAM when I overuse it but most of the time the server needs less than 4GB of RAM to run.
I have problems to stabilise my test currently, but tests with Chrome Headless are about 5 to 10% slower than with PhantomJS. Don't be afraid, it's clearly quicker than with Chrome without Headless mode. I remembered than I need 400% more time with Chrome when Headless wasn't released.

@kgusarov Even iam getting the same problem and i need to update the headless chrome envionment at jenkins.If you did so can you please help me out with how to set up headless chrome on jenkins because iam new to it.

@RahulChIO I have no headless tests atm, since PhantomJS has no real alternatives. Still hoping for some improvements in future

@kgusarov Hope so!!!!

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yisibl picture yisibl  路  5Comments

yairza picture yairza  路  6Comments

Sayalic0 picture Sayalic0  路  5Comments

Snowlav picture Snowlav  路  3Comments

maboiteaspam picture maboiteaspam  路  3Comments