vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
622 stars 166 forks source link

Brave Browser Problem #15105

Open adrianjanocko opened 2 years ago

adrianjanocko commented 2 years ago

Hello,

it seems like Vaadin does not work with the Brave browser. image

Error from the image

TypeError: Failed to fetch dynamically imported module: http://localhost:8080/VAADIN/@fs/C:/Users/adoni/IdeaProjects/my-app/target/frontend/generated-flow-imports.js

If I try Edge, for example, it works like a charm. image

Artur- commented 2 years ago

Is there something more about the reason in the browser console?

adrianjanocko commented 2 years ago

Is there something more about the reason in the browser console?

I didn't notice anything.

Artur- commented 2 years ago
npx @vaadin/cli init hello-brave
cd hello-brave
mvn

works fine in Brave on mac os

knoobie commented 2 years ago

Just a stupid guess, probably related to Brave on Windows and some security stuff because /@fs/C:/Users could potentially look like a path traversal attack.. I've seen other issues with Brave in the past as well, for example in the auth2 example project https://github.com/vaadin/vaadin-oauth-example/issues/43

adrianjanocko commented 2 years ago

Yes, it's issue related to Windows, I don't know haha, but it just doesn't work..

caalador commented 2 years ago

Which version of Brave + Flow + Window does this happen with? I've been basically using Brave for the past 3 years for Flow development and testing and have not had this problem. I'm running [Version 1.45.123 Chromium: 107.0.5304.110 (Official Build) (64-bit)] with Win11

adrianjanocko commented 2 years ago

Which version of Brave + Flow + Window does this happen with? I've been basically using Brave for the past 3 years for Flow development and testing and have not had this problem. I'm running [Version 1.45.123 Chromium: 107.0.5304.110 (Official Build) (64-bit)] with Win11

I downloaded newest available Brave Chromium 107.1.45.123 + Win11

caalador commented 2 years ago

I'm getting this now also when I made a new 23.2.8 spring-boot project, but not for a project with 23.2.8 using jetty.

knoobie commented 2 years ago

Another user reports the same problem: https://discord.com/channels/732335336448852018/1043624798074441881/1043631590682664960

seso975 commented 2 years ago

Hi. I am trying to migrate 14.2.x to 23.2.x. In dev mode View is displayed, but without flow comps (attached logs). Production mode is ok. config: v 23.2.10, java 11, Vaadin CDI

I tried on Win10, firefox 107.0.1, Edge 107.0.1418.62, chrome 108.0.5359.71 . All broken. localhost-1669902412398.log v-console v-console2

knoobie commented 1 year ago

There was another user report about it in discord and a workaround - disabling Brave Shield for localhost worked. https://discord.com/channels/732335336448852018/935356359954812988/1063497344068366368

letrthang commented 1 year ago

It also happens on Vaadin 23.3. JDK 17. MacOS. brave version 1.52.126 Chromium: 114.0.5735.133 (Official Build) (arm64). Disable Shield not help.

If build with production profile, then issue doesn't not happen. So it may link to vite.

https://discord.com/channels/732335336448852018/1119550672812130324

letrthang commented 1 year ago

so this is issue on Vaadin or Brave ?

caalador commented 1 year ago

The issue would seem to be the brave browser shield blocking the @fs requests as disabling the shield fixes the issue. In V24 the issue is not present when using the devBundle feature as there are no @fs requests to the server.

Artur- commented 1 year ago

You should create an issue for Brave if it is preventing loading of URLs used by Vite. There is nothing wrong with the URLs, they just happen to be written in a certain way

mgae0047 commented 1 year ago

Accessing a file on a local hard disk from an application accessed via an HTTP-URL might cause some security issues (that this one happens in developer mode cannot be checked by the browser). So I think Brave is not so wrong with his security concept...