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

[BUG] Inaccessible files after reboot #576

Closed
Xelarmen opened this issue Mar 20, 2024 · 7 comments
Closed

[BUG] Inaccessible files after reboot #576

Xelarmen opened this issue Mar 20, 2024 · 7 comments

Comments

@Xelarmen
Copy link

Xelarmen commented Mar 20, 2024

After running the application on Docker, I make user configurations. As an example, I am uploading a few files. Then I reboot the host machine. I can log in to the application, it lists the files without thumbnail, but I cannot access the files from the Web UI. The files are physically in the uploads folder.

Response:
{"message":"Route GET://SuIHeG73qDgO.zip not found","error":"Not Found","statusCode":404}

Docker log:

2024-03-20 15:21:06 Prisma schema loaded from src/prisma/schema.prisma
2024-03-20 15:21:06 Datasource "db": SQLite database "database.sqlite" at "file:../../../../database/database.sqlite"
2024-03-20 15:21:06 
2024-03-20 15:21:06 10 migrations found in prisma/migrations
2024-03-20 15:21:06 
2024-03-20 15:21:06 
2024-03-20 15:21:06 No pending migrations to apply.
2024-03-20 15:21:07 Prisma schema loaded from src/prisma/schema.prisma
2024-03-20 15:21:07 
2024-03-20 15:21:07 ✔ Generated Prisma Client (v5.9.1) to ./../../node_modules/@prisma/client in 156ms
2024-03-20 15:21:07 
2024-03-20 15:21:07 Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
2024-03-20 15:21:07 ```
2024-03-20 15:21:07 import { PrismaClient } from '@prisma/client'
2024-03-20 15:21:07 const prisma = new PrismaClient()
2024-03-20 15:21:07 ```
2024-03-20 15:21:07 or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
2024-03-20 15:21:07 ```
2024-03-20 15:21:07 import { PrismaClient } from '@prisma/client/edge'
2024-03-20 15:21:07 const prisma = new PrismaClient()
2024-03-20 15:21:07 ```
2024-03-20 15:21:07 
2024-03-20 15:21:07 See other ways of importing Prisma Client: http://pris.ly/d/importing-client
2024-03-20 15:21:07 
2024-03-20 15:21:07 ┌─────────────────────────────────────────────────────────────┐
2024-03-20 15:21:07 │  Deploying your app to serverless or edge functions?        │
2024-03-20 15:21:07 │  Try Prisma Accelerate for connection pooling and caching.  │
2024-03-20 15:21:07 │  https://pris.ly/cli/accelerate                             │
2024-03-20 15:21:07 └─────────────────────────────────────────────────────────────┘
2024-03-20 15:21:07 
2024-03-20 15:21:10 Prisma schema loaded from src/prisma/schema.prisma
2024-03-20 15:21:10 Datasource "db": SQLite database "database.sqlite" at "file:../../../../database/database.sqlite"
2024-03-20 15:21:10 
2024-03-20 15:21:10 10 migrations found in prisma/migrations
2024-03-20 15:21:10 
2024-03-20 15:21:10 
2024-03-20 15:21:10 No pending migrations to apply.
2024-03-20 15:21:11 Prisma schema loaded from src/prisma/schema.prisma
2024-03-20 15:21:12 
2024-03-20 15:21:12 ✔ Generated Prisma Client (v5.9.1) to ./../../node_modules/@prisma/client in 139ms
2024-03-20 15:21:12 
2024-03-20 15:21:12 Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
2024-03-20 15:21:12 ```
2024-03-20 15:21:12 import { PrismaClient } from '@prisma/client'
2024-03-20 15:21:12 const prisma = new PrismaClient()
2024-03-20 15:21:12 ```
2024-03-20 15:21:12 or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
2024-03-20 15:21:12 ```
2024-03-20 15:21:12 import { PrismaClient } from '@prisma/client/edge'
2024-03-20 15:21:12 const prisma = new PrismaClient()
2024-03-20 15:21:12 ```
2024-03-20 15:21:12 
2024-03-20 15:21:12 See other ways of importing Prisma Client: http://pris.ly/d/importing-client
2024-03-20 15:21:12 
2024-03-20 15:21:12 ┌─────────────────────────────────────────────────────────────┐
2024-03-20 15:21:12 │  Deploying your app to serverless or edge functions?        │
2024-03-20 15:21:12 │  Try Prisma Accelerate for connection pooling and caching.  │
2024-03-20 15:21:12 │  https://pris.ly/cli/accelerate                             │
2024-03-20 15:21:12 └─────────────────────────────────────────────────────────────┘
2024-03-20 15:21:12 
2024-03-20 15:21:12 [12:21:12.868] INFO (336): Running Chibisafe v5.6.3
2024-03-20 15:21:13 [12:21:13.049] WARN (336): Found route without URL or METHOD - dist/routes/admin/files/Unzip.js
2024-03-20 15:21:13 [12:21:13.119] WARN (336): Found route without URL or METHOD - dist/routes/album/ZipAlbum.js
2024-03-20 15:21:13 [12:21:13.191] INFO (336): Server listening at http://0.0.0.0:8000
2024-03-20 15:21:13 [12:21:13.903] INFO (336): No updates available
2024-03-20 15:21:17 [12:21:17.004] INFO (336): GET / 200 4ms 172.17.0.1 
2024-03-20 15:21:18 [12:21:18.111] INFO (336): GET /api/user/me 200 10ms 172.17.0.1 
2024-03-20 15:21:18 [12:21:18.135] INFO (336): GET /favicon.ico 200 1ms 172.17.0.1 
2024-03-20 15:21:18 [12:21:18.255] INFO (336): GET /api/user/me 200 4ms 172.17.0.1 
2024-03-20 15:21:18 [12:21:18.270] INFO (336): GET /api/albums 200 6ms 172.17.0.1 
2024-03-20 15:21:19 [12:21:19.798] INFO (336): GET /api/files?page=1&limit=50 200 5ms 172.17.0.1 
2024-03-20 15:21:19 [12:21:19.906] INFO (336): GET /api/files?page=1&limit=50 200 5ms 172.17.0.1 
2024-03-20 15:21:19 [12:21:19.958] INFO (336): GET /api/tags 200 4ms 172.17.0.1 
2024-03-20 15:21:19 [12:21:19.973] INFO (336): Route GET://thumbs/Rn9gkcExGD2Y.webp not found
2024-03-20 15:21:19 [12:21:19.973] INFO (336): GET //thumbs/Rn9gkcExGD2Y.webp 404 1ms 172.17.0.1 
2024-03-20 15:21:19 [12:21:19.974] INFO (336): Route GET://thumbs/ksw2NMYnske8.webp not found
2024-03-20 15:21:19 [12:21:19.974] INFO (336): GET //thumbs/ksw2NMYnske8.webp 404 1ms 172.17.0.1 
2024-03-20 15:21:19 [12:21:19.975] INFO (336): Route GET://thumbs/z7gy5WvCUig7.webp not found
2024-03-20 15:21:19 [12:21:19.975] INFO (336): GET //thumbs/z7gy5WvCUig7.webp 404 1ms 172.17.0.1 
2024-03-20 15:21:20 [12:21:20.921] INFO (336): GET /api/file/bd1937e0-a839-4e1d-9b1a-658cf6324c1a 200 4ms 172.17.0.1 
2024-03-20 15:21:20 [12:21:20.960] INFO (336): Route GET://YRBiawnXcq4a.wav not found
2024-03-20 15:21:20 [12:21:20.960] INFO (336): GET //YRBiawnXcq4a.wav 404 1ms 172.17.0.1 
2024-03-20 15:21:21 [12:21:21.995] INFO (336): Route GET://YRBiawnXcq4a.wav not found
2024-03-20 15:21:21 [12:21:21.996] INFO (336): GET //YRBiawnXcq4a.wav 404 2ms 172.17.0.1 
2024-03-20 15:21:25 [12:21:25.211] INFO (336): GET /api/file/39e30bb3-7f07-4443-9b74-b1a7e59f4b06 200 4ms 172.17.0.1 
2024-03-20 15:21:25 [12:21:25.976] INFO (336): Route GET://GOJNHbA83R0a.zlib not found
2024-03-20 15:21:25 [12:21:25.976] INFO (336): GET //GOJNHbA83R0a.zlib 404 1ms 172.17.0.1 
2024-03-20 15:21:34 [12:21:34.479] INFO (336): GET /dashboard/uploads 200 1ms 172.17.0.1 
2024-03-20 15:21:39 [12:21:39.906] INFO (336): POST /api/auth/login 200 97ms 172.17.0.1 
2024-03-20 15:21:40 [12:21:40.142] INFO (336): GET /api/admin/service/updateCheck 200 4ms 172.17.0.1 
2024-03-20 15:21:40 [12:21:40.144] INFO (336): GET /api/files?page=1&limit=50 200 6ms 172.17.0.1 
2024-03-20 15:21:40 [12:21:40.360] INFO (336): GET /api/files?page=1&limit=50 200 4ms 172.17.0.1 
2024-03-20 15:21:42 [12:21:42.249] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 7ms 172.17.0.1 
2024-03-20 15:21:42 [12:21:42.360] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 7ms 172.17.0.1 
2024-03-20 15:21:42 [12:21:42.406] INFO (336): GET /api/tags 200 3ms 172.17.0.1 
2024-03-20 15:21:42 [12:21:42.419] INFO (336): Route GET://thumbs/z7gy5WvCUig7.webp not found
2024-03-20 15:21:42 [12:21:42.420] INFO (336): GET //thumbs/z7gy5WvCUig7.webp 404 1ms 172.17.0.1 
2024-03-20 15:21:42 [12:21:42.420] INFO (336): Route GET://thumbs/Rn9gkcExGD2Y.webp not found
2024-03-20 15:21:42 [12:21:42.420] INFO (336): GET //thumbs/Rn9gkcExGD2Y.webp 404 1ms 172.17.0.1 
2024-03-20 15:21:42 [12:21:42.421] INFO (336): Route GET://thumbs/ksw2NMYnske8.webp not found
2024-03-20 15:21:42 [12:21:42.421] INFO (336): GET //thumbs/ksw2NMYnske8.webp 404 1ms 172.17.0.1 
2024-03-20 15:21:43 [12:21:43.350] INFO (336): GET /api/albums 200 3ms 172.17.0.1 
2024-03-20 15:21:44 [12:21:44.234] INFO (336): Route GET://SuIHeG73qDgO.zip not found
2024-03-20 15:21:44 [12:21:44.234] INFO (336): GET //SuIHeG73qDgO.zip 404 1ms 172.17.0.1 
2024-03-20 15:22:02 [12:22:02.838] INFO (336): GET /api/tags 200 4ms 172.17.0.1 
2024-03-20 15:22:02 [12:22:02.841] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 6ms 172.17.0.1 
2024-03-20 15:24:32 [12:24:32.283] INFO (336): GET /api/tags 200 4ms 172.17.0.1 
2024-03-20 15:24:32 [12:24:32.285] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 7ms 172.17.0.1 
2024-03-20 15:24:35 [12:24:35.390] INFO (336): POST /api/admin/file/a27f7887-dcd4-4244-a43d-f8d80af9c789/quarantine 200 15ms 172.17.0.1 
2024-03-20 15:24:35 [12:24:35.603] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 5ms 172.17.0.1 
2024-03-20 15:24:35 [12:24:35.776] INFO (336): Route GET://thumbs/z7gy5WvCUig7.webp not found
2024-03-20 15:24:35 [12:24:35.777] INFO (336): GET //thumbs/z7gy5WvCUig7.webp 404 1ms 172.17.0.1 
2024-03-20 15:24:35 [12:24:35.778] INFO (336): Route GET://thumbs/ksw2NMYnske8.webp not found
2024-03-20 15:24:35 [12:24:35.779] INFO (336): GET //thumbs/ksw2NMYnske8.webp 404 1ms 172.17.0.1 
2024-03-20 15:24:35 [12:24:35.779] INFO (336): Route GET://thumbs/Rn9gkcExGD2Y.webp not found
2024-03-20 15:24:35 [12:24:35.780] INFO (336): GET //thumbs/Rn9gkcExGD2Y.webp 404 1ms 172.17.0.1 
2024-03-20 15:24:38 [12:24:38.663] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=true 200 4ms 172.17.0.1 
2024-03-20 15:24:38 [12:24:38.770] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=true 200 4ms 172.17.0.1 
2024-03-20 15:24:39 [12:24:39.564] INFO (336): The file could not be found
2024-03-20 15:24:39 [12:24:39.565] INFO (336): GET /api/file/a27f7887-dcd4-4244-a43d-f8d80af9c789 404 5ms 172.17.0.1 
2024-03-20 15:24:39 [12:24:39.565] INFO (336): GET /api/albums 200 5ms 172.17.0.1 
2024-03-20 15:24:41 [12:24:41.443] INFO (336): Route GET://quarantine/ldzPfPC5hXon.zip not found
2024-03-20 15:24:41 [12:24:41.444] INFO (336): GET //quarantine/ldzPfPC5hXon.zip 404 1ms 172.17.0.1 
2024-03-20 15:24:43 [12:24:43.582] INFO (336): GET /api/tags 200 3ms 172.17.0.1 
2024-03-20 15:24:45 [12:24:45.176] INFO (336): Route GET://quarantine/ldzPfPC5hXon.zip not found
2024-03-20 15:24:45 [12:24:45.176] INFO (336): GET //quarantine/ldzPfPC5hXon.zip 404 1ms 172.17.0.1 
2024-03-20 15:24:56 [12:24:56.534] ERROR (336): 
2024-03-20 15:24:56 Invalid `prisma.files.delete()` invocation:
2024-03-20 15:24:56 
2024-03-20 15:24:56 
2024-03-20 15:24:56 Foreign key constraint failed on the field: `foreign key`
2024-03-20 15:24:56 [12:24:56.534] ERROR (336): Something went wrong
2024-03-20 15:24:56 [12:24:56.535] INFO (336): DELETE /api/admin/file/a27f7887-dcd4-4244-a43d-f8d80af9c789 500 6ms 172.17.0.1 
2024-03-20 15:24:58 [12:24:58.916] INFO (336): The file could not be found
2024-03-20 15:24:58 [12:24:58.917] INFO (336): GET /api/file/a27f7887-dcd4-4244-a43d-f8d80af9c789 404 5ms 172.17.0.1 
2024-03-20 15:24:58 [12:24:58.918] INFO (336): GET /api/albums 200 6ms 172.17.0.1 
2024-03-20 15:25:07 [12:25:07.407] INFO (336): GET /api/tags 200 6ms 172.17.0.1 
2024-03-20 15:25:07 [12:25:07.408] INFO (336): Route GET://thumbs/ksw2NMYnske8.webp not found
2024-03-20 15:25:07 [12:25:07.408] INFO (336): GET //thumbs/ksw2NMYnske8.webp 404 1ms 172.17.0.1 
2024-03-20 15:25:07 [12:25:07.408] INFO (336): Route GET://thumbs/z7gy5WvCUig7.webp not found
2024-03-20 15:25:07 [12:25:07.409] INFO (336): GET //thumbs/z7gy5WvCUig7.webp 404 1ms 172.17.0.1 
2024-03-20 15:25:07 [12:25:07.409] INFO (336): Route GET://thumbs/Rn9gkcExGD2Y.webp not found
2024-03-20 15:25:07 [12:25:07.409] INFO (336): GET //thumbs/Rn9gkcExGD2Y.webp 404 1ms 172.17.0.1 
2024-03-20 15:25:07 [12:25:07.411] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 10ms 172.17.0.1 
2024-03-20 15:25:07 [12:25:07.521] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 6ms 172.17.0.1 
2024-03-20 15:25:12 [12:25:12.061] INFO (336): GET /api/albums 200 3ms 172.17.0.1 
2024-03-20 15:25:13 [12:25:13.757] INFO (336): Route GET://anu0CnRCIfMZ.zlib not found
2024-03-20 15:25:13 [12:25:13.758] INFO (336): GET //anu0CnRCIfMZ.zlib 404 1ms 172.17.0.1 
2024-03-20 15:25:16 [12:25:16.879] INFO (336): GET /api/albums 200 3ms 172.17.0.1 
2024-03-20 15:25:16 [12:25:16.918] INFO (336): Route GET://UZ1OnwAOIIvl.wav not found
2024-03-20 15:25:16 [12:25:16.918] INFO (336): GET //UZ1OnwAOIIvl.wav 404 1ms 172.17.0.1 
2024-03-20 15:25:17 [12:25:17.923] INFO (336): Route GET://UZ1OnwAOIIvl.wav not found
2024-03-20 15:25:17 [12:25:17.924] INFO (336): GET //UZ1OnwAOIIvl.wav 404 1ms 172.17.0.1 
2024-03-20 15:25:33 [12:25:33.643] INFO (336): GET /api/tags 200 3ms 172.17.0.1 
2024-03-20 15:25:33 [12:25:33.644] INFO (336): GET /api/admin/files?page=1&limit=50&publicOnly=false&quarantine=false 200 5ms 172.17.0.1
@Pitu
Copy link
Member

Pitu commented Mar 22, 2024

It seems you have an extra slash somewhere that you configured.
Your logs show that the requests are trying to
Route GET://thumbs/Rn9gkcExGD2Y.webp not found
when it should be
Route GET: /thumbs/Rn9gkcExGD2Y.webp not found

Can you show the first tab of your settings page?

@danielaj28
Copy link

I think I have the same issue, I am running in Docker via NGinx.

Restart get 404 on all thumbnails e.g. https://sub.domain.uk/thumbs/filename.webp
I set the "Serve Uploads From" to "" (blank)
Restart in docker
Still broken
I set the "Serve Uploads From" to "https://sub.domain.uk"
Restart in docker
Fixed and the thumbnails are viewable again, until the next restart.

I just started using this today so I am a bit new. Thanks in advance, it's amazing software.

@Pitu
Copy link
Member

Pitu commented Mar 25, 2024

@danielaj28 could you send the diagnostics file? you can generate it in the settings dashboard. I'd like to have a look

@danielaj28
Copy link

@Pitu Thanks, if you need I can wipe and redo the test with a fresh file and base case to make it clearer.
sub.domain.uk-diagnostics.log

@Pitu
Copy link
Member

Pitu commented Mar 29, 2024

@danielaj28 I went through the logs you submitted, and nothing looks out of the ordinary, so I'm a bit lost as why this could be happening. We're releasing a new major version very very soon, so unless you come across something that could indicate why your settings are not being honored, I would suggest to wait until the next version and try that one instead. I'm really sorry I can't be of more help

@danielaj28
Copy link

@Pitu no worries, I'll retest when the new version is released and then I'll get my dev environment back up and take a look if it's still occurring.

@Pitu
Copy link
Member

Pitu commented May 19, 2024

Feel free to reopen if you continue to have this issue

@Pitu Pitu closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants