coder / coder

Provision remote development environments via Terraform
https://coder.com
GNU Affero General Public License v3.0
7.92k stars 663 forks source link

JavaScript error in Brave when clicking on workspace entry in browser UI #11035

Closed BjoernKW closed 9 months ago

BjoernKW commented 9 months ago

When clicking on a workspace entry at https://coder.spring-boot.spaces.workshops.de/workspaces in the browser UI with the Brave browser (version 1.60.125 Chromium: 119.0.6045.199 (Official Build) (arm64)) I get this error message (also see the attached screenshot):

"TypeError: Failed to fetch dynamically imported module: https://coder.spring-boot.spaces.workshops.de/assets/WorkspacePage-529c670d.js"

I have these extensions installed (so, no additional ad / JavaScript blocker besides the one that comes with Brave itself):

Screenshot 2023-12-05 at 13 32 27
BrunoQuaresma commented 9 months ago

If you refresh the page does it work? We see that happening when the user tries to access the Workspace page during a Coder update.

BjoernKW commented 9 months ago

If you refresh the page does it work? We see that happening when the user tries to access the Workspace page during a Coder update.

No, unfortunately it doesn't, not even on emptying cache and hard-reloading.

BrunoQuaresma commented 9 months ago

Looks like the browser is not being able to access this specific file. Are you able to access this file: https://coder.spring-boot.spaces.workshops.de/assets/WorkspacePage-529c670d.js?

BjoernKW commented 9 months ago

Looks like the browser is not being able to access this specific file. Are you able to access this file: https://coder.spring-boot.spaces.workshops.de/assets/WorkspacePage-529c670d.js?

Yes, I can access that file.

BrunoQuaresma commented 9 months ago

Hmm... interesting. Are you able to access the page in other browsers? Wondering if it is a privacy/security setting on Brave that is blocking this file from being loaded correctly.

BjoernKW commented 9 months ago

Hmm... interesting. Are you able to access the page in other browsers? Wondering if it is a privacy/security setting on Brave that is blocking this file from being loaded correctly.

Yes, it works in Safari, for instance.

BrunoQuaresma commented 9 months ago

Looks like there is a config/extension in the browser that is blocking this file from being loaded correctly. I never used Brave so I have no idea. Ping @coder/ts folks to see if someone can help with that.

aslilac commented 9 months ago

afaik there isn't anything we can do to work around it if the browser decides to block a js file short of awful proxy shenanigans (make someone else request the file and tunnel it through them)

I used to use Brave, and iirc you can click on the lion logo in the address bar and adjust the privacy setting to "allow fingerprinting" or something. I don't remember exactly, and I don't have it installed anymore, but I just remember it being a vaguely scary sounding setting that basically amounts to "disable network filtering and let them run webgl". It's an origin-specific setting, so it'll only affect the domain you access Coder from.

BjoernKW commented 9 months ago

https://coder.spring-boot.spaces.workshops.de/workspaces

Unfortunately, it doesn't work either with a setting of "Allow fingerprinting".

Screenshot 2023-12-06 at 08 22 43

I have to allow trackers and ads for it to work:

Screenshot 2023-12-06 at 08 24 18

Apparently, that particular script either does some kind of tracking or at least is categorised as a tracker by Brave.

BrunoQuaresma commented 9 months ago

We don't do any kind of FE tracking in the UI 🤔 but on this page, we have a WebSocket connection to update the workspace data in real-time... not sure if this is the reason why Brave is marking it as a tracker. I also don't know if the modification, for some reason, is generating some words that are getting caught by the Brave analysis.

I don't think there is something we can do on our side, are you comfortable closing this issue?

BjoernKW commented 9 months ago

Yes, I think closing the issue is fine. Thanks for your help!