beakerbrowser / beaker

An experimental peer-to-peer Web browser
https://beakerbrowser.com/
MIT License
6.75k stars 545 forks source link

HTTPS file uploads fail #1668

Open da2x opened 4 years ago

da2x commented 4 years ago

Describe the bug File uploads fail on many websites in Beaker. Uploading from Firefo’ and Chrome works on those same websites.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://www.onlineconverter.com/mov-to-mp4 or https://tineye.com/search
  2. Click on choose file and select any .mov file†
  3. Click on convert

†E.g. this great masterpiece hyper://0c3fdb310329ffad53aa70549d04f7b9c5b09e3f6d92d01f61943579e62bac2a/mouse-cursor.mov

Expected behavior The file should upload and be converted in the cloud.

Expected behavior Error message stating that the upload failed.

Desktop (please complete the following information): OS: Linux, macOS, Windows Browser: Beaker Version: 1.0-pr2

pfrazee commented 4 years ago

Thanks for filing, I'll check into it

pfrazee commented 4 years ago

I'm digging into this a bit. It's doing a cross-origin POST and seems to be failing the CORS check. It's not clear why yet-- the request headers for the OPTIONS request seem correct. I also tried changing the User-Agent header to mimic chrome and that didn't solve it, so it doesnt appear to be the host doing some UA sniffing.

pfrazee commented 4 years ago

Okay it's not clear to me where the error is emerging. I suspect this is a weird interaction with Electron and Chromium. Here are the things we need to test (in an Electron fiddle):

If anybody wants to pick this issue up, those are the 3 tests in Electron Fiddle we need to start with.