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

DevUI - config editor doesn't work well over https, UI doesn't get updated #29431

Closed
rsvoboda opened this issue Nov 23, 2022 · 5 comments · Fixed by #29586
Closed

DevUI - config editor doesn't work well over https, UI doesn't get updated #29431

rsvoboda opened this issue Nov 23, 2022 · 5 comments · Fixed by #29586
Labels
area/dev-ui kind/bug Something isn't working
Milestone

Comments

@rsvoboda
Copy link
Member

rsvoboda commented Nov 23, 2022

Describe the bug

DevUI - config editor doesn't work well over https, the value gets updated in application.properties but the UI gets grey for the updated entry and new value is not reflected.

Browser console shows GET http://localhost/q/dev/io.quarkus.quarkus-vertx-http/config net::ERR_CONNECTION_REFUSED when I access I https://localhost:8443/q/dev/io.quarkus.quarkus-vertx-http/config and update something

As if the Dev UI counts only with port 8080 / quarkus.http.port.

Screenshot 2022-11-23 at 8 33 58

CC @radcortez @phillip-kruger @geoand

Expected behavior

UI gets updated, no net::ERR_CONNECTION_REFUSED

Actual behavior

UI doesn't get updated

How to Reproduce?

  • Use any Quarkus 2.14.1.Final application
  • Enable https - quarkus.http.ssl.certificate.key-store-file and quarkus.http.ssl.certificate.key-store-password
  • Access https://localhost:8443/q/dev/io.quarkus.quarkus-vertx-http/config
  • Open browser console - righ-click - Inspect - Console tab
  • Edit any value and hit Enter of click ✅

Output of uname -a or ver

No response

Output of java -version

Java 17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.14.1.Final, 2.13.4.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@rsvoboda rsvoboda added the kind/bug Something isn't working label Nov 23, 2022
@cescoffier
Copy link
Member

Hum.... why I do have the feeling it's a problem with the virtual channel thiny

@rsvoboda
Copy link
Member Author

Reproducer app - https://github.com/rsvoboda/code-with-quarkus

quarkus.datasource.password added to have something simple for editing in https://localhost:8443/q/dev/io.quarkus.quarkus-vertx-http/config

gsmet added a commit to gsmet/quarkus that referenced this issue Nov 30, 2022
Fixes quarkusio#29431

This is a workaround though. The core of the problem is that when in
HTTPS, event.request().absoluteURI() returns an HTTP url, which is wrong
and leads to the redirect not working.
@gsmet
Copy link
Member

gsmet commented Nov 30, 2022

From what I can see, the problem is when DevConsolePostHandler tries to redirect.

event.request().absoluteURI() returns http://localhost/q/dev/io.quarkus.quarkus-vertx-http/config even in HTTPS, which is incorrect.

I worked around it by using uri(), which IMHO is better anyway but I think we should still try to understand what's going on at the Vert.x level.

PR is here: #29586

@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Dec 1, 2022
@rsvoboda
Copy link
Member Author

rsvoboda commented Dec 1, 2022

Thanks @gsmet, tried the latest main and happy now. Should be #29586 marked for backport(s) or you want to wait for proper fix?

@gsmet
Copy link
Member

gsmet commented Dec 1, 2022

@rsvoboda I added the labels.

@gsmet gsmet modified the milestones: 2.16 - main, 2.15.0.Final Dec 2, 2022
gsmet added a commit to gsmet/quarkus that referenced this issue Dec 2, 2022
Fixes quarkusio#29431

This is a workaround though. The core of the problem is that when in
HTTPS, event.request().absoluteURI() returns an HTTP url, which is wrong
and leads to the redirect not working.

(cherry picked from commit e2572f4)
@gsmet gsmet modified the milestones: 2.15.0.Final, 2.14.3.Final Dec 2, 2022
gsmet added a commit to gsmet/quarkus that referenced this issue Dec 2, 2022
Fixes quarkusio#29431

This is a workaround though. The core of the problem is that when in
HTTPS, event.request().absoluteURI() returns an HTTP url, which is wrong
and leads to the redirect not working.

(cherry picked from commit e2572f4)
@gsmet gsmet modified the milestones: 2.14.3.Final, 2.13.6.Final Dec 14, 2022
gsmet added a commit to gsmet/quarkus that referenced this issue Dec 14, 2022
Fixes quarkusio#29431

This is a workaround though. The core of the problem is that when in
HTTPS, event.request().absoluteURI() returns an HTTP url, which is wrong
and leads to the redirect not working.

(cherry picked from commit e2572f4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ui kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants