kartaview / openstreetcam.org

The openstreetcam.org web site
MIT License
75 stars 10 forks source link

cannot delete photo #226

Closed rwelty1889 closed 3 years ago

rwelty1889 commented 5 years ago

i am trying to clean up a track by deleting some images that are not placed correctly. i am getting the following message: "Photo cannot be deleted! 400 - Bad Request - 690: An unexpected server error has occurred"

the images i am trying to delete are the first few from this track: https://openstreetcam.org/details/1523285/100/track-info

joeybab3 commented 5 years ago

I can confirm that I receive the same message trying to delete a photo.

klg113 commented 5 years ago

I think it deletes the image and gives the message because the image is gone and the app is trying to display it still. If I refresh the page the image count goes down for me.

joeybab3 commented 5 years ago

I can confirm that the image now does get deleted once you refresh, this was not the original behavior I don't think though. It still gives a 400 error when deleting though again it does delete.

kymckay commented 4 years ago

Still an issue, looks like the deletion code hits line 238 here (the error message): https://github.com/openstreetcam/openstreetcam.org/blob/378ca88ceb65b1b2835ce7c1759ddc231b7d99d6/src/app/sequence/sequence-base.component.ts#L212-L239

Here's the photoService.delete method being called by that code (which it sounds like is sending a request with an unexpected body - weird because it still works): https://github.com/openstreetcam/openstreetcam.org/blob/378ca88ceb65b1b2835ce7c1759ddc231b7d99d6/src/app/shared/api-services/osc/photoVx.service.ts#L71-L78

The _apiService.post method here: https://github.com/openstreetcam/openstreetcam.org/blob/378ca88ceb65b1b2835ce7c1759ddc231b7d99d6/src/app/shared/api-services/api-osc.service.ts#L42-L53

Edit: Don't see any errors in the code here - and because the photo still gets deleted, I'm inclined to think that the request body is fine (the result of all the above code is a request to https://api.openstreetcam.org/1.0/photo/remove/ with the body {access_token: <secret>, photoId: <number>}) and that this issue is on the API implementation end of things.

OttoROSM commented 4 years ago

Any update for this bug, as it is still not possible to delete images.

tigren commented 3 years ago

please try delete photos on https://kartaview.org/ now

brmonaghan commented 3 years ago

@tigren still not working with upload incomplete tracks problem with seq https://kartaview.org/details/1446818/0/track-info https://kartaview.org/details/1449274 https://kartaview.org/details/1443154 https://kartaview.org/details/1378810 https://kartaview.org/details/1378321 https://kartaview.org/details/1378281 https://kartaview.org/details/1446418

tigren commented 3 years ago

@brmonaghan I can help delete the sequences you mentioned, meanwhile checking the root cause. Sorry for the inconvience

brmonaghan commented 3 years ago

Are you going to delete these problematic videos? I don't understand what you are saying.

brmonaghan commented 3 years ago

Oh wait. Editing