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

images: turn off webworker, fixes issue on safari on hosted ships #2989

Merged

Conversation

patosullivan
Copy link
Member

fixes LAND-1117 by disabling the web worker for compression.

Tlon Hosting's CSP doesn't allow for blobs from a web worker. Other browsers fallback to just using the main thread if the web worker fails, Safari does not for some reason, so hosted users either using Safari (or using the mobile app) could not upload images.

@linear
Copy link

linear bot commented Oct 26, 2023

LAND-1117 Sending an image via DM (with new joinee) does not work

Describe the bug, optionally with screenshots
I recently onboarded a friend via profile QR code, which worked flawlessly. In the DM between us that was initialized, we each tried to send one another an image, but both ran into a similar issue:

  1. We could tap the + button to select an image
  2. We could select an image from our phone/OS, and submit it to be uploaded
  3. A small loader would appear in the input, suggesting that an image was about to populate the message input, but nothing would show up. I've reproduced this in the video below:

Screen Recording 2023-10-25 at 11.23.38 PM.mov

Edit: Checking Devtools while uploading produced the following two errors in the console:

  1. Refused to load blob:``[https://fabled-faster.tlon.network/82d2b117-10c8-48c7-93ad-b832c4b782a0](https://fabled-faster.tlon.network/82d2b117-10c8-48c7-93ad-b832c4b782a0)`` because it does not appear in the worker-src directive of the Content Security Policy.
  2. Unhandled Promise Rejection: error: undefined

The first error showed up when I submitted an image selected from my device.

The second of these errors showed up only when the image attachment appeared to fail:

Screen Recording 2023-10-25 at 11.29.41 PM.mov

To Reproduce
Steps to reproduce the behavior:

  1. Invite someone via profile QR
  2. If they join successfully, attempt to send them an image via the DM created between you both.
  3. If you run into issues with a selected image being attached to the message field, you've reproduced the bug

Expected behavior
I expect images to attach to messages after they're selected from the OS/phone.

@patosullivan patosullivan merged commit 93b3fbd into develop Oct 26, 2023
1 check failed
@patosullivan patosullivan deleted the po/land-1117-turn-off-web-worker-for-compression branch October 26, 2023 11:30
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

Successfully merging this pull request may close these issues.

1 participant