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

Service Worker Interference with File Uploads After Chrome 130 Update #1478

Open
RajatSaini7 opened this issue Oct 24, 2024 · 5 comments
Open

Comments

@RajatSaini7
Copy link

Issue and Steps to Reproduce

I am experiencing issues with file uploads in my React application that uses the @axa-fr/react-oidc library even with latest release version (v7.22.32). After updating to Chrome version 130(latest), the file uploads are not working correctly when the service worker is active. The requests succeed when the service worker is disabled.

Steps to Reproduce:
Set up a React application using the @axa-fr/react-oidc library.
Implement a file upload feature that uses Axios for making POST requests.
Try uploading a file with the service worker active.
Observe that the file upload fails or behaves incorrectly.
Disable the service worker and try again. The upload should succeed.

Versions

v7.22.32

Screenshots

Network Tab:

image image

Console:
image

Screen:
image

Expected

File uploads should work seamlessly, regardless of whether the service worker is active or not.

Actual

When attempting to upload a file, the request fails or behaves unexpectedly with the service worker enabled. However, if the service worker is disabled, the file uploads work correctly.

However, the file upload functionality works correctly in the following scenarios:

Chrome 129: The uploads succeed without issues when using this version.
Safari: The file uploads work as expected in Safari.

Additional Details

Suggested Solutions (if any)
I suspect the service worker might be incorrectly handling the upload requests for multipart/form-data. A potential fix could involve refining the fetch event logic to handle such requests differently.

@guillaume-chervet
Copy link
Contributor

Hi @RajatSaini7 thank you for your feedback.

I test it as soon as possible.

@RajatSaini7
Copy link
Author

@guillaume-chervet - If there have been any updates on this issue. If there’s anything I can do to assist or if you need further information, please let me know.

@guillaume-chervet
Copy link
Contributor

It seems to be a chrome issue : https://x.com/cyril_lakech/status/1851272645049811287?t=AQkF2YsmRU60oJguNO6Yqw&s=19
Nothing link with the service worker mode. On windows i cannot reproduce it. It seems to work well on my side.

@clakech
Copy link

clakech commented Oct 30, 2024

This is the chrome issue to fix this problem
Please share feedback in this ticket to increase the priority
https://issues.chromium.org/issues/376380429

@guillaume-chervet
Copy link
Contributor

Does ypu problem resolved @clakech @RajatSaini7 ?

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