LibrePhotos / librephotos

A self-hosted open source photo management service. This is the repository of the backend.
MIT License
6.96k stars 305 forks source link

Bad Request errors #628

Open XcOM987 opened 2 years ago

XcOM987 commented 2 years ago

_backend_logs.txt

🐛 Bug Report

📝 Description of issue:

🔁 How can we reproduce it:

Please provide additional information:

When running I am unable to create an album and see an error in the logs: Bad Request: /api/albums/user/edit/

When running generally I also see errors: Unauthorized: /api/rqavailable/ Unauthorized: /api/jobs/ Unauthorized: /api/sitesettings/ Unauthorized: /api/searchtermexamples/ Unauthorized: /api/sitesettings/

I am running the latest pull for all images, the historical GIT issue I found doesn't state what the issue was and what was done to fix it.

derneuere commented 2 years ago

Right now you will get the unauthorized API sometimes. It just means, that your login key is stale and needs to be refreshed and the web app does this on it's own.

The "Bad Request" is an actual error. Can you look into the ownphotos.log if you see an exception and explain to me how I can reproduce this error?

XcOM987 commented 2 years ago

I have been doing some digging, and that error only happens if I "Select All" photos to add them to an Album, this occurs because it's trying to select some photos which don't exist thus it fails to work, I also get a load of broken thumbnails, it also doesn't show all the photos to add.

If I select them one by one it works fine, I will see if I can dig out them logs for you, in other news I will be migrating this over to a dedicated box soon so it won't be under HyperV as this is just a test platform before I deploy it properly

splattergamesextended commented 2 years ago

Right now you will get the unauthorized API sometimes. It just means, that your login key is stale and needs to be refreshed and the web app does this on it's own.

The "Bad Request" is an actual error. Can you look into the ownphotos.log if you see an exception and explain to me how I can reproduce this error?

I had commented on this issue on the #522 Nextcloud problem. Something is wrong with the Django Rest-Framework I guess. If I try to get any API besides /user or /auth/token/refresh/, there's always a 401 coming back with the message "Authentication credentials were not provided." (e.g. /api/jobs). And my docker log on my Syno looks like this. Either there is some misconfiguration on my side or there's a bug in the code. Nevertheless, can't hook up Nextcloud right now and am just waiting for a fix. apifail

yvovandoorn commented 1 year ago

I have been doing some digging, and that error only happens if I "Select All" photos to add them to an Album, this occurs because it's trying to select some photos which don't exist thus it fails to work, I also get a load of broken thumbnails, it also doesn't show all the photos to add.

If I select them one by one it works fine, I will see if I can dig out them logs for you, in other news I will be migrating this over to a dedicated box soon so it won't be under HyperV as this is just a test platform before I deploy it properly

Reproduced as well Ubuntu 22.04, linux install (so not Docker).

I want to add ~400 images to an album, LibrePhotos says no.