Closed Bug 1228107 Opened 9 years ago Closed 4 years ago

Concurrent browsers with marionette

Categories

(Remote Protocol :: Marionette, defect)

44 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: titus.fortner, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

Steps to reproduce:

      threads, drivers = [], []

      5.times do
        threads << Thread.new do
          drivers << Selenium::WebDriver.for(browser_name, ({marionette: true} if browser_name == :marionette))
        end
      end

      threads.each do |thread|
        thread.abort_on_exception = true
        thread.join
      end

      drivers.each do |driver|
        driver.title # make any wire call
        driver.quit
      end


Actual results:

5 instances of wires and 5 browsers do open, but I only get session info back from one of them and then the code hangs:
Full Debug info:

browser: marionette
        driver: marionette
      platform: windows
        native: false
window_manager: true
          ruby: ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]


-> POST session
   >>> http://localhost:4444/session | {"desiredCapabilities":{"browserName":"firefox","browserVersion":null,"platformName":null,"platformVersion":"any","acceptSslCerts":false,"takesScreenshot":false,"takesElementScreenshot":false,"pageLoadStrategy":"normal"}}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"221"}
-> POST session
   >>> http://localhost:4445/session | {"desiredCapabilities":{"browserName":"firefox","browserVersion":null,"platformName":null,"platformVersion":"any","acceptSslCerts":false,"takesScreenshot":false,"takesElementScreenshot":false,"pageLoadStrategy":"normal"}}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"221"}
-> POST session
   >>> http://localhost:4446/session | {"desiredCapabilities":{"browserName":"firefox","browserVersion":null,"platformName":null,"platformVersion":"any","acceptSslCerts":false,"takesScreenshot":false,"takesElementScreenshot":false,"pageLoadStrategy":"normal"}}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"221"}
-> POST session
   >>> http://localhost:4447/session | {"desiredCapabilities":{"browserName":"firefox","browserVersion":null,"platformName":null,"platformVersion":"any","acceptSslCerts":false,"takesScreenshot":false,"takesElementScreenshot":false,"pageLoadStrategy":"normal"}}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"221"}
-> POST session
   >>> http://localhost:4448/session | {"desiredCapabilities":{"browserName":"firefox","browserVersion":null,"platformName":null,"platformVersion":"any","acceptSslCerts":false,"takesScreenshot":false,"takesElementScreenshot":false,"pageLoadStrategy":"normal"}}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"221"}

1448484717490	Marionette	INFO	Listening on port 2828
1448484718212	Marionette	INFO	Listening on port 2828
1448484718652	Marionette	INFO	Marionette enabled via build flag and pref
1448484718903	Marionette	INFO	Marionette enabled via build flag and pref
1448484719426	Marionette	INFO	Marionette enabled via build flag and pref
1448484719867	Marionette	INFO	Listening on port 2828
1448484720191	Marionette	INFO	Accepted connection conn0 from 127.0.0.1:51637
1448484720191	Marionette	DEBUG	conn0 client <- {"applicationType":"gecko","marionetteProtocol":2}
1448484720192	Marionette	INFO	Accepted connection conn1 from 127.0.0.1:51642
1448484720192	Marionette	DEBUG	conn1 client <- {"applicationType":"gecko","marionetteProtocol":2}
1448484720194	Marionette	INFO	Accepted connection conn2 from 127.0.0.1:51639
1448484720194	Marionette	DEBUG	conn2 client <- {"applicationType":"gecko","marionetteProtocol":2}
1448484720202	Marionette	INFO	Accepted connection conn3 from 127.0.0.1:51643
1448484720203	Marionette	DEBUG	conn3 client <- {"applicationType":"gecko","marionetteProtocol":2}
1448484720204	Marionette	INFO	Accepted connection conn4 from 127.0.0.1:51645
1448484720204	Marionette	DEBUG	conn4 client <- {"applicationType":"gecko","marionetteProtocol":2}
1448484720249	Marionette	INFO	Listening on port 2828
1448484720365	Marionette	DEBUG	conn0 -> {"name":"newSession","parameters":{"capabilities":null,"sessionId":null}}
1448484720369	Marionette	DEBUG	conn1 -> {"name":"newSession","parameters":{"capabilities":null,"sessionId":null}}
1448484720447	Marionette	DEBUG	conn2 -> {"name":"newSession","parameters":{"capabilities":null,"sessionId":null}}
1448484720448	Marionette	DEBUG	conn3 -> {"name":"newSession","parameters":{"capabilities":null,"sessionId":null}}
1448484720450	Marionette	DEBUG	conn4 -> {"name":"newSession","parameters":{"capabilities":null,"sessionId":null}}
1448484721061	Marionette	INFO	Listening on port 2828
1448484725955	Marionette	INFO	loaded listener.js
1448484725965	Marionette	INFO	loaded listener.js
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: chrome://marionette/content/driver.js, line 415: TypeError: this.curBrowser is null
JavaScript error: , line 0: WebDriverError: Session already running
JavaScript error: , line 0: WebDriverError: Session already running
JavaScript error: , line 0: WebDriverError: Session already running
JavaScript error: , line 0: WebDriverError: Session already running
1448484726668	Marionette	DEBUG	conn4 client <- {"sessionId":"da3aefbe-3b07-4777-8be6-da9bee300cbb","capabilities":{"browserName":"Firefox","browserVersion":"44.0a2","platformName":"WINNT","platformVersion":"44.0a2","specificationLevel":"1","raisesAccessibilityExceptions":false,"rotatable":false,"acceptSslCerts":false,"takesElementScreenshot":true,"takesScreenshot":true,"proxy":{},"platform":"WINNT","XULappId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","appBuildId":"20151122004109","device":"desktop","version":"44.0a2"}}
<- {"sessionId":"da3aefbe-3b07-4777-8be6-da9bee300cbb","value":{"XULappId":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","acceptSslCerts":false,"appBuildId":"20151122004109","browserName":"Firefox","browserVersion":"44.0a2","device":"desktop","platform":"WINNT","platformName":"WINNT","platformVersion":"44.0a2","proxy":{},"raisesAccessibilityExceptions":false,"rotatable":false,"specificationLevel":"1","takesElementScreenshot":true,"takesScreenshot":true,"version":"44.0a2"}}
*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: this.Paths is null
Full stack: Agent.write@resource:///modules/sessionstore/SessionWorker.js:196:9
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41
EventListener.handleEvent*@resource:///modules/sessionstore/SessionWorker.js:30:1

*************************
console.error: 
  Could not write session state file 
  Message: TypeError: this.Paths is null
  Stack:
    Agent.write@resource:///modules/sessionstore/SessionWorker.js:196:9
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41
EventListener.handleEvent*@resource:///modules/sessionstore/SessionWorker.js:30:1

  Agent.write@resource:///modules/sessionstore/SessionWorker.js:196:9
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41
EventListener.handleEvent*@resource:///modules/sessionstore/SessionWorker.js:30:1

JavaScript warning: https://self-repair.mozilla.org/en-US/repair/, line 8: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
JavaScript warning: https://self-repair.mozilla.org/en-US/repair/, line 8: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: this.Paths is null
Full stack: Agent.write@resource:///modules/sessionstore/SessionWorker.js:196:9
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41
EventListener.handleEvent*@resource:///modules/sessionstore/SessionWorker.js:30:1

*************************
console.error: 
  Could not write session state file 
  Message: TypeError: this.Paths is null
  Stack:
    Agent.write@resource:///modules/sessionstore/SessionWorker.js:196:9
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41
EventListener.handleEvent*@resource:///modules/sessionstore/SessionWorker.js:30:1

  Agent.write@resource:///modules/sessionstore/SessionWorker.js:196:9
worker.dispatch@resource:///modules/sessionstore/SessionWorker.js:21:24
anonymous/AbstractWorker.prototype.handleMessage@resource://gre/modules/workers/PromiseWorker.js:122:16
@resource:///modules/sessionstore/SessionWorker.js:30:41
EventListener.handleEvent*@resource:///modules/sessionstore/SessionWorker.js:30:1

JavaScript warning: https://self-repair.mozilla.org/en-US/repair/, line 8: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
JavaScript warning: https://self-repair.mozilla.org/en-US/repair/, line 8: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
JavaScript warning: https://self-repair.mozilla.org/en-US/repair/, line 8: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

#<Net::ReadTimeout: Net::ReadTimeout>


Expected results:

5 sessions should be usable at the same time

Also, very oddly, if I already have a Marionette enabled browser open when I start the test, the test passes just fine.
Component: General → Marionette

That's a very old bug, and a lot has been changed since it has been reported. Lets close for now, but if that issue is still present feel free to reopen.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(titus.fortner)
Resolution: --- → INCOMPLETE
Flags: needinfo?(titus.fortner)
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.