Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAW photos are not displayed with infinite spinner #1450

Open
andreybavt opened this issue Nov 7, 2022 · 19 comments · May be fixed by #2099 or #1456
Open

RAW photos are not displayed with infinite spinner #1450

andreybavt opened this issue Nov 7, 2022 · 19 comments · May be fixed by #2099 or #1456
Labels
3. to review Waiting for reviews bug Something isn't working

Comments

@andreybavt
Copy link

Describe the bug
When opening a RAW photo from "Files" menu there's an infinite spinner instead of preview.
When navigating back/forward and back the photo preview loads fine

Camera raw previews app is installed and thumbnails appear fine.

Tested with NEF files, for example:
https://github.com/ariselseng/camerarawpreviews/files/9942647/infrared.nef.zip

There's no problem with JPGs, they can be opened directly

To Reproduce
Steps to reproduce the behavior:

  1. Go to Files -> Raw photo location
  2. Click on a photo thumbnail
  3. See infinite spinner

Expected behavior
Photo preview opens

Screenshots
image
image

Desktop (please complete the following information):

  • OS: MacOS 12.6
  • Browser chrome
  • Version 107.0.5304.87

Additional context
This issue is also reported in the camerarawpreviews repo:
ariselseng/camerarawpreviews#86

But it doesn't seem to be a camerarawpreviews problem because with back-forward navigation the preview does appear

@andreybavt andreybavt added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Nov 7, 2022
@jkhsjdhjs
Copy link

As I already wrote in ariselseng/camerarawpreviews#86, v24.0.3 is the last known-good version. All later versions of the v24 branch are affected. I assume that this commit is the culprit: e2c4801

@skjnldsv
Copy link
Member

skjnldsv commented Nov 8, 2022

Hello!
I will need your browser console log to investigate this issue.
Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.

How to access your browser console (Click to expand)

Chrome

  • Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools.
  • Alternative method:
    1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
    2. Click the “console” tab.

Safari

  • Press CMD + ALT + I to open the Web Inspector.
  • See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.)

IE9

  1. Press F12 to open the developer tools.
  2. Click the “console” tab.

Firefox

  • Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs).
  • or, if Firebug is installed (recommended):
    1. Press F12 to open Firebug.
    2. Click on the “console” tab.

Opera

  1. Press CTRL + SHIFT + I to open Dragonfly.
  2. Click on the “console” tab.

@skjnldsv skjnldsv added the needs info Not enough information provided label Nov 8, 2022
@D34DC3N73R
Copy link

at the bottom of hundreds of deprecation warnings is the action of clicking on a raw photo for a preview on Windows 11 - Chrome 107.0.5304.88
nextcloud.domain.tld-1667934344266.log

@andreybavt
Copy link
Author

@skjnldsv

as @D34DC3N73R said there's a ton of

The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.

I filtered them out, here's what's left in the console log:

192.168.10.120/:1 Refused to apply style from 'https://192.168.10.120:8283/apps/contacts/css/icons.css?v=19bbdecf-0' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 3.4.0
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
major.js:2 Proxying an event bus of version 2.1.1 with 1.3.0
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.0
index.esm.js:11 Proxying an event bus of version 2.1.1 with 3.0.2
index.esm.js:11 Proxying an event bus of version 2.1.1 with 3.0.2
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.2
ProxyBus.ts:16 Proxying an event bus of version 2.1.1 with 3.0.2
ProxyBus.ts:16 Proxying an event bus of version 2.1.1 with 3.0.2
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.0
ProxyBus.js:74 Proxying an event bus of version 2.1.1 with 1.2.0
ProxyBus.ts:11 Proxying an event bus of version 2.1.1 with 3.0.2
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
ConsoleLogger.js:60 [WARN] viewer: Some mimes were ignored because they are not enabled in the server previews config {level: 2, app: 'viewer', uid: 'ncadmin', ignoredMimes: Array(1)}
index.esm.js:11 Proxying an event bus of version 2.1.1 with 3.0.2
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.2
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.2
index.esm.js:11 Proxying an event bus of version 2.1.1 with 3.0.2
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.2
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
ProxyBus.ts:16 Proxying an event bus of version 2.1.1 with 3.0.2
ProxyBus.ts:16 Proxying an event bus of version 2.1.1 with 3.0.2
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
NotificationsApp.vue:461 Notifications permissions not yet requested
index.es.js:2337 Proxying an event bus of version 2.1.1 with 1.3.0
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.0
session-heartbeat.js:103 session heartbeat polling started
index.js:19 Proxying an event bus of version 2.1.1 with 3.0.2
xhr.js:220          GET https://192.168.10.120:8283/ocs/v2.php/apps/text/workspace?path=%2FPhotos 404

I find it weird that there's this message:

ConsoleLogger.js:60 [WARN] viewer: Some mimes were ignored because they are not enabled in the server previews config {level: 2, app: 'viewer', uid: 'ncadmin', ignoredMimes: Array(1)}

the ignoredMimes contains ['image/tiff'] which is weird because this is what I have in my /usr/local/www/nextcloud/apps/photos/lib/AppInfo/Application.php:

image

@D34DC3N73R
Copy link

I don't have image/tiff in the array (default install). However, since the image previews do in fact load when pressing next/previous, I'm not sure that's the root cause of this issue.

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

the ignoredMimes contains ['image/tiff'] which is weird because this is what I have in my /usr/local/www/nextcloud/apps/photos/lib/AppInfo/Application.php:

It means your previews config is not including tiff.
https://github.com/nextcloud/server/blob/0dabc6abc6fe203b5126a6f4fc33ddb55cfd41ea/config/config.sample.php#L1202-L1247
https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

the ignoredMimes contains ['image/tiff'] which is weird because this is what I have in my /usr/local/www/nextcloud/apps/photos/lib/AppInfo/Application.php:

You should not edit php files.
You will actually break Viewer if you add custom mimes there.

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

I filtered them out, here's what's left in the console log:

Did you pen a raw file?
Open the console, then try to open the raw file so we can see the viewer logs.
Please make sure you also have verbose enabled in the console filters (same location where you filtered out warnings.
image

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

at the bottom of hundreds of deprecation warnings is the action of clicking on a raw photo for a preview on Windows 11 - Chrome 107.0.5304.88 nextcloud.domain.tld-1667934344266.log

It seems you're indeed opening the file, but there is no errors.
ConsoleLogger.js:33 [INFO] viewer: Opening viewer for file {app: 'viewer', uid: 'admin_user', path: '/path/where/raw/files/are/DSC00687.ARW'}, app: "viewer", path: "/path/where/raw/files/are/DSC00687.ARW"

I will need a screenshot of your network requests.
Before you do anything, still on the development tools, there is a tab called network. Click on it, do your action and screenshot the network log like this. Do not select any filters, leave it on all, make sure to scroll to the bottom before the screenshot
capture d ecran_2018-09-27_21-49-46

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

And thank you all for helping narrowing this down :)

@andreybavt
Copy link
Author

andreybavt commented Nov 9, 2022

the ignoredMimes contains ['image/tiff'] which is weird because this is what I have in my /usr/local/www/nextcloud/apps/photos/lib/AppInfo/Application.php:

You should not edit php files. You will actually break Viewer if you add custom mimes there.

I was trying different combinations in Application.php in order to make NEFs appear in Photos app, in the end applying this change (mentioned in this discussion) helped:
https://github.com/nextcloud/photos/pull/844/files

@andreybavt
Copy link
Author

@skjnldsv thanks for investigating!

Here's what I have when opening this URL:
/apps/files/?dir=/NEF&openfile=32475

image

here's a full console log with Verbose level on:
192.168.10.120-1667984035958.log

... and with some filtering:
image

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

Weird, it fetched the preview and it seems the request completed properly! 🤔
image

@andreybavt
Copy link
Author

indeed, the preview that it feched also has a correct size, so it's not just a thumbnail:
image

I don't know if you tried to reproduce it, but normally with the demo infrared.nef file that I attached in the beginning you should be able to do it

@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

I can reproduce, I'm investigating.
Thank you all!

@skjnldsv skjnldsv added 2. developing Work in progress and removed needs info Not enough information provided 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Nov 9, 2022
@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

#1273 broke it

@skjnldsv skjnldsv linked a pull request Nov 9, 2022 that will close this issue
@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 9, 2022
@skjnldsv
Copy link
Member

skjnldsv commented Nov 9, 2022

If anyone know how to manually patch their instance, feel free to try #1456

@dan-r
Copy link

dan-r commented May 24, 2023

Are there any updates on when this will make it into a release/beta? It's been an issue for a while now, happy to help out with testing if needed. The patch worked for me on 26 but upon updating to 27 it's broken again.

@ariselseng
Copy link
Member

@skjnldsv Is there anything I can do to fix my app with Viewer?
Some years ago you helped set this up: https://github.com/ariselseng/camerarawpreviews/blob/master/js/register-viewer.js
Is this correct use of the registerHandler API?

@dan-r dan-r linked a pull request Dec 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants