LocalStorage wiped by Brave Browser when run with IFrame API

TL;DR; Brave Browser users lose saved settings on browser restart if Jitsi loaded using IFrame. This matters because not only is it inconvenient for users, lost of tracking data could have financial impact for those paying for MAU.


I was chasing a user report that Virtual Backgrounds weren’t being persisted, and the investigation led us a potentially much wider issue – Brave Browser appears to be wiping out Local Storage written by Jitsi Meet when run within an IFrame.

Anyone else see this issue?
(Or am I doing something silly with the setup?)

Repro:

  1. From Brave Browser, load jitsi using IFrame API. Here’s the example I used: Test Meet
  2. Set name, virtual background, settings, etc.
  3. Join then leave meeting
  4. Restart Brave Browser
  5. Load same page.
  6. Observations:
    • Virtual background, settings, name etc no longer applied
    • In devtools > Application > Local Storage > `https://meet.jit.si, we see that all the values are reset (including jitsiMeetId which I presume is what JaaS uses for user tracking)

In case it makes a difference, I’m using Brave 1.32.115 on Mac 12.0.1.

Also worth noting that everything works as expected if I disable Brave shield.

In fact, if I disable brave shield I immediately inherit jitsi settings I use on the main meet.jit.si site (without IFrame). This leads me to believe it is down to how Brave enforces Ephemeral Storage – Jitsi runing in iFrame is considered third-party content and gets store in partitioned storage which gets wiped on browser restart.

You can try setting this config override: jitsi-meet/config.js at bf3cc65f4c1697bd7cd45b63fe78025c4b7622f6 · jitsi/jitsi-meet · GitHub

1 Like

Awesome! That does seem to work :slight_smile: . Many thanks.

Is that feature enabled by default on JaaS? Or is this generally a non-issue?

This option is part of Jitsi Meet itself. It’s automatically enabled when we detect localStorage is not usable, Safari throws exceptions in certain cases for example. In your case you need to enable it manually because there is no way for us to detect / know that the storage will be discarded.

1 Like