geokrety/geokrety-website-qa

Sometimes robots tests report Timeout on 'Open Browser' step

Closed this issue · 5 comments

For some builds robots tests hangs

For example, on second welcome step, robot stay x minutes on the same step, when x reach 10 min, then travis detect inactivity and stop the job.
image

Need to check that, because without workaround, this could be really boring!

  • check disable concurrent build : done, but seems out of scope, reverted
  • check having single root robot file: done, hangs reproduced with 1 root robot file, reverted
  • check wait page limit/timeout ? selenium doc: Timeout, done, seems good until now, wait and see....
  • wont do that (seems not related) check terminal flush related issue: cf doc --console
  • wont do that (seems complex) run robots in dedicated thread, then print some output each X seconds while waiting for result

not fixed, cf staled builds: ex1 and ex1

with Timeout just set:

  • we've got now Timeout (status: failed) and no more staled builds (status: errored)
  • some build timed out on Open Browser directive

Please also note that

  • xvbf doesn't fix that issue
  • Open Browser with options doesn't solve the timeout issue.
  • this issue will be renamed to Sometimes robots tests report Timeout on 'Open Browser' step
  • test without headless: Start Virtual Display, Open Browser chrome, then Set Window Size

    • this doesn't fix timeout issue
  • try tu put robots in debug logs level ex

got this on open browser timeout:

20:22:33.186 DEBUG Opened browser with session id 76609eb2f3baca556a6b4dc0d003b75c but failed to open url 'https://rec.geokrety.org/'.

  • if not fixed, we could ask a question on chromedriver group (on RobotFramework's slack , but seems related to chromedriver)

current configuration:

(travis provided)
python-2.7.15

(apt)
xvfb is already the newest version (2:1.15.1-0ubuntu2.11).

(pip install) requirements.txt
robotframework==3.0.4
robotframework-seleniumlibrary==3.2.0
robotframework-debuglibrary==1.1.4
xvfbwrapper==0.2.9
robotframework-xvfb==1.2.2
Selenium==3.14.1

(download)
chromedriver 2.43 (linux 64)

from chromedriver debug log we have Severe:


[1541016803.180][DEBUG]: DevTools WebSocket Command: Runtime.evaluate (id=20) F831FA6DA19139BC45F7D8AFFB760F62 {
   "expression": "1"
}
[1541016803.180][SEVERE]: Timed out receiving message from renderer: -0.002
[1541016803.183][INFO]: Done waiting for pending navigations. Status: timeout
[1541016803.183][INFO]: [70c7afd6e5329b6a455c39ea9d7c1261] RESPONSE Navigate ERROR timeout

seems this problem occurs especially when page loading step never end :
https://sqa.stackexchange.com/q/9007

next todo:

  • try dedicated scenario with only many ( open browser, close all browsers )

  • one time encounter ERR_ADDRESS_IN_USE when chromedriver were launched on port 50954

 [1541078732.321][SEVERE]: bind() returned an error, errno=0: Address already in use (98)
 [1541078732.321][INFO]: listen on IPv4 failed with error ERR_ADDRESS_IN_USE

  • got Timed out receiving message from renderer

  • try option dns-prefetch-disable
    • timeout not fixed

On rec.geokrety.org we got this error:

Access to resource at 'https://cdn.geokrety.org/images/favicon/manifest.json' from origin 'https://rec.geokrety.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

  • try insecure mode

    • timeout not fixed
  • try disable-browser-side-navigation
    from this post: https://stackoverflow.com/q/48450594/1827276

    • timeout not fixed
  • try chrome extension to stop window

  • firefox no issue detected with firefox

As we don't want to debug chrome driver, we will switch to firefox one and close this issue.
Will keep the chrome browser as option.