question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embedding etherpad-lite without cookies?

See original GitHub issue

name: Feature request about: Suggest an idea for this project title: Embedding etherpad-lite without cookies? labels: enhancement assignees:


Is your feature request related to a problem? Please describe.

I am using etherpad-lite as an integration widget in Matrix/element. Thus etherpad-lite (provided by some external service provider, e.g. pad.disroot.org) is embedded via iframe into the website.

Sadly this fails to work, if the browser is configured to block 3rd party cookies.

Privacy oriented browsers (Tor browser, Brave) block 3rd party cookies by default.

Since March 2020 even Safari blocks 3rd party cookies by default. The announcement also contains some hints, how services can handle this change.

Thus it will probably become harder and harder to embed etherpad-lite into external websites. This would be a pity.

Describe the solution you’d like

I can image the following ways to work around the 3rd party cookie blocking:

  • A) use the Storage Access API instead
  • B) gracefully ignore cookie rejections (not storing a session)

But I have little knowledge in this field. Thus feel free to ignore my suggestions.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
luukschipperheyncommented, Mar 14, 2022

I encountered the same problem. An etherpad in an iframe on safari would fail to load because of an unhandled promise rejection:

TypeError: null is not an object (evaluating 'this.readPrefs_()[e]') -- {
  errorId: 'zztHuOF6QUx2ckIIep3v',
  type: 'Unhandled Promise rejection',
  msg: "TypeError: null is not an object (evaluating 'this.readPrefs_()[e]')",
  url: 'https://redacted/p/testpad',
  source: 'unknown',
  linenumber: -1,
  userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15',
  stack: 'getPref@https://[redacted]/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define&v=64b43bca:13:756\n' +
    '@https://[redacted]/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define&v=64b43bca:1:6216\n' +
    'promiseReactionJob@[native code]'
}

I don’t have time atm to make a proper pull request but here’s how I fixed it. in src/static/js/pad_cookie.js I changed getPref and setPref to handle cases where readPrefs would return null:

  getPref(prefName) {
    console.log('getPref', prefName);
    const prefs = this.readPrefs_()
    return prefs ? prefs[prefName] : null;
  }

  setPref(prefName, value) {
    const prefs = this.readPrefs_();
    if(!prefs) {return}
    prefs[prefName] = value;
    this.writePrefs_(prefs);
  }
1reaction
ptandlercommented, Sep 21, 2021

hm, reopen again …?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
Embedding etherpad-lite without cookies ?
Read more >
Etherpad Lite v1.2.1 Manual & Documentation
We use a language cookie to save your language settings if you change them. ... You can easily embed your etherpad-lite into any...
Read more >
Embedding EtherPad form into Quicktabs "You do not ... - Drupal
I ran the same problem and finded out that the frame in the web editor page needs to find the cookie sessionID from...
Read more >
Embedding the board.net boards stopped working on Chrome
--POPUP-- Warning: it appears that your browser does not have cookies enabled. EtherPad uses cookies to keep track of unique users for the ......
Read more >
Etherpad Lite - Moodle plugins directory
Hi, i installed etherpad.lite ob an ubuntu machine and its working (Plugins: draw, fileupload). Your Ehterpad plugin in moodle 3.11+ is installed without...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found