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

car delete fails with 404 #1202

Closed
ylempereur opened this issue Apr 3, 2022 · 8 comments · Fixed by #1272
Closed

car delete fails with 404 #1202

ylempereur opened this issue Apr 3, 2022 · 8 comments · Fixed by #1272
Assignees
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@ylempereur
Copy link

If I upload a car file using "POST /car", and then go to the "files" page and try to delete it, it fails with a 404 (the UI just fails, you have to look at the console to realize the API returned 404). This happens for any such car file, you can never delete any of them.

@ylempereur ylempereur added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Apr 3, 2022
@vasco-santos
Copy link
Contributor

Hey @ylempereur

I sadly could not replicate on my end.

Can you give us more information on the error, like a screenshot? How long does it take from upload end to attempt to delete?

@ylempereur
Copy link
Author

Here is an example of how I upload my car files (token redacted):

curl -X POST -H "Authorization: Bearer <token>" -H "Content-Type: application/car" -H "X-NAME: dc.car" --data-binary @dc.car "https://api.web3.storage/car"

The file appears on the Files page and eventually gets pinned and gets some providers.

Later on (days, weeks), after I upload a new version, I try to delete it using the Files page (tried to delete 1, tried to delete multiples, tried 3 different browsers), and the UI freezes after the confirmation dialog. Here is what appears on the console within 1 second:

Screen Shot 2022-04-04 at 9 10 44 AM

Please let me know if you need further information.

@ylempereur
Copy link
Author

hey @vasco-santos

I just had a thought: my car files use v0 CIDs internally, and your UI uses v1 CIDs, which it uses to call the delete api. Could this mismatch be the reason it fails to find the file to delete?...

@vasco-santos
Copy link
Contributor

hey @vasco-santos

I just had a thought: my car files use v0 CIDs internally, and your UI uses v1 CIDs, which it uses to call the delete api. Could this mismatch be the reason it fails to find the file to delete?...

Thanks for the notes, it looks like it is!

@vasco-santos
Copy link
Contributor

I created #1242 to fix that

@ylempereur
Copy link
Author

Thank you. Please let me know when the fix is live.

@vasco-santos
Copy link
Contributor

Hey @ylempereur

Apologies for taking so long to get back to this, a solution was not deployed to use the CIDv0 and deletes should now be functional. Can you please confirm on your end?

@ylempereur
Copy link
Author

@vasco-santos

I can confirm that the problem has been fixed and that delete now works as expected.

Thank you for addressing this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
2 participants