ovh / venom

šŸ Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions
Apache License 2.0
1.06k stars 144 forks source link

invalid session id with web executor #780

Closed FloRichardAloeCorp closed 8 months ago

FloRichardAloeCorp commented 8 months ago

Hello I'm running into an issue while trying to run web executor.

Execution env:

Testcase "TestCase Google search", step #0: failed to navigate: request unsuccessful: invalid session id (test/venom/suites/test_web.yml:15)

The test file look like this:

name: Test web

vars:
  web:
    driver: chrome
    logLevel: DEBUG
    driverPath: "/usr/local/bin/chromedriver"
    binaryPath: "/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
    debug: true

testcases:
  - name: TestCase Google search
    steps:
      - type: web
        action:
          navigate:
            url: https://www.google.fr

Here is the stack trace: venom.log

Is this a common issue on MacOS ?

kevinramage commented 8 months ago

Hello, Error message "invalid session id" indicate an issue to create a session (Incompatible version, impossible to run binary ...) Can you try to put logLevel variable to DEBUG in order to have more logs ?

More informations about web executor variables: https://github.com/ovh/venom/tree/master/executors/web#variables

Regards,

FloRichardAloeCorp commented 8 months ago

I'm maybe wrong but it is already in DEBUG mode (by checking vars.web.logLevel entry of the provided test ). Are you referencing this entry ?

kevinramage commented 8 months ago

In your log, you just have debug logs from "venom" component but I don't see any logs from "venom web" component (Component dedicated to manage exchange between venom and browser) With logLevel variable, you can see more logs.

For example, you can see logs like : May 27 21:51:57.232 [DEBU] Request body: {"capabilities":{"alwaysMatch":{"browserName":"chrome","acceptInsecureCerts":true,"goog:chromeOptions":{"args":["start-maximized"]}}}} May 27 21:51:58.481 [DEBU] Response body: {"value":{"capabilities":{"acceptInsecureCerts":true,

These kinds of logs can help to have browser response and identify root cause of your issue.

FloRichardAloeCorp commented 8 months ago

I've solved the issue by cloning the project and building it manually. I don't know what happened, but the available release seems to have a bug. Thanks for your help!

FloRichardAloeCorp commented 8 months ago

Solved