otetard / ownpad

Ownpad is a Nextcloud application that allows to create and open Etherpad and Ethercalc documents.
GNU Affero General Public License v3.0
57 stars 24 forks source link

SecurityError: Blocked a frame with origin "https://etherpad.acme.com" from accessing a cross-origin frame. #121

Closed m0urs closed 10 months ago

m0urs commented 1 year ago

I am quite sure my Etherpad integration into Nextcloud has been working for some time and maybe one of the last updates of Nextcloud broke it.

I can succesfully create a new pad (either public or protected). However, if I try to open it, I get the following error message in a red box:

An error occurred
Please press and hold Ctrl and press F5 to reload this page

If the problem persists, please send this error message to your webmaster:

SecurityError: Blocked a frame with origin "https://etherpad.acme.com" from accessing a cross-origin frame.
at unknown at line -1
ErrorId: jhApKeMjo1NzDQWEWFtx
Unhandled Promise rejection
URL: https://etherpad.acme.com/p/g.xxxxxxxxxxxxxxxxxxxxxxx
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.46

In the Etherpad log there is the following error message:

'Error: Blocked a frame with origin "https://etherpad.acme.com" from accessing a cross-origin frame.
        at exports.aceSelectionChanged [as hook_fn] (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:48:41)
        at callHookFnSync (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:12803:16)
        at eval (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:12876:54)
        at Array.map (<anonymous>)
        at exports.callAll (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:12876:25)
        at repSelectionChange (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:2016:13)
        at performSelectionChange (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:1987:9)
        at setDocAText (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:540:5)
        at setDocText (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:551:5)
        at eval (eval at <anonymous> (https://etherpad.acme.com/static/js/require-kernel.js?v=10e36018:1:1), <anonymous>:485:7)'

Nextcloud Version: 25.0.3 Etherpad Version: 1.8.18 Ownpad Version: 0.7.1

In Nextcloud I have the following settings for Ownpad:

Etherpad Host: https://etherpad.acme.com Etherpad API enabled and the correct API key configured Etherpad Cookie domain: "acme.com"

My Etherpad instance is running with the URL: https://etherpad.acme.com My Nextcloud instance is running with the URL: https://nextcloud.acme.com

I also disabled all security restrictions I had configured in my Apache CONF files for both instances but without success.

I appreciate any hint what is going wrong here.

otetard commented 10 months ago

Can you check if you still encounter this issue with the latest version of Ownpad (0.8.1) please?

otetard commented 10 months ago

This seems to be a configuration issue related to Etherpad rather than Ownpad.

m0urs commented 10 months ago

It is still not working. Unfortunately I have no idea what kind of configuration error it could be. It did work earlier and stopped suddenly with a new version of Nextcloud or Ownpad. It does work stand alone (outside of Nextcloud).