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

[BUG] Cannot access to UI with Firefox on windows 11 #426

Closed
jack-liew opened this issue Apr 2, 2022 · 19 comments
Closed

[BUG] Cannot access to UI with Firefox on windows 11 #426

jack-liew opened this issue Apr 2, 2022 · 19 comments
Assignees
Labels
bug Something isn't working help wanted Need help to test Need to test
Milestone

Comments

@jack-liew
Copy link

OS:windows11
running:autok3s -d serve
the response:
time="2022-04-02T08:20:45+08:00" level=debug msg="failed to collected usage metrics: 422 Unprocessable Entity"
time="2022-04-02T08:20:45+08:00" level=info msg="run as daemon, listening on 127.0.0.1:8080"

When I access https://127.0.0.1:8080 in browser
the response:
Secure Connection Failed
An error occurred during a connection to 127.0.0.1:8080. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG

When I access http://127.0.0.1:8080 in browser
the response is blank page.

thanks

@jack-liew jack-liew added the bug Something isn't working label Apr 2, 2022
@JacieChao
Copy link
Collaborator

JacieChao commented Apr 2, 2022

@jack-liew Which kind of browser are you using? Could you please try Chrome or Firefox? AutoK3s UI is not support IE browser.

@jack-liew
Copy link
Author

I use friefox and ms edge .

@JacieChao
Copy link
Collaborator

JacieChao commented Apr 2, 2022

Firefox works fine for me. Could you please try to open the F12 to see what kind of error occurs in the Firefox Console?
@jack-liew How about trying http://localhost:8080

@jack-liew
Copy link
Author

jack-liew commented Apr 2, 2022

http://localhost:8080:
Loading module from “http://localhost:8080/ui/assets/index.cafcc866.js” was blocked because of a disallowed MIME type (“text/plain”).
Loading failed for the module with source “http://localhost:8080/ui/assets/index.cafcc866.js”.

https://127.0.0.1:8080
Cookie “_dd_s” will be soon treated as cross-site cookie against “https://127.0.0.1:8080/ui/” because the scheme does not match.

@jack-liew jack-liew changed the title [BUG] [BUG] autok3s -d serve:failed to collected usage metrics: 422 Unprocessable Entity Apr 2, 2022
@JacieChao
Copy link
Collaborator

Which version of Firefox are you using?

@jack-liew
Copy link
Author

jack-liew commented Apr 2, 2022

my firefox version is :98.0.2 (64-bit)
edge 99.0.1150.55 (64bit)

2022-04-02 104851

thanks

@JacieChao
Copy link
Collaborator

I'm using Firefox 98.0.2(64-bit) but the UI works fine for me. Is this error occurring on your Firefox Console?

Loading module from “[http://localhost:8080/ui/assets/index.cafcc866.js”](http://localhost:8080/ui/assets/index.cafcc866.js%E2%80%9D) was blocked because of a disallowed MIME type (“text/plain”).

@jack-liew
Copy link
Author

yes, the browser is same version,and the error as you said.

@JacieChao
Copy link
Collaborator

JacieChao commented Apr 2, 2022

Which version of AutoK3s are you using?
I'm not sure about this issue now, I tested with windows 10 using AutoK3s v0.4.9, Firefox 98.0.2(64-bit), and the UI works fine.
Could you please also try Chrome on your computer?

@jack-liew
Copy link
Author

jack-liew commented Apr 2, 2022

yesterday I user autok3s version is 0.4.8, today update to 0.4.9.
Did I have other preparations that didn't do?
because I just did:
download the exe file,and changed filename be autok3s.exe,then running:autok3s.exe -d serve.

@JacieChao
Copy link
Collaborator

Hmmm..... I also download the exe file and ran with the same command.
How about clearing all cache for Firefox or using a private window and try again?

@jack-liew
Copy link
Author

jack-liew commented Apr 2, 2022

......in private tab, It's still view a blank page.
firefox console message is:
Loading module from “http://127.0.0.1:8080/ui/assets/index.cafcc866.js” was blocked because of a disallowed MIME type (“text/plain”).
Loading failed for the module with source “http://127.0.0.1:8080/ui/assets/index.cafcc866.js”.

did I need install autok3s-ui and kube-explorer?

@JacieChao
Copy link
Collaborator

It's curious why the browser changes the javascript type file to text/plain...
@ly5156 Do you have any ideas?

@jack-liew
Copy link
Author

thank for your help!
I'll try to search the answer.
thank again.

@JacieChao JacieChao changed the title [BUG] autok3s -d serve:failed to collected usage metrics: 422 Unprocessable Entity [BUG] Cannot access to UI with Firefox on windows 11 Apr 2, 2022
@JacieChao JacieChao added the help wanted Need help label Apr 2, 2022
@ly5156
Copy link

ly5156 commented Apr 2, 2022

@jack-liew
You can clear your browser cache and try refreshing your browser
chrome example:
image

@jack-liew
Copy link
Author

@jack-liew You can clear your browser cache and try refreshing your browser chrome example: image

To clear cache not worked.
when i F12 to Find the problem, it view message:
Loading module from “http://localhost:8080/ui/assets/index.cafcc866.js” was blocked because of a disallowed MIME type (“text/plain”).

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/X-Content-Type-Options
Blocks a request if the request destination is of type style and the MIME type is not text/css, or of type script and the MIME type is not a JavaScript MIME type.

It looks like autok3s web server has a bug about MIME type.

Thanks

@JacieChao
Copy link
Collaborator

@jack-liew I think it's a problem with Windows registry configuration. Could you please try to modify registry config as the following comments to check if this issue could be fixed?
golang/go#32350 (comment)

More information: https://stackoverflow.com/questions/59355194/python-flask-error-failed-to-load-module-script-strict-mime-type-checking-i

@jack-liew
Copy link
Author

It's worked,Thanks,
but I don't think it be a good idea.

@JacieChao
Copy link
Collaborator

This won't reproduce on every version of Windows. I didn't reproduce it on my Windows 10 computer.
golang/go#32350 (comment) is a temporary solution.

We will deep dive to see how to handle this issue more conveniently.

@JacieChao JacieChao added this to the v0.5.0 milestone Apr 19, 2022
@JacieChao JacieChao self-assigned this Apr 19, 2022
@Jason-ZW Jason-ZW added the to test Need to test label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Need help to test Need to test
Development

No branches or pull requests

4 participants