-
Notifications
You must be signed in to change notification settings - Fork 16
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
Investigate Firefox issues with long upload #2058
Comments
The test done by copying the curl request from Firefox didn't work. getting a 400 instantly, there's not way to upload something here. curl 'https://stage-api.chainsafe.io/api/v1/bucket/6c3e9ef9-1320-4b99-951f-0ef9466e2222/upload' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0' -H 'Accept: application/json' -H 'Accept-Language: fr,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Authorization: Bearer <redacted>' -H 'Content-Type: multipart/form-data; boundary=---------------------------22656991801474803939577181046' -H 'Content-Length: 524288510' -H 'Origin: http://localhost:3000' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: http://localhost:3000/' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' -H 'TE: trailers'
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
</body>
</html>
|
Did the test on Storage staging (dev) and it's failing with a cors header 400
|
I now switched my test to JS implementation using Axios and XMLHttpRequest with super simple html and vanilia JS pages, see the gist if you want to play with them. Add your storage api token and bucket id. Watch the upload progress in the console. Axios gist
XMLHttpRequest gist
|
I bumped axios to the latest |
Just to rule out the access token issue. I tried uploading a file using a React app calling storage directly.
using this code https://github.com/ChainSafe/filecoindot/blob/main/ui/src/hooks/useBuckets.tsx#L44-L78 So we narrow down the issue to the following:
Edit: After creating a project specifically for this, I was able to upload a file for more than 1h, with react! |
Update after lowering the expiration time of the access token (Files and Storage) to 2min: upload with FF that last 5min (the same 500Mb file) correctly triggered a refresh token call after a successful upload. The problem does not seem to come from the refresh token expiration. |
Describe the bug
Uploads that take longer than 20 minutes fail when using Firefox
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The upload should succeed
Console error
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Issues in chrome were fixed through some changes at the API layer
The text was updated successfully, but these errors were encountered: