Thesola10 / nextcloud-nextframe

Nextframe, embeddable Nextcloud UI
https://apps.nextcloud.com/apps/nextframe
2 stars 0 forks source link

iframe resizer error #7

Open Fuseteam opened 2 weeks ago

Fuseteam commented 2 weeks ago

i added iframe resizer to my site using https://iframe-resizer.com/setup/parent/ but i seem to get this error in

firefox console log:

TypeError: window.parentIFrame is undefined
    n iframe-resizer.js:48
    n iframe-resizer.js:47
    IntersectionCallback* iframe-resizer.js:45
    <anonymous> nextframe-iframe-resizer.js:1
    <anonymous> nextframe-iframe-resizer.js:1
[lockdown-install.js:1:97687](moz-extension://5cb4d2a6-c71f-445f-bd80-3f183a7ea83a/scripts/lockdown-install.js)
    functors moz-extension://5cb4d2a6-c71f-445f-bd80-3f183a7ea83a/scripts/lockdown-install.js:1
    (Async: EventListener.handleEvent)
    functors moz-extension://5cb4d2a6-c71f-445f-bd80-3f183a7ea83a/scripts/lockdown-install.js:1
    functors moz-extension://5cb4d2a6-c71f-445f-bd80-3f183a7ea83a/scripts/lockdown-install.js:1
    lockdown moz-extension://5cb4d2a6-c71f-445f-bd80-3f183a7ea83a/scripts/lockdown-install.js:1
    <anonymous> moz-extension://5cb4d2a6-c71f-445f-bd80-3f183a7ea83a/scripts/lockdown-run.js:4

chrome console log:

Uncaught TypeError: Cannot read properties of undefined (reading 'size')
    at iframe-resizer.js:19:25
    at Array.forEach (<anonymous>)
    at IntersectionObserver.<anonymous> (iframe-resizer.js:47:17)

on the site i added it as follows:

<script src="https://cdn.jsdelivr.net/npm/@iframe-resizer/parent"></script>
<script>iFrameResize({license: 'GPLv3', waitForLoad:true}, "#nextframe")</script>

but peculairly even if i don't add these lines, the error pops up, it seems to originate from the iframe-resizer webpack, could it be the child module?

Fuseteam commented 2 weeks ago

hmmm upon closer inspection, i seem to be missing parentIframe for some reason

Thesola10 commented 2 weeks ago

This looks to me like the parent module failed to attach, or the API has changed. Try removing waitForLoad?

Fuseteam commented 2 weeks ago

hmmm removing waitForLoad did not make a difference

Fuseteam commented 2 weeks ago

I found something, tho i am unsure how to test it quickly https://iframe-resizer.com/troubleshooting/#parentiframe-not-found-errors

Fuseteam commented 2 weeks ago

weird question @Thesola10 i noticed in the documentation it says parentIframe but in https://github.com/Thesola10/nextcloud-nextframe/blob/master/src/iframe-resizer.js#L65 it says parentIFrame could that be the cause?

Thesola10 commented 2 weeks ago

You can try changing it and rebuilding with make

Fuseteam commented 2 weeks ago

how would i test my build in my nextcloud instance?

Fuseteam commented 2 weeks ago

i managed to get a browser console in the nextframe iframe— parentIframe also does not exist. only iFrameResize seems to exist.