nextcloud/files_photospheres

Stuck on loading screen

lukasdietz opened this issue · 5 comments

After installing Photo Sphere Viewer directly from the appstore I wanted to open a picture taken with google camera. I have checked the xmp metadata and added UsePanoramaViewer and ProjectionType with the appropriate values.
After clicking on the image the screen got stuck at a white screen with a loading cycle in the middle.

Nextcloud 24.0.6
Photosphere 1.25.1

Is this a known behaviour or is there a fix available?

R0Wi commented

That's no known behaviour. You should use the app version 1.24.X with NC 24 but that shouldn't make any difference. Could you provide some browser dev console logs and maybe server logs?

I got quite a view warnings and errors when trying to open the picture. These are the errors from dev console:

index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
preview:1          Failed to load resource: the server responded with a status of 404 ()
EditorFactory.js:68 Array(0)length: 0[[Prototype]]: Array(0)
index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
preview:1          Failed to load resource: the server responded with a status of 404 ()
EditorFactory.js:68 Array(1)0: "markdown"length: 1[[Prototype]]: Array(0)
index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
(anonymous) @ index.js:33
(anonymous) @ index.js:14
i @ index.js:5
index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
(anonymous) @ index.js:33
(anonymous) @ index.js:14
i @ index.js:5
core-common.js?v=98658883-49:2 Refused to frame 'http://domain.xyz/' because it violates the following Content Security Policy directive: "frame-src 'self' https://www.openstreetmap.org/ https://collabora.domain.xyz".

fileAction.js?v=98658883-49:207 Uncaught DOMException: Blocked a frame with origin "https://domain.xyz" from accessing a cross-origin frame.
    at HTMLIFrameElement.<anonymous> (https://domain.xyz/apps/files_photospheres/js/fileAction.js?v=98658883-49:207:37)
    at HTMLIFrameElement.dispatch (https://domain.xyz/dist/core-common.js?v=98658883-49:2:5857134)
    at m.handle (https://domain.xyz/dist/core-common.js?v=98658883-49:2:5855129)
(anonymous) @ fileAction.js?v=98658883-49:207
dispatch @ jquery.js:5430
m.handle @ jquery.js:5234
load (async)
add @ jquery.js:5282
(anonymous) @ jquery-migrate.min.js:2
e.<computed> @ jquery-migrate.min.js:2
(anonymous) @ jquery.js:5182
each @ jquery.js:385
each @ jquery.js:207
St @ jquery.js:5181
on @ jquery.js:5906
showFrame @ fileAction.js?v=98658883-49:199
_showImage @ fileAction.js?v=98658883-49:136
showImage @ fileAction.js?v=98658883-49:415
(anonymous) @ fileAction.js?v=98658883-49:47
(anonymous) @ fileAction.js?v=98658883-49:300
l @ jquery.js:3500
fireWith @ jquery.js:3630
_ @ jquery.js:9796
(anonymous) @ jquery.js:10057
load (async)
send @ jquery.js:10076
ajax @ jquery.js:9690
(anonymous) @ jquery-migrate.min.js:2
e.<computed> @ jquery-migrate.min.js:2
O.each.O.<computed> @ jquery.js:9846
_xmpDataBackendRequest @ fileAction.js?v=98658883-49:277
canShow @ fileAction.js?v=98658883-49:391
_actionHandler @ fileAction.js?v=98658883-49:44
action @ merged-index.js?v=98658883-49:3025
_onClickFile @ merged-index.js?v=98658883-49:4986
be @ _executeBound.js:8
(anonymous) @ bind.js:10
(anonymous) @ restArguments.js:16
dispatch @ jquery.js:5430
m.handle @ jquery.js:5234
index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
(anonymous) @ index.js:33
(anonymous) @ index.js:14
i @ index.js:5
index.js:118 WebSocket connection to 'wss://domain.xyz/push/ws' failed: 
(anonymous) @ index.js:118
(anonymous) @ index.js:33
(anonymous) @ index.js:14
i @ index.js:5

There are no obvious errors in the nextcloud logs.

R0Wi commented
fileAction.js?v=98658883-49:207 Uncaught DOMException: Blocked a frame with origin "https://domain.xyz" from accessing a cross-origin frame.

Seems like the iframe is blocked where the viewer is embedded.

Don't know what exactly fixed this issue. But changing from nginx webserver to apache2 did the trick.

R0Wi commented

The error most likely occurred because your webserver sent some restriction headers on how iframes are allowed to be embedded. Could be that the nginx default is more restrictive than apache.

Nice that things are working for you now :-)