ariya / phantomjs

Scriptable Headless Browser
http://phantomjs.org
BSD 3-Clause "New" or "Revised" License
29.47k stars 5.76k forks source link

Error Message => 'Currently Window handle/name is invalid (closed?) #11308

Closed luksch closed 4 years ago

luksch commented 11 years ago

Hi, I have a running a java program that uses the phantomjs webdriver. All runs fine and stable, but if I start about 8 or nine processes that all use phantomjs but access different sites I get the above mentioned error. not always in the same program, and not easily reproducable. I just notices the correlation with many instances of phantomjs, but that is all. Can anyone tell me what is going on here? I use a 16Gig/Ram 8 processor 64bit ubuntu box for running all this and the machine is not really at a limit with the 8-10 processes.

Regards, Lukas

here is the full error log, in case that helps:

Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Error Message => 'Currently Window handle/name is invalid (closed?)'
 caused by Request => {"headers":{"Accept":"application/json, image/png","Connection":"Keep-Alive","Content-Length":"53","Content-Type":"application/json; charset=utf-8","Host":"localhost:19169"},"httpVersion":"1.1","method":"POST","post":"{\"url\":\"https://sports.bwin.com/en/sports#sportId=7\"}","url":"/url","urlParsed":{"anchor":"","query":"","file":"url","directory":"/","path":"/url","relative":"/url","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/url","queryKey":{},"chunks":["url"]},"urlOriginal":"/session/87704ed0-b99b-11e2-8057-0f37e3276983/url"}
Build info: version: '2.30.0', revision: 'dc1ef9c', time: '2013-02-19 00:15:57'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.5.0-28-generic', java.version: '1.7.0_21'
Driver info: driver.version: unknown
[ERROR - 2013-05-10T18:01:03.791Z] RouterReqHand - _handle - Thrown => {
  "message": "Error Message => 'Currently Window handle/name is invalid (closed?)'\n caused by Request => {\"headers\":{\"Accept\":\"application/json, image/png\",\"Cache-Control\":\"no-cache\",\"Connection\":\"Keep-Alive\",\"Host\":\"localhost:19169\"},\"httpVersion\":\"1.1\",\"method\":\"GET\",\"url\":\"/url\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"url\",\"directory\":\"/\",\"path\":\"/url\",\"relative\":\"/url\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/url\",\"queryKey\":{},\"chunks\":[\"url\"]},\"urlOriginal\":\"/session/87704ed0-b99b-11e2-8057-0f37e3276983/url\"}",
  "name": "NoSuchWindow",
  "errorStatusCode": 23,
  "errorSessionId": "87704ed0-b99b-11e2-8057-0f37e3276983",
  "errorClassName": "SessionReqHand",
  "errorScreenshot": "",
  "line": 190,
  "sourceId": 139754047252672,
  "sourceURL": ":/ghostdriver/request_handlers/request_handler.js",
  "stack": "NoSuchWindow: Error Message => 'Currently Window handle/name is invalid (closed?)'\n caused by Request => {\"headers\":{\"Accept\":\"application/json, image/png\",\"Cache-Control\":\"no-cache\",\"Connection\":\"Keep-Alive\",\"Host\":\"localhost:19169\"},\"httpVersion\":\"1.1\",\"method\":\"GET\",\"url\":\"/url\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"url\",\"directory\":\"/\",\"path\":\"/url\",\"relative\":\"/url\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/url\",\"queryKey\":{},\"chunks\":[\"url\"]},\"urlOriginal\":\"/session/87704ed0-b99b-11e2-8057-0f37e3276983/url\"}\n    at :/ghostdriver/request_handlers/request_handler.js:190\n    at :/ghostdriver/request_handlers/request_handler.js:165\n    at :/ghostdriver/request_handlers/session_request_handler.js:439\n    at :/ghostdriver/request_handlers/session_request_handler.js:84\n    at :/ghostdriver/request_handlers/request_handler.js:61\n    at :/ghostdriver/request_handlers/router_request_handler.js:82",
  "stackArray": [
    {
      "sourceURL": ":/ghostdriver/request_handlers/request_handler.js",
      "line": 190
    },
    {
      "sourceURL": ":/ghostdriver/request_handlers/request_handler.js",
      "line": 165
    },
    {
      "sourceURL": ":/ghostdriver/request_handlers/session_request_handler.js",
      "line": 439
    },
    {
      "sourceURL": ":/ghostdriver/request_handlers/session_request_handler.js",
      "line": 84
    },
    {
      "sourceURL": ":/ghostdriver/request_handlers/request_handler.js",
      "line": 61
    },
    {
      "sourceURL": ":/ghostdriver/request_handlers/router_request_handler.js",
      "line": 82
    }
  ]
}
gidbalugo commented 10 years ago

any solutions on this one?

thanks!

szrg commented 9 years ago

Same problem. Any solution? Thanks.

TiMusBhardwaj commented 8 years ago

I am also facing the same issue. Any Solution ??

ljdawn commented 8 years ago

Any solution? thanks

ramigamalrihawi commented 7 years ago

Me too

stale[bot] commented 4 years ago

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