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]: Real-Time Pages Sync not working #6220

Open
1 task done
shishanshu opened this issue Dec 18, 2024 · 9 comments
Open
1 task done

[bug]: Real-Time Pages Sync not working #6220

shishanshu opened this issue Dec 18, 2024 · 9 comments
Assignees
Labels
🐛bug Something isn't working

Comments

@shishanshu
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Real-Time Pages Sync not working in diffrent borwser it's showing blank

Steps to reproduce

created new pages
header showing in new browser but conntent not showing

Environment

Production

Browser

Google Chrome

Variant

Local

Version

v0.24.1

@shishanshu shishanshu added the 🐛bug Something isn't working label Dec 18, 2024
@aaryan610
Copy link
Collaborator

Hey @shishanshu, do you have your live server up and running?

@imoiseev
Copy link

I fully confirm. Even my own content is not displayed in another browser.
The solution suggested here did not help me
#6206

Try to print something, like "123QWERY" in content page, and get error in console

Unhandled Promise Rejection: Error: Unexpected end of array

Снимок экрана 2024-12-19 в 15 10 05

This only happens with pages. Everything else works fine.

@akshat5302
Copy link
Collaborator

Hi, @imoiseev are you using any external proxy other than plane-proxy?

@shishanshu
Copy link
Author

My issue resloved after add below line in nginx proxy.

    # Additional headers for WebSocket support or other advanced proxy configurations
    proxy_http_version 1.1;  
    proxy_set_header Upgrade $http_upgrade;  
    proxy_set_header Connection "upgrade";

Thankyou.

@imoiseev
Copy link

imoiseev commented Dec 22, 2024

Hi, @imoiseev are you using any external proxy other than plane-proxy?

I have tried many configurations. I have nginx port 8888 configured, and I also access plane through it, for example http://00.00.00.00:8888

Everything works except for this.

in docker exec -it proxy /bin/sh
cat /etc/nginx/nginx.conf

All ports are registered, all directives are registered, but there is still a problem with the pages.

Снимок экрана 2024-12-22 в 13 15 13

My comp

user@MacBook-Pro~ % wscat -c ws://serverip:8888/
error: Unexpected server response: 502
> %            

On server

root@cv4111187:~# docker exec -it proxy /bin/sh
/ # nslookup web
Server:		127.0.0.11
Address:	127.0.0.11:53

Non-authoritative answer:

Non-authoritative answer:
Name:	web
Address: 172.19.0.8

/ # 

@akshat5302
Copy link
Collaborator

Could you please share your nginx.conf file @imoiseev

@imoiseev
Copy link

Could you please share your nginx.conf file @imoiseev

root@cv4111187:~# docker exec -it proxy /bin/sh
/ # cat /etc/nginx/nginx.conf
events {
}

http {
    sendfile on;

    server {
        listen 80;
        listen 8888;
        root /www/data/;
        access_log /var/log/nginx/access.log;

        client_max_body_size 5242880;

        add_header X-Content-Type-Options    "nosniff" always;
        add_header Referrer-Policy           "no-referrer-when-downgrade" always;
        add_header Permissions-Policy        "interest-cohort=()" always;
        #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
        add_header X-Forwarded-Proto         "$scheme";
        add_header X-Forwarded-Host          "$host";
        add_header X-Forwarded-For           "$proxy_add_x_forwarded_for";
        add_header X-Real-IP                 "$remote_addr";

        location /wss {
            proxy_http_version 1.1;  
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_pass http://web:3000/;
        }

        location /ws {
            proxy_http_version 1.1;  
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_pass http://web:3000/;
        }

        location / {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://web:3000/;
        }

        location /api/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://api:8000/api/;
        }

        location /auth/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://api:8000/auth/;
        }

        location /god-mode/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://admin:3000/god-mode/;
        }

        location /live/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://live:3000/live/;
        }

        location /spaces/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://space:3000/spaces/;
        }

        location /uploads {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://plane-minio:9000/uploads;
        }
    }
}

@akshat5302
Copy link
Collaborator

akshat5302 commented Dec 24, 2024

Remove the redundant /ws and /wss locations - they're unnecessary since your root location (/) already handles WebSocket upgrades.

Save these changes and try restarting the proxy container

Ref: Plane Nginx configuration template file

@imoiseev
Copy link

Removed, but nothing changed. Options were added out of desperation. Request to ws also returns 502

root@cv4111187:/opt/plane# docker exec -it proxy /bin/sh
/ # cat /etc/nginx/nginx.conf
events {
}

http {
    sendfile on;

    server {
        listen 80;
        listen 8888;
        root /www/data/;
        access_log /var/log/nginx/access.log;

        client_max_body_size 5242880;

        add_header X-Content-Type-Options    "nosniff" always;
        add_header Referrer-Policy           "no-referrer-when-downgrade" always;
        add_header Permissions-Policy        "interest-cohort=()" always;
        #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
        add_header X-Forwarded-Proto         "$scheme";
        add_header X-Forwarded-Host          "$host";
        add_header X-Forwarded-For           "$proxy_add_x_forwarded_for";
        add_header X-Real-IP                 "$remote_addr";

        location / {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://web:3000/;
        }

        location /api/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://api:8000/api/;
        }

        location /auth/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://api:8000/auth/;
        }

        location /god-mode/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://admin:3000/god-mode/;
        }

        location /live/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://live:3000/live/;
        }

        location /spaces/ {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://space:3000/spaces/;
        }

        location /uploads {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_pass http://plane-minio:9000/uploads;
        }
    }
}/ # 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants