Failed to read the 'localStorage' property


#1

Hey!

Just installed and configured a working setup of Jitsi Meet.

Now trying to get Jibri working and recording conferences.
Run into a “Failed to read the ‘localStorage’ property from ‘Window’: Access is denied for this document” problem that I cant find a way around.
Did a clean install of Jibri on a new VM - got the same error.
So Im kinda stuck now.
Can someone look into this?

Jibri logs:
2019-02-06 20:42:09.833 INFO: [38] org.jitsi.jibri.api.xmpp.XmppApi.run() Starting service
2019-02-06 20:42:09.836 INFO: [38] org.jitsi.jibri.api.xmpp.XmppApi.handleStartService() Parsed call url info: CallUrlInfo(baseUrl=https://video.dev.x.x.x, callName=test, urlParams=)
2019-02-06 20:42:09.839 INFO: [38] org.jitsi.jibri.JibriManager.startFileRecording() Starting a file recording with params: FileRecordingRequestParams(callParams=CallParams(callUrlInfo=CallUrlInfo(baseUrl=https://video.dev.x.x.x, ca
llName=test, urlParams=)), sessionId=jrgvgdbebalmlvap, callLoginParams=XmppCredentials(domain=recorder.video.dev.x.x.x, username=recorder, password=jibrirecorderpass)) finalize script path: /home/jibri/finalize_recording.sh and recordings directory: /tmp/recordings
2019-02-06 20:42:11.823 INFO: [38] org.openqa.selenium.remote.ProtocolHandshake.createSession() Detected dialect: OSS
2019-02-06 20:42:11.873 FINE: [38] org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.() Detected os as OS: LINUX
2019-02-06 20:42:11.891 INFO: [38] org.jitsi.jibri.service.impl.FileRecordingJibriService.() Writing recording to /tmp/recordings/jrgvgdbebalmlvap
2019-02-06 20:42:11.892 FINE: [38] org.jitsi.jibri.statsd.JibriStatsDClient.incrementCounter() Incrementing statsd counter: start:recording
2019-02-06 20:42:11.898 INFO: [38] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: IDLE -> BUSY
2019-02-06 20:42:11.906 INFO: [38] org.jitsi.jibri.api.xmpp.XmppApi.invoke() Jibri reports its status is now JibriStatus(busyStatus=BUSY, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connection jibri environment
2019-02-06 20:42:12.206 SEVERE: [45] org.jitsi.jibri.selenium.JibriSelenium.run() 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.
(Session info: chrome=72.0.3626.81)
(Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.4.0-62-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: ‘jibri.dev.x.x.x’, ip: ‘192.168.100.19’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.4.0-62-generic’, java.version: ‘1.8.0_191’
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.46.628388 (4a34a70827ac54…, userDataDir: /tmp/.org.chromium.Chromium…}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:36474}, 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: 72.0.3626.81, webStorageEnabled: true}
Session ID: e6653b489a62343c54fa711005d440d0 with stack:
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:537)
org.jitsi.jibri.selenium.JibriSelenium.setLocalStorageValues(JibriSelenium.kt:162)

chromedriver.log:
[1549474931.927][INFO]: [e6653b489a62343c54fa711005d440d0] COMMAND Navigate {
“url”: “https://video.dev.x.x.x
}
[1549474931.927][INFO]: Waiting for pending navigations…
[1549474931.945][INFO]: Done waiting for pending navigations. Status: ok
[1549474932.082][INFO]: Waiting for pending navigations…
[1549474932.173][INFO]: Done waiting for pending navigations. Status: ok
[1549474932.173][INFO]: [e6653b489a62343c54fa711005d440d0] RESPONSE Navigate
[1549474932.178][INFO]: [e6653b489a62343c54fa711005d440d0] COMMAND ExecuteScript {
“args”: [ ],
“script”: “window.localStorage.setItem(‘displayname’, ‘’)”
}
[1549474932.178][INFO]: Waiting for pending navigations…
[1549474932.178][INFO]: Done waiting for pending navigations. Status: ok
[1549474932.182][INFO]: Waiting for pending navigations…
[1549474932.185][INFO]: Done waiting for pending navigations. Status: ok
[1549474932.185][INFO]: [e6653b489a62343c54fa711005d440d0] RESPONSE ExecuteScript ERROR : Failed to read the ‘localStorage’ property from ‘Window’: Access is denied for this document.
(Session info: chrome=72.0.3626.81)

jicofo.log:
Jicofo 2019-02-06 20:42:09.839 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriRecorder.log() Started Jibri session
Jicofo 2019-02-06 20:42:11.915 INFO: [37] org.jitsi.jicofo.recording.jibri.JibriDetector.onInstanceStatusChanged().136 Received Jibri jibribrewery@internal.auth.video.dev.x.x.x/jibri-test status
Jicofo 2019-02-06 20:42:11.915 INFO: [37] org.jitsi.jicofo.recording.jibri.JibriDetector.notifyJibriStatus().174 Jibri: jibribrewery@internal.auth.video.dev.x.x.x/jibri-test available: false
Jicofo 2019-02-06 20:42:12.221 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Updating status from JIBRI: for test@conference.video.dev.x.x.x
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Got Jibri status update: Jibri jibribrewery@internal.auth.video.dev.x.x.x/jibri-test has status off and failure reason error, current Jibri jid is jibribrewery@internal.auth.video.dev.x.x.x/jibri-test
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Jibri is no longer pending, cancelling pending timeout task
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Jibri failed, trying to fall back to another Jibri
Jicofo 2019-02-06 20:42:12.222 SEVERE: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Unable to find an available Jibri, can’t start
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Failed to fall back to another Jibri, this session has now failed
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriRecorder.log() Got jibri status off and failure error
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriRecorder.log() Publishing new jibri-recording-status: in: test@conference.video.dev.x.x.x
Jicofo 2019-02-06 20:42:12.222 INFO: [120] org.jitsi.jicofo.recording.jibri.JibriSession.log() Cleaning up current JibriSession
Jicofo 2019-02-06 20:46:21.199 INFO: [37] org.jitsi.jicofo.ChatRoomRoleAndPresence.log() Chat room event ChatRoomMemberPresenceChangeEvent[type=MemberLeft sourceRoom=org.jitsi.impl.protocol.xmpp.ChatRoomImpl@49c3f2dc member=ChatMember[test@conference.video.dev.x.x.x/79582c33, jid: 79582c33-d17d-47ac-acef-ada065a145da@video.dev.x.x.x/a47a5f8d-3fe7-4d54-8d71-135ccdec028c]@1197815155]


#2

Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial


#3

I believe Jibri used to try setting some local storage values before it had definitively joined the call. This has since been fixed, so I think upgrading should fix this problem.


#4

That was freshly installed Jibri using steps from https://github.com/jitsi/jibri.

root@jibri:~# apt show jibri
Package: jibri
Version: 7.2.71-1
Priority: optional
Section: net
Maintainer: dev@jitsi.org
Installed-Size: 42.1 MB
Depends: default-jre-headless | java8-runtime-headless | java8-runtime, ffmpeg, curl, alsa-utils, icewm, xdotool, xserver-xorg-input-void, xserver-xorg-video-dummy
Download-Size: 37.9 MB
APT-Manual-Installed: yes
APT-Sources: https:/ /download.jitsi.org unstable/ Packages

Where can i find a newer version?


#5

Hm, are you sure that version is running? That version number in the package is correct, but those logs appear to be from an older version.


#6

Is there any way to check? (Sadly no version number anywhere in logs)

Jicofo logs are from another server and could be somewhat older.

Well I guess I am going to try installing Jibri from scratch one more time.


#7

There isn’t, I’m afraid. Can you restart Jibri and paste the entire log here?


#8

Recreated virtual machine, reinstalled jibri.
Still getting the same error :frowning:

Logs:
–removed–


#9

Ok, sorry, maybe I misread the logs earlier. Those are definitely from a recent version, at least. I’m not sure what may be causing this, though. I just tried the url manually and it seems fine. It’s weird to me though that the error says: org.openqa.selenium.WebDriverException: <unknown>: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. (Session info: chrome=72.0.3626.96) (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.4.0-62-generic x86_64) (WARNING: The server did not provide any stacktrace information) using Window with a capital W, but maybe that’s just how it is printed. Are you able to manually visit the base url (https://video.dev.med.mts.ru) from the machine jibri is running on (the VM in this case) and have it load? and can you open the dev console and run window.localStorage and it finds it ok?


#10

OMG!
I found out that I forgot to add the name of Jitsi server (video.*) to the hosts file.
Still can’t believe that the problem turns out to be so simple but the error message was so strange and misleading.
Thanks a lot for your help!
And thanks for all your hard work on the project! :slight_smile: :+1:


#11

No problem. I’m surprised actually that the chromedriver didn’t throw some error about not being able to load the page–it should have at least blocked until it loaded it (and therefore not try to set the local storage values). I’ll have to take a look at that at some point.


#12

So what exactly was the issue? Does your VM not have access to DNS or something and that’s why it needed an entry in the hosts file?


#13

My case is quite simple really.
I made 2 VMs at a cloud provider to test Jitsi conferences.
Both VMs were placed behind NAT (thats a requirement).
The issue was video.* name resolving to an external ip.
Jibri couldn’t connect to Jitsi’s external ip address.
Adding hosts record to redirect video.* name to an internal ip solved that problem.