|
Re: Blank login form [message #1831403 is a reply to message #1831384] |
Wed, 19 August 2020 06:09 |
|
I guess the Content-Type is wrong. In my case I have this response header for login.js:
Content-Type: application/javascript;charset=UTF-8
On both, deployed application on a Tomcat and on a Jetty server while developing locally.
Can you check what the response header says on your machine?
Then I'd suggest to debug into the class "org.eclipse.scout.rt.ui.html.res.ResourceRequestHandler" and check how the loaded resource for login.js looks like (See screenshot below).
Cheers
André
Eclipse Scout Homepage | Documentation | GitHub
|
|
|
Re: Blank login form [message #1831404 is a reply to message #1831384] |
Wed, 19 August 2020 06:29 |
|
Marco Dörfliger wrote on Tue, 18 August 2020 21:00
After the app starts, I connect to localhost:8082 and I get a blank page. When I inspect the source, the login.html has loaded but my firefox dev console reports the error message
Quote:The resource from "http://localhost:8082/login.js" was blocked due to MIME type ("text/html") mismatch (X-Content-Type-Options: nosniff). Have you encountered this issue before?
This can happen when the login.js file cannot be found. In this case, Jetty (or Tomcat, or whatever app sever you are using) returns a HTTP 404 status along a human readable HTML page. You can verify this by entering the full URL to the login.js in the address bar of your browser. If you get a 404 message, you have to verify that the generated files are at the correct location (i.e. your webpack build is running). The generated file should be present at your.project.ui.html\dist\dev\login.js in development mode (or your.project.ui.html.jar!dist/prod/login.js in the production build).
Regards,
Beat
|
|
|
Re: Blank login form [message #1831407 is a reply to message #1831404] |
Wed, 19 August 2020 07:27 |
Marco Dörfliger Messages: 46 Registered: January 2015 |
Member |
|
|
Ok, found the issue. I actually stated the cause in my initial post:
Quote:disabling or commenting out all of the access controllers in UiServletFilter.java.
That's the problem: it tries to access the login page, but since I'd set
m_trivialAccessController = BEANS.get(TrivialAccessController.class).init(new TrivialAuthConfig()
.withExclusionFilter(filterConfig.getInitParameter("filter-exclude"))
.withLoginPageInstalled(true).withEnabled(false));
when it requests login.js, that request is redirected to login.html (which apparently isn't javascript). :)
At least, I presume that is the case, as it now works. Thanks for the replies though, the idea about getting a 404 error put me on the right track.
It's a pretty basic mistake, but one easily made. I wanted to disable other forms of authentication, but in actuality the TrivialAuthConfig is what provides access to necessary login resources, so it shouldn't be disabled.
|
|
|
Powered by
FUDForum. Page generated in 0.03383 seconds