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

theme.css doesn't map to correct port. #8129

Open
1 task done
kingsznhone opened this issue Apr 25, 2024 · 7 comments
Open
1 task done

theme.css doesn't map to correct port. #8129

kingsznhone opened this issue Apr 25, 2024 · 7 comments
Assignees
Labels
bug Something isn't working cloud Issues that only happen when deploying Gradio on cloud services

Comments

@kingsznhone
Copy link

Describe the bug

When using 4.27.0, Set app runs on a selected port. App can't load correctly.
Check with F12, theme.css is point to defaut port.
f3928f7267fb5874973f39d248836da

Downgrade to 3.50.2, theme.css is map to correct port.
image

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

demo.launch(server_port=8443)

Screenshot

No response

Logs

No response

System Info

ubuntu 22.04 LTS
python 3.10
gradio latest

Severity

Blocking usage of gradio

@kingsznhone kingsznhone added the bug Something isn't working label Apr 25, 2024
@pngwn
Copy link
Member

pngwn commented Apr 25, 2024

Ooooh

@abidlabs abidlabs added the cloud Issues that only happen when deploying Gradio on cloud services label Apr 25, 2024
@abidlabs
Copy link
Member

Interesting, what's the URL in which your Gradio app is running?

Can you describe more how your Gradio app is deployed? Is it behind an nginx proxy?

@kingsznhone
Copy link
Author

Interesting, what's the URL in which your Gradio app is running?

Can you describe more how your Gradio app is deployed? Is it behind an nginx proxy?

it is running on a gpu rential platform, local port is 6006,reverse proxy by platform to outside 8443
I guess it's something like nginx .

@bf96163
Copy link

bf96163 commented Apr 26, 2024

I also find the path /login redirected to wrong address i run my gradio in port 7001 i want to proxy it to 8001/img2txt here is my nginx.conf (the server listen to 80 is to fix the problem theme.css redirect to 80 problem) `events {
}
http{
server {
listen 8001;
server_name _;
location /assets/ {
rewrite ^/assets/(.*)$ /img2txt/assets/$1 break;
proxy_pass http://127.0.0.1:7001/img2txt/;

}
location /img2txt/ {
    proxy_pass http://127.0.0.1:7001/img2txt/;
    proxy_buffering off;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name _;
location /img2txt/{
proxy_pass http://127.0.0.1:7001/img2txt/;
}
}

}` after added server listen to 80 the theme.css loaded correctly ,but after i click login button(yes i use password of gradio) i got another error this is the url i submit :”http://192.168.8.122/img2txt/login“ but it should call ”http://192.168.8.122:8000/img2txt/login“ mybe they are the same bug(like theme.css load error in nginx)

@1390806607
Copy link

@bf96163 Hello, have you solved it yet

@bars0um
Copy link

bars0um commented May 9, 2024

Have the same issue...in developer tools console I see attempts to load theme.css from localhost instead of localhost:8181 which is where the app is serving from

@abidlabs
Copy link
Member

abidlabs commented May 9, 2024

Hi @bars0um I'm looking into this issue, can you please describe how your app is deployed as well? Is it behind a proxy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cloud Issues that only happen when deploying Gradio on cloud services
Projects
None yet
Development

No branches or pull requests

6 participants