docker-jitsi-meet icon indicating copy to clipboard operation
docker-jitsi-meet copied to clipboard

jibri webdriverexception while joining the call

Open sonntex opened this issue 2 years ago • 7 comments

I use the official docker-jitsi-meet-stable-8218 and get selenium errors when trying to record my stream.

Added these lines to my .env file:

ENABLE_RECORDING=1
JIBRI_RECORDING_DIR=/config/recordings
JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize_recording.sh

CHROMIUM_FLAGS=--ignore-certificate-errors

PUBLIC_URL=https://dev-10-42-0-184.mycompany.com:8443/

#XMPP_DOMAIN=dev-10-42-0-184.mycompany.com
#XMPP_GUEST_DOMAIN=guest.dev-10-42-0-184.mycompany.com
#XMPP_INTERNAL_MUC_DOMAIN=internal-muc.dev-10-42-0-184.mycompany.com
#XMPP_MUC_DOMAIN=muc.dev-10-42-0-184.mycompany.com
#XMPP_RECORDER_DOMAIN=recorder.dev-10-42-0-184.mycompany.com

Then ran docker-compose -f docker-compose.yml -f jibri.yml up -d.

After login using recorder user and press on start recording I see the error below:

Jibri 2023-01-30 12:17:10.331 SEVERE: [56] [session_id=vqznxgpqnyebonck] JibriSelenium.joinCall$lambda-3#327: An error occurred while joining the call
org.openqa.selenium.WebDriverException: <unknown>: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
  (Session info: chrome=108.0.5359.71)
  (Driver info: chromedriver=108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}),platform=Linux 5.4.0-135-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'b9fcc3254db4', ip: '198.18.14.6', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-135-generic', java.version: '11.0.16'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 108.0.5359.71 (1e0e3868ee06..., userDataDir: /tmp/.com.google.Chrome.H0Y3Nw}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:38721}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), rotatable: false, setWindowRect: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 108.0.5359.71, webStorageEnabled: true, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 4a89e6b0be0d3ad9fb6c50745b728a58
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
        at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
        at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
        at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
        at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:480)
        at org.jitsi.jibri.selenium.JibriSelenium.setLocalStorageValues(JibriSelenium.kt:211)
        at org.jitsi.jibri.selenium.JibriSelenium.joinCall$lambda-3(JibriSelenium.kt:317)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Seems that the communication via web socket works well except this one request which led to the problem:

Jibri 2023-01-30 12:17:10.460 INFO: [56] JibriSelenium.leaveCallAndQuitBrowser#350: [2023-01-30T12:16:40+0000] [FINE] DevTools WebSocket Command: Page.navigate (id=15) (session_id=F62CF10B960D41D343C04964C14B3856) F8E37DF8
F1C351692079AC290163BD02 {
   "url": "https://dev-10-42-0-184.mycompany.com:8443/"
}

Jibri 2023-01-30 12:17:10.460 INFO: [56] JibriSelenium.leaveCallAndQuitBrowser#350: [2023-01-30T12:17:10+0000] [FINE] DevTools WebSocket Response: Page.navigate (id=15) (session_id=F62CF10B960D41D343C04964C14B3856) F8E37DF
8F1C351692079AC290163BD02 {
   "errorText": "net::ERR_TIMED_OUT",
   "frameId": "F8E37DF8F1C351692079AC290163BD02",
   "loaderId": "9029250DBE22CF490D62FD35FD7C0F03"
}

Please find log files attached: log.0.txt browser.0.txt

sonntex avatar Jan 30 '23 12:01 sonntex

CHROMIUM_FLAGS=--ignore-certificate-errors

You need to pass all flags Jibri passes. That just overrides them, it doesn't just add another one.

saghul avatar Jan 30 '23 14:01 saghul

Thank you. Made an effort with these chromium flags:

CHROMIUM_FLAGS=--use-fake-ui-for-media-stream,--start-maximized,--kiosk,--enabled,--autoplay-policy=no-user-gesture-required,--ignore-certificate-errors

The same error:

Jibri 2023-01-30 14:59:07.244 INFO: [56] JibriSelenium.leaveCallAndQuitBrowser#350: [2023-01-30T14:58:36+0000] [FINE] DevTools WebSocket Command: Page.navigate (id=15) (session_id=FF7B989F907CB51D07B5DDD08EC972E3) F317339947AB8EABFEFC8C3F2EDBA05D {
   "url": "https://dev-10-42-0-184.mycompany.com:8443/"
}

Jibri 2023-01-30 14:59:07.244 INFO: [56] JibriSelenium.leaveCallAndQuitBrowser#350: [2023-01-30T14:59:07+0000] [FINE] DevTools WebSocket Response: Page.navigate (id=15) (session_id=FF7B989F907CB51D07B5DDD08EC972E3) F317339947AB8EABFEFC8C3F2EDBA05D {
   "errorText": "net::ERR_TIMED_OUT",
   "frameId": "F317339947AB8EABFEFC8C3F2EDBA05D",
   "loaderId": "E557FB2400DF6387B29B4CC2DC35F4EB"
}

sonntex avatar Jan 30 '23 15:01 sonntex

I'd recommend you use the standard https port, 443. Not sure everything works properly with a nonstandard port.

saghul avatar Jan 30 '23 16:01 saghul

Nothing changed.

Added these lines to my .env file:

ENABLE_RECORDING=1
JIBRI_RECORDING_DIR=/config/recordings
JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize_recording.sh

CHROMIUM_FLAGS=--use-fake-ui-for-media-stream,--start-maximized,--kiosk,--enabled,--autoplay-policy=no-user-gesture-required,--ignore-certificate-errors

#PUBLIC_URL=https://dev-10-42-0-184.mycompany.com:8443/
PUBLIC_URL=https://dev-10-42-0-184.mycompany.com

#XMPP_DOMAIN=dev-10-42-0-184.mycompany.com
#XMPP_GUEST_DOMAIN=guest.dev-10-42-0-184.mycompany.com
#XMPP_INTERNAL_MUC_DOMAIN=internal-muc.dev-10-42-0-184.mycompany.com
#XMPP_MUC_DOMAIN=muc.dev-10-42-0-184.mycompany.com
#XMPP_RECORDER_DOMAIN=recorder.dev-10-42-0-184.mycompany.com

HTTP_PORT=80
HTTPS_PORT=443

Please find log files attached: log.0.txt browser.0.txt

sonntex avatar Jan 30 '23 16:01 sonntex

JibriSelenium.joinCall$lambda-3#327: An error occurred while joining the call org.openqa.selenium.WebDriverException: : Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

Self signed certificates are not really well supported. I'd encourage you to test with a real cert so you don't need to use any overriding flags.

saghul avatar Jan 30 '23 18:01 saghul

Thank you for your help. Unfortunately, the same error.

Commented custom chromium flags:

ENABLE_RECORDING=1
JIBRI_RECORDING_DIR=/config/recordings
JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize_recording.sh

#CHROMIUM_FLAGS=--use-fake-ui-for-media-stream,--start-maximized,--kiosk,--enabled,--autoplay-policy=no-user-gesture-required,--ignore-certificate-errors

#PUBLIC_URL=https://dev-10-42-0-184.mycompany.com:8443/
PUBLIC_URL=https://dev-10-42-0-184.mycompany.com

#XMPP_DOMAIN=dev-10-42-0-184.mycompany.com
#XMPP_GUEST_DOMAIN=guest.dev-10-42-0-184.mycompany.com
#XMPP_INTERNAL_MUC_DOMAIN=internal-muc.dev-10-42-0-184.mycompany.com
#XMPP_MUC_DOMAIN=muc.dev-10-42-0-184.mycompany.com
#XMPP_RECORDER_DOMAIN=recorder.dev-10-42-0-184.mycompany.com

HTTP_PORT=80
HTTPS_PORT=443

Generated and copied cert.crt and cert.key fileș to ~/.jitsi-meet-cfg/web/keys/:

$ docker-compose -f docker-compose.yml -f jibri.yml logs web
Attaching to docker-jitsi-meet-stable-8218_web_1
web_1      | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
web_1      | [s6-init] ensuring user provided files have correct perms...exited 0.
web_1      | [fix-attrs.d] applying ownership & permissions fixes...
web_1      | [fix-attrs.d] done.
web_1      | [cont-init.d] executing container initialization scripts...
web_1      | [cont-init.d] 01-set-timezone: executing... 
web_1      | [cont-init.d] 01-set-timezone: exited 0.
web_1      | [cont-init.d] 10-config: executing... 
web_1      | using keys found in /config/keys
web_1      | Using Nginx resolver: =127.0.0.11=

Please find log files attached: log.0.txt browser.0.txt

By the way, letsencrypt hasn't worked for me:

web_1      | [Mon Jan 30 18:54:10 UTC 2023] Installing to /config/acme.sh
web_1      | [Mon Jan 30 18:54:10 UTC 2023] Installed to /config/[acme.sh/acme.sh](http://acme.sh/acme.sh)
web_1      | [Mon Jan 30 18:54:10 UTC 2023] Installing alias to '/root/.profile'
web_1      | [Mon Jan 30 18:54:10 UTC 2023] OK, Close and reopen your terminal to start using acme.sh
web_1      | [Mon Jan 30 18:54:10 UTC 2023] Installing cron job
web_1      | 8 0 * * * "/config/acme.sh"/acme.sh --cron --home "/config/acme.sh" > /dev/null
web_1      | [Mon Jan 30 18:54:10 UTC 2023] Good, bash is found, so change the shebang to use bash as preferred.
web_1      | [Mon Jan 30 18:54:10 UTC 2023] OK
web_1      | /
web_1      | [Mon Jan 30 18:54:10 UTC 2023] Using ACME_DIRECTORY: https://acme-staging-v02.api.letsencrypt.org/directory
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 60
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Can not init api.
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Using CA: https://acme-staging-v02.api.letsencrypt.org/directory
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Run pre hook:'if [[ -d /var/run/s6/services/nginx ]]; then s6-svc -d /var/run/s6/services/nginx; fi'
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Standalone mode.
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 60
web_1      | [Mon Jan 30 18:54:11 UTC 2023] Can not init api.
web_1      | [Mon Jan 30 18:54:12 UTC 2023] Registering account: https://acme-staging-v02.api.letsencrypt.org/directory
web_1      | [Mon Jan 30 18:54:12 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 60
web_1      | [Mon Jan 30 18:54:12 UTC 2023] Could not get nonce, let's try again.
web_1      | [Mon Jan 30 18:54:14 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 60
web_1      | [Mon Jan 30 18:54:14 UTC 2023] Could not get nonce, let's try again.
web_1      | [Mon Jan 30 18:54:17 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 60
web_1      | [Mon Jan 30 18:54:17 UTC 2023] Could not get nonce, let's try again.
web_1      | [Mon Jan 30 18:54:19 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 60
web_1      | [Mon Jan 30 18:54:19 UTC 2023] Could not get nonce, let's try again.

sonntex avatar Feb 01 '23 11:02 sonntex

Any updates? Should I create the same issue in the official jibri repo at github?

sonntex avatar Feb 22 '23 11:02 sonntex