plane icon indicating copy to clipboard operation
plane copied to clipboard

[bug]: Real-Time Pages Sync not working

Open shishanshu opened this issue 1 year ago • 15 comments

Is there an existing issue for this?

  • [X] 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 avatar Dec 18 '24 08:12 shishanshu

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

aaryan610 avatar Dec 18 '24 09:12 aaryan610

I fully confirm. Even my own content is not displayed in another browser. The solution suggested here did not help me https://github.com/makeplane/plane/issues/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.

imoiseev avatar Dec 19 '24 12:12 imoiseev

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

akshat5302 avatar Dec 20 '24 14:12 akshat5302

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.

shishanshu avatar Dec 21 '24 04:12 shishanshu

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

/ # 

imoiseev avatar Dec 22 '24 08:12 imoiseev

Could you please share your nginx.conf file @imoiseev

akshat5302 avatar Dec 24 '24 05:12 akshat5302

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;
        }
    }
}

imoiseev avatar Dec 24 '24 09:12 imoiseev

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

akshat5302 avatar Dec 24 '24 10:12 akshat5302

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;
        }
    }
}/ # 

imoiseev avatar Dec 24 '24 11:12 imoiseev

Any ideas? Maybe it will be fixed in the next release?

imoiseev avatar Jan 21 '25 13:01 imoiseev

Hey @imoiseev, we tried to replicate the problem on our end but couldn’t reproduce it. The issue may be due to some incorrect configuration in your Nginx config file.

Could you please try doing a fresh setup without modifying the default configuration?

For reference, you can refer to the following guides: Plane Self-Hosting Guide External Reverse Proxy Documentation

akshat5302 avatar Jan 22 '25 08:01 akshat5302

Pages don't update at all in my setup. One of my team members updated a page yesterday. When I visit the page in my browser it doesn't show any of the edits, even though they do show up on his end. Not sure if this is related to real-time pages sync, but it feels like it is.

raafirivero avatar Jan 28 '25 00:01 raafirivero

Hey @raafirivero, please check out this troubleshooting guide. Let me know if you encounter any further issues!

akshat5302 avatar Jan 28 '25 06:01 akshat5302

Hey @raafirivero, did the solution above work for you? Let me know if we can close this issue.

akshat5302 avatar Feb 19 '25 13:02 akshat5302

@akshat5302 I made the recommended changes to the NGINX config mentioned on that troubleshooting guide and pages still do not update (we're self-hosting on AWS. most of our users use Safari but some may use Chrome). Have tried to see if pages sync when a team member creates a page or when I do. The page titles show up for other people on the team but none of the page content.

raafirivero avatar Feb 24 '25 09:02 raafirivero

Hey @raafirivero, did the solution above work for you? Let me know if we can close this issue.

Fixed, thank you.

raafirivero avatar Apr 06 '25 22:04 raafirivero