Open NeptuneHub opened 3 weeks ago
Please provide an example folder structure and sorting order with which this can be reproduced. This probably depends on what else is present in the folder, not just the file to be opened.
Note: in fileUtils.ts
in genFileInfo()
it's problematic to test any field to be numeric (castable to Number
) and then converting it to number. Whether or not this is the case here (steps to reproduce inadequate), I can see, that this leads to problems if the basename
attribute happens to be a file or folder name which resembles a number (i.e. "123"). When casted to type Number
later comparisons in sort functions will fail due to Number
not implementing localCompare()
. Whatever the steps to reproduce are here, genFileInfo()
should be more specific/careful when converting types from the server responses.
Side note: this is an error in the Viewer app (which has its own issue tracker).
Hi, The folder Camera was directly in the root of my admin account, so I had something like: /data/admin/files/Camera
the file in it was photo and video uploaded from an android smartphone, so this is some filename example (are underd of file, so is difficult to report everyone):
-rwxrwx--- 1 www-data www-data 6491196 Sep 6 05:08 IMG_20240906_070857474.jpg -rwxrwx--- 1 www-data www-data 6058092 Sep 6 05:09 IMG_20240906_070858248.jpg -rwxrwx--- 1 www-data www-data 6113377 Sep 6 05:09 IMG_20240906_070858889.jpg -rwxrwx--- 1 www-data www-data 6067141 Sep 6 05:09 IMG_20240906_070859471.jpg -rwxrwx--- 1 www-data www-data 5252887 Sep 6 05:09 IMG_20240906_070900281.jpg -rwxrwx--- 1 www-data www-data 3598502 Sep 6 20:01 IMG_20240906_220100824.jpg -rwxrwx--- 1 www-data www-data 3708989 Sep 6 21:41 IMG_20240906_234116201.jpg -rw-rw-r-- 1 www-data www-data 4016992 Sep 8 07:24 IMG_20240908_092414773_HDR.jpg -rw-r--r-- 1 www-data www-data 5103377 Sep 8 14:45 IMG_20240908_164526358.jpg -rw-r--r-- 1 www-data www-data 2545943 Sep 8 14:45 IMG_20240908_164540399.jpg -rw-r--r-- 1 www-data www-data 4194684 Sep 8 14:46 IMG_20240908_164603386.jpg -rw-r--r-- 1 www-data www-data 3165621 Sep 8 14:46 IMG_20240908_164620841_HDR.jpg -rw-r--r-- 1 www-data www-data 3491388 Sep 8 14:46 IMG_20240908_164628269_HDR.jpg -rw-r--r-- 1 www-data www-data 2620522 Sep 9 16:17 IMG_20240909_181728171_HDR.jpg -rw-r--r-- 1 www-data www-data 3651992 Sep 9 16:19 IMG_20240909_181932709_HDR.jpg -rw-r--r-- 1 www-data www-data 2809257 Sep 9 16:19 IMG_20240909_181949856_HDR.jpg -rwxrwx--- 1 www-data www-data 138121755 Nov 28 2023 VID_20231128_112153160.mp4 -rwxrwx--- 1 www-data www-data 95770954 Nov 28 2023 VID_20231128_112404456.mp4 -rwxrwx--- 1 www-data www-data 160584884 Dec 2 2023 VID_20231202_224916058~2.mp4
trying to disinstall and reinstall it didn't solve the problem.
Instead I solved he problem (for now) by cancelling the folder, creating a new one with the name "Foto" and then re-upload everything from the smartphone.
Maybe there was one file that create this problem that I didn't re-create by uploading everything from zero?
If the problem re-apper I'll check better filename.
⚠️ This issue respects the following points: ⚠️
Bug description
From PC (windows) /Smartphone (Android) chrome browser, only on the directory /Camera of user admin, I can see the image/video in the folder (the thumbs) but when I click on it to expand I have a black windows and the error below.
Image/video in other folder of the same user are ok. Image/video in other folder of other user are ok. Priviledge and ownership of the image/video seems the same of both image viewed and not viewed: -rwxrwxr-x 1 www-data www-data
The same image/video on Android app is open without any problem.
I try by deleting nextcloud, reinstalling it, re-put the image folder in it, re-create the previwe, but the problem persist. I try by deleting the chrome cache, by opening an incognito windows, but the problem persist.
The folder is the main folder with a big number of photo and video, but I have another user with another big folder that don't have this problem. So I'm not recognizing any pattern for now.
Logs and error
Chrome console log (error):
Chrome network log (seems not error in it):
Describe your Environment
Kubernetes distribution: K3S with 3 node, 1 Raspberry PI 5 (ARM) and 2 intel i5 node. Nextcloud run on the Raspberry PI 5.
Helm Version (or App that manages helm):
Helm Chart Version: version.BuildInfo{Version:"v3.15.2", GitCommit:"1a500d5625419a524fdae4b33de351cc4f58ec35", GitTreeState:"clean", GoVersion:"go1.22.4"}
values.yaml:
nodeSelector: kubernetes.io/hostname: ubuntu1
Number of replicas to be deployed
replicaCount: 1 ingress: enabled: true className: traefik annotations: cert-manager.io/cluster-issuer: letsencrypt-production acme.cert-manager.io/http01-edit-in-place: "true" tls:
nginx: enabled: false image: repository: nginx tag: alpine pullPolicy: IfNotPresent containerPort: 80 persistence: enabled: true annotations: {} storageClass: "manual" #"smb" #"local-path" existingClaim: nextcloud-config-pvc nextcloudData: enabled: true annotations: {} storageClass: "manual" existingClaim: nextcloud-server-pvc
phpClientHttpsFix: enabled: true protocol: https
resources: requests: memory: "512Mi" # Start with a conservative estimate cpu: "500m" # This is 0.5 CPU core limits: memory: "2Gi" # Allow up to 2 GiB of memory usage cpu: "1500m" # Allow up to 2 CPU cores
startupProbe: enabled: true initialDelaySeconds: 120 failureThreshold: 50
lifecycle: postStartCommand: ["/bin/bash", "-c", "apt update -y && apt install ffmpeg -y"]
<?php $CONFIG = array ( 'htaccess.RewriteBase' => '/', 'memcache.local' => '\OC\Memcache\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'overwriteprotocol' => 'https', 'upgrade.disable-web' => true, 'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'trusted_domains' => array ( 0 => 'localhost', 1 => '',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'sqlite3',
'version' => '29.0.6.1',
'overwrite.cli.url' => 'https://localhost',
'dbname' => 'nextcloud',
'installed' => true,
'instanceid' => 'oc1fa7yyp42d',
'memories.db.triggers.fcu' => true,
'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-aarch64-glibc',
'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-aarch64',
'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
'memories.vod.ffprobe' => '/usr/bin/ffprobe',
'enable_previews' => true,
'jpeg_quality' => '60',
'preview_max_x' => '1024',
'preview_max_y' => '1024',
'preview_max_scale_factor' => 1.5,
'enabledPreviewProviders' =>
array (
0 => 'OC\Preview\MP3',
1 => 'OC\Preview\TXT',
2 => 'OC\Preview\MarkDown',
3 => 'OC\Preview\OpenDocument',
4 => 'OC\Preview\Krita',
5 => 'OC\Preview\Imaginary',
6 => 'OC\Preview\PDF',
7 => 'OC\Preview\Movie',
8 => 'OC\Preview\MKV',
9 => 'OC\Preview\MP4',
10 => 'OC\Preview\AVI',
11 => 'OC\Preview\JPEG',
12 => 'OC\Preview\PNG',
13 => 'OC\Preview\GIF',
14 => 'OC\Preview\BMP',
15 => 'OC\Preview\XBitmap',
16 => 'OC\Preview\HEIC',
17 => 'OC\Preview\TIFF',
18 => 'OC\Preview\Image',
19 => 'OC\Preview\FFmpeg',
),
'preview_ffmpeg_path' => '/usr/bin/ffmpeg',
'preview_imaginary_url' => 'http://imaginary.imaginary.svc.cluster.local:9000',
'filelocking.enabled' => false,
'allow_local_remote_servers' => true,
'memories.ffmpeg_path' => '/usr/bin/ffmpeg',
'loglevel' => 0,
'maintenance' => false,
);