simonradier / node-red-contrib-simple-webdriver

SimpleWebdriver nodes for Node-RED initially based on node-red-contrib-selenium-wd2
Apache License 2.0
14 stars 7 forks source link

Headless Chromium on Raspberry Pi #43

Closed phcollignon closed 9 months ago

phcollignon commented 1 year ago

Hello,

I try to use the node on RPi using Chromium in headless mode.

I get the following error (full stack below) :

Can't open an instance of chromium
WebDriverResponseError: session not created : session not created: No matching capabilities found

I use the following envrionment :

I configured "Open URL" node with those options:

(I'm able to lauch chromium-browser manually headless whith those options)

Do you have any idea ? Searching google, it might be related to the default location of chromium binary but it is ok (/usr/bin/chromium-browser)

Thanks in advance.

Full stack of the error:

[[TRACE][2023-06-01T08:35:27.333Z][Object.call](http://trace][2023-06-01t08:35:27.333z][object.call/)|api.js:34] Calling : POST http://localhost:9515/session
[[DEBUG][2023-06-01T08:35:27.676Z][Object.call](http://debug][2023-06-01t08:35:27.676z][object.call/)|api.js:37] :
WebDriverRequest {
  data: { capabilities: { alwaysMatch: [Object] } },
  requestOptions: {
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
      'Cache-Control': 'no-cache',
      'Content-Length': 121
    },
    method: 'POST',
    timeout: 10000
  },
  path: 'session'
}
[[DEBUG][2023-06-01T08:35:27.678Z][Object.call](http://debug][2023-06-01t08:35:27.678z][object.call/)|api.js:38] :
HttpResponse {
  statusCode: 500,
  statusMessage: 'Internal Server Error',
  body: {
    value: {
      error: 'session not created',
      message: 'session not created: No matching capabilities found',
      stacktrace: '#0 0x00556dd9a088 <unknown>\n' +
        '#1 0x00556db09808 <unknown>\n' +
        '#2 0x00556db63790 <unknown>\n' +
        '#3 0x00556db62d7c <unknown>\n' +
        '#4 0x00556db6434c <unknown>\n' +
        '#5 0x00556db641ac <unknown>\n' +
        '#6 0x00556db34aa8 <unknown>\n' +
        '#7 0x00556db35a04 <unknown>\n' +
        '#8 0x00556dd60aec <unknown>\n' +
        '#9 0x00556dd636b0 <unknown>\n' +
        '#10 0x00556dd63c88 <unknown>\n' +
        '#11 0x00556dd6b6e4 <unknown>\n' +
        '#12 0x00556dd642dc <unknown>\n' +
        '#13 0x00556dd3eda0 <unknown>\n' +
        '#14 0x00556dd82e98 <unknown>\n' +
        '#15 0x00556dd83028 <unknown>\n' +
        '#16 0x00556dd926c4 <unknown>\n' +
        '#17 0x007fa88bd648 start_thread\n' +
        '#18 0x007fa83e8c1c <unknown>\n'
    }
  },
  url: 'http://localhost:9515/session'
}
[[ERROR][2023-06-01T08:35:27.681Z][Object.call](http://error][2023-06-01t08:35:27.681z][object.call/)|api.js:40] :
{
  value: {
    error: 'session not created',
    message: 'session not created: No matching capabilities found',
    stacktrace: '#0 0x00556dd9a088 <unknown>\n' +
      '#1 0x00556db09808 <unknown>\n' +
      '#2 0x00556db63790 <unknown>\n' +
      '#3 0x00556db62d7c <unknown>\n' +
      '#4 0x00556db6434c <unknown>\n' +
      '#5 0x00556db641ac <unknown>\n' +
      '#6 0x00556db34aa8 <unknown>\n' +
      '#7 0x00556db35a04 <unknown>\n' +
      '#8 0x00556dd60aec <unknown>\n' +
      '#9 0x00556dd636b0 <unknown>\n' +
      '#10 0x00556dd63c88 <unknown>\n' +
      '#11 0x00556dd6b6e4 <unknown>\n' +
      '#12 0x00556dd642dc <unknown>\n' +
      '#13 0x00556dd3eda0 <unknown>\n' +
      '#14 0x00556dd82e98 <unknown>\n' +
      '#15 0x00556dd83028 <unknown>\n' +
      '#16 0x00556dd926c4 <unknown>\n' +
      '#17 0x007fa88bd648 start_thread\n' +
      '#18 0x007fa83e8c1c <unknown>\n'
  }
}
1 Jun 10:35:27 - [error] [open browser:96a8a662f4cdc3c1] Can't open an instance of chromium
1 Jun 10:35:27 - [error] [open browser:96a8a662f4cdc3c1] WebDriverResponseError: session not created : session not created: No matching capabilities found
simonradier commented 1 year ago

Hi @phcollignon,

Could you try with a CURL to do this test :

This kind of error is mostly related to an issue of your Chromedriver to find your chronium.

Best regards