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

URL Uploader does not set response data consistently in Firefox #4909

Closed
2 tasks done
Kelketek opened this issue Feb 2, 2024 · 4 comments · Fixed by #4922
Closed
2 tasks done

URL Uploader does not set response data consistently in Firefox #4909

Kelketek opened this issue Feb 2, 2024 · 4 comments · Fixed by #4922
Labels

Comments

@Kelketek
Copy link

Kelketek commented Feb 2, 2024

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

  1. Install the latest @uppy/url, @uppy/core, @uppy/xhr-upload and @uppy/dashboard
  2. Configure uppy with a compatible XHRUpload target backend, add in the URL importer with companion.
  3. Add an event listener to Uppy for completed or upload-finished
  4. In Firefox, drag an image from another tab onto the Dashboard
  5. Notice that the response data is not populated on the file nor in the response object.
  6. Verify the same thing happens by supplying a URL instead.
  7. Try again on Chrome instead.

Expected behavior

The response data should be populated, allowing code to retrieve the data from a successful upload.

Actual behavior

The upload succeeds, and the frontend receives confirmation from companion over websockets, but the event hook is not supplied with this response data.

@Kelketek Kelketek added the Bug label Feb 2, 2024
@Kelketek
Copy link
Author

Kelketek commented Feb 2, 2024

I've also noticed that companionCookiesRule appears to not be respected, but is in Chrome-- I had to do a lot of workarounds before I came to realize these problems were Firefox only.

Kelketek added a commit to Kelketek/artconomy that referenced this issue Feb 2, 2024
Currently Chrome-only due to bugs in Uppy.

Issue filed here: transloadit/uppy#4909
@Murderlon
Copy link
Member

That's interesting, I wonder if there anything we can do or if it's a browser inconsistency.

@Kelketek
Copy link
Author

Kelketek commented Feb 5, 2024

@Murderlon There are two bugs but only one I've actually filed for here. One uploads the file but doesn't return the data. The other returns the response from the server but the file uploaded to the server is empty. I filed this bug for the former one since I was able to determine reproduction steps that work for me, and my code had moved on from whatever caused the previous bug.

Seeing as there are circumstances where I can get the server response back, and circumstances where the file does upload, my expectation is that there's some way to have them both happen as it currently does in Chrome. It may be that there's some async behavior that is resolving in a different order than it does in Chrome. I filed the bug for the time where the file is uploaded but the response is not returned, as I was able to determine the reproduction steps for that one more easily.

The companionCookiesRule part I'm less sure on-- but I'm also not entirely clear how it works. It's less a concern for me in production than it was in development, since keeping the same origin is much easier when you can use real, verified certificates and DNS entries as opposed to having to hack it together locally.

@Kelketek
Copy link
Author

Thanks for this-- I fiddled with the result and I think this is working correctly now, but the other issue I mentioned in a previous comment still holds, causing it to still fail. I've filed this issue for the follow-up problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants