[GH-ISSUE #8103] [Bug] Unable to connect / sync with server on Linux #3557

Closed
opened 2026-03-23 21:31:15 +00:00 by mirror · 7 comments
Owner

Originally created by @rockerest on GitHub (Jul 4, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8103

Bug Description

The AppFlowy client cannot load any content.

An example error code is: msg: Initialization timed out

How to Reproduce

  • Have Linux
  • Open AppFlowy

Expected Behavior

Sync works

Operating System

Ubuntu 24.04

AppFlowy Version(s)

0.9.4 & 0.9.64

Screenshots

No response

Additional Context

No response

Originally created by @rockerest on GitHub (Jul 4, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8103 ### Bug Description The AppFlowy client cannot load any content. An example error code is: `msg: Initialization timed out` ### How to Reproduce - Have Linux - Open AppFlowy ### Expected Behavior Sync works ### Operating System Ubuntu 24.04 ### AppFlowy Version(s) 0.9.4 & 0.9.64 ### Screenshots _No response_ ### Additional Context _No response_
Author
Owner

@rockerest commented on GitHub (Jul 4, 2025):

A client error log

{"msg":"[Flutter]: Uncaught platform error\nStackTrace:\n#0      DBusClient._callMethod (package:dbus/src/dbus_client.dart:1142)\n<asynchronous suspension>\n#1      DBusClient.callMethod (package:dbus/src/dbus_client.dart:621)\n<asynchronous suspension>\n#2      DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)\n<asynchronous suspension>\n#3      NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)\n<asynchronous suspension>\n#4      ConnectivityPlusLinuxPlugin._startListenConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:67)\n<asynchronous suspension>\n","time":"07-03 22:00:31","target":"dart_ffi"}
{"msg":"[Flutter]: Uncaught platform error\nStackTrace:\n#0      DBusClient._callMethod (package:dbus/src/dbus_client.dart:1142)\n<asynchronous suspension>\n#1      DBusClient.callMethod (package:dbus/src/dbus_client.dart:621)\n<asynchronous suspension>\n#2      DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)\n<asynchronous suspension>\n#3      NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)\n<asynchronous suspension>\n#4      ConnectivityPlusLinuxPlugin.checkConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:24)\n<asynchronous suspension>\n#5      NetworkListener.start (package:appflowy/core/network_monitor.dart:22)\n<asynchronous suspension>\n#6      AppLauncher.launch.<anonymous closure> (package:appflowy/startup/startup.dart:264)\n<asynchronous suspension>\n#7      BasicLock.synchronized (package:synchronized/src/basic_lock.dart:36)\n<asynchronous suspension>\n#8      AppLauncher.launch (package:appflowy/startup/startup.dart:258)\n<asynchronous suspension>\n#9      FlowyRunner.run (package:appflowy/startup/startup.dart:157)\n<asynchronous suspension>\n#10     runAppFlowy (package:appflowy/startup/startup.dart:41)\n<asynchronous suspension>\n#11     _SelfHostSettingsState._saveUrl (package:appflowy/workspace/presentation/settings/settings_dialog.dart:411)\n<asynchronous suspension>\n","time":"07-03 22:00:31","target":"dart_ffi"}
<!-- gh-comment-id:3034506521 --> @rockerest commented on GitHub (Jul 4, 2025): A client error log ``` {"msg":"[Flutter]: Uncaught platform error\nStackTrace:\n#0 DBusClient._callMethod (package:dbus/src/dbus_client.dart:1142)\n<asynchronous suspension>\n#1 DBusClient.callMethod (package:dbus/src/dbus_client.dart:621)\n<asynchronous suspension>\n#2 DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)\n<asynchronous suspension>\n#3 NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)\n<asynchronous suspension>\n#4 ConnectivityPlusLinuxPlugin._startListenConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:67)\n<asynchronous suspension>\n","time":"07-03 22:00:31","target":"dart_ffi"} {"msg":"[Flutter]: Uncaught platform error\nStackTrace:\n#0 DBusClient._callMethod (package:dbus/src/dbus_client.dart:1142)\n<asynchronous suspension>\n#1 DBusClient.callMethod (package:dbus/src/dbus_client.dart:621)\n<asynchronous suspension>\n#2 DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)\n<asynchronous suspension>\n#3 NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)\n<asynchronous suspension>\n#4 ConnectivityPlusLinuxPlugin.checkConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:24)\n<asynchronous suspension>\n#5 NetworkListener.start (package:appflowy/core/network_monitor.dart:22)\n<asynchronous suspension>\n#6 AppLauncher.launch.<anonymous closure> (package:appflowy/startup/startup.dart:264)\n<asynchronous suspension>\n#7 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:36)\n<asynchronous suspension>\n#8 AppLauncher.launch (package:appflowy/startup/startup.dart:258)\n<asynchronous suspension>\n#9 FlowyRunner.run (package:appflowy/startup/startup.dart:157)\n<asynchronous suspension>\n#10 runAppFlowy (package:appflowy/startup/startup.dart:41)\n<asynchronous suspension>\n#11 _SelfHostSettingsState._saveUrl (package:appflowy/workspace/presentation/settings/settings_dialog.dart:411)\n<asynchronous suspension>\n","time":"07-03 22:00:31","target":"dart_ffi"} ```
Author
Owner

@khorshuheng commented on GitHub (Jul 4, 2025):

A few things to verify:

  1. Is all the container running without crashing?
  2. Are you using another reverse proxy in front of the nginx within the docker compose, and if so, did you add the configuration to allow connection upgrade?
  3. Is there any error for request to /ws/... in the reverse proxy log?
  4. Are you able to login and see the default page? Or does it completely not start?
<!-- gh-comment-id:3034513090 --> @khorshuheng commented on GitHub (Jul 4, 2025): A few things to verify: 1. Is all the container running without crashing? 2. Are you using another reverse proxy in front of the nginx within the docker compose, and if so, did you add the configuration to allow connection upgrade? 3. Is there any error for request to /ws/... in the reverse proxy log? 4. Are you able to login and see the default page? Or does it completely not start?
Author
Owner

@rockerest commented on GitHub (Jul 4, 2025):

  1. All of the containers seem to be running fine.

  2. Yes, here's the config:

    Config
    upstream appflowyws {
        server x.x.x.x:80;
    }
    
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }
    
    server {
        server_name domain.name;
    
        if ($http_user_agent ~* "(AI2Bot|Ai2Bot\-Dolma|aiHitBot|Amazonbot|Andibot|anthropic\-ai|Applebot|Applebot\-Extended|bedrockbot|Brightbot\ 1\.0|Bytespider|CCBot|ChatGPT\-User|Claude\-SearchBot|Claude\-User|Claude\-Web|ClaudeBot|cohere\-ai|cohere\-training\-data\-crawler|Cotoyogi|Crawlspace|Diffbot|DuckAssistBot|EchoboxBot|FacebookBot|facebookexternalhit|Factset_spyderbot|FirecrawlAgent|FriendlyCrawler|Google\-CloudVertexBot|Google\-Extended|GoogleOther|GoogleOther\-Image|GoogleOther\-Video|GPTBot|iaskspider/2\.0|ICC\-Crawler|ImagesiftBot|img2dataset|ISSCyberRiskCrawler|Kangaroo\ Bot|meta\-externalagent|Meta\-ExternalAgent|meta\-externalfetcher|Meta\-ExternalFetcher|MistralAI\-User/1\.0|MyCentralAIScraperBot|NovaAct|OAI\-SearchBot|omgili|omgilibot|Operator|PanguBot|Panscient|panscient\.com|Perplexity\-User|PerplexityBot|PetalBot|PhindBot|Poseidon\ Research\ Crawler|QualifiedBot|QuillBot|quillbot\.com|SBIntuitionsBot|Scrapy|SemrushBot|SemrushBot\-BA|SemrushBot\-CT|SemrushBot\-OCOB|SemrushBot\-SI|SemrushBot\-SWA|Sidetrade\ indexer\ bot|TikTokSpider|Timpibot|VelenPublicWebCrawler|Webzio\-Extended|wpbot|YandexAdditional|YandexAdditionalBot|YouBot)") {
          return 403;
        }
    
        location = /robots.txt {
            alias /var/www/global/robots.txt;
        }
    
        underscores_in_headers on;
        proxy_pass_request_headers on;
        client_max_body_size 2G;
    
        location / {
            proxy_pass https://x.x.x.x:443;
        }
    
        location /ws {
            proxy_pass http://appflowyws;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
        }
    
        listen 443 ssl;
        ssl_certificate /etc/letsencrypt/live/domain.name/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/domain.name/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
    }
    
  3. There's a lot of successful /ws calls, but also some of each of these:

    nginx-1            | 2025/07/04 04:25:48 [error] 29#29: *30291 recv() failed (104: Connection reset by peer) while proxying upgraded connection, client: x.x.x.y, server: , request: "GET /ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId={redact}&token=redact&lastMessageId=1748321057044-0 HTTP/1.1", upstream: "http://172.18.0.8:8000/ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId={redact}&token=redact&lastMessageId=1748321057044-0", host: "domain.name"
    
    nginx-1            | 2025/07/04 04:21:31 [error] 29#29: *30145 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.y, server: , request: "GET /ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId=redact&token=redact&lastMessageId=0-0 HTTP/1.1", upstream: "http://172.18.0.8:8000/ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId=redact&token=redact&lastMessageId=0-0", host: "domain.name"
    

    (None of these failures occur with the Windows client - once I get past the login issue I describe below)

  4. When I first reported, I was able to log in, but no content would load (however, a different issue was persistent: the login screen - using Password - would hang indefinitely at the "Verifying..." spinner. Closing and re-opening would bypass the login screen and go to the workspace. This happens on all client operating systems.). Now, however, it's just a plain black screen and the process is fully hung. I have to use the system manager to kill it.

<!-- gh-comment-id:3034585584 --> @rockerest commented on GitHub (Jul 4, 2025): 1. All of the containers seem to be running fine. 2. Yes, here's the config: <details><summary>Config</summary> ``` upstream appflowyws { server x.x.x.x:80; } map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { server_name domain.name; if ($http_user_agent ~* "(AI2Bot|Ai2Bot\-Dolma|aiHitBot|Amazonbot|Andibot|anthropic\-ai|Applebot|Applebot\-Extended|bedrockbot|Brightbot\ 1\.0|Bytespider|CCBot|ChatGPT\-User|Claude\-SearchBot|Claude\-User|Claude\-Web|ClaudeBot|cohere\-ai|cohere\-training\-data\-crawler|Cotoyogi|Crawlspace|Diffbot|DuckAssistBot|EchoboxBot|FacebookBot|facebookexternalhit|Factset_spyderbot|FirecrawlAgent|FriendlyCrawler|Google\-CloudVertexBot|Google\-Extended|GoogleOther|GoogleOther\-Image|GoogleOther\-Video|GPTBot|iaskspider/2\.0|ICC\-Crawler|ImagesiftBot|img2dataset|ISSCyberRiskCrawler|Kangaroo\ Bot|meta\-externalagent|Meta\-ExternalAgent|meta\-externalfetcher|Meta\-ExternalFetcher|MistralAI\-User/1\.0|MyCentralAIScraperBot|NovaAct|OAI\-SearchBot|omgili|omgilibot|Operator|PanguBot|Panscient|panscient\.com|Perplexity\-User|PerplexityBot|PetalBot|PhindBot|Poseidon\ Research\ Crawler|QualifiedBot|QuillBot|quillbot\.com|SBIntuitionsBot|Scrapy|SemrushBot|SemrushBot\-BA|SemrushBot\-CT|SemrushBot\-OCOB|SemrushBot\-SI|SemrushBot\-SWA|Sidetrade\ indexer\ bot|TikTokSpider|Timpibot|VelenPublicWebCrawler|Webzio\-Extended|wpbot|YandexAdditional|YandexAdditionalBot|YouBot)") { return 403; } location = /robots.txt { alias /var/www/global/robots.txt; } underscores_in_headers on; proxy_pass_request_headers on; client_max_body_size 2G; location / { proxy_pass https://x.x.x.x:443; } location /ws { proxy_pass http://appflowyws; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; } listen 443 ssl; ssl_certificate /etc/letsencrypt/live/domain.name/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/domain.name/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; } ``` </details> 3. There's a lot of successful /ws calls, but also some of each of these: ``` nginx-1 | 2025/07/04 04:25:48 [error] 29#29: *30291 recv() failed (104: Connection reset by peer) while proxying upgraded connection, client: x.x.x.y, server: , request: "GET /ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId={redact}&token=redact&lastMessageId=1748321057044-0 HTTP/1.1", upstream: "http://172.18.0.8:8000/ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId={redact}&token=redact&lastMessageId=1748321057044-0", host: "domain.name" ``` ``` nginx-1 | 2025/07/04 04:21:31 [error] 29#29: *30145 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.y, server: , request: "GET /ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId=redact&token=redact&lastMessageId=0-0 HTTP/1.1", upstream: "http://172.18.0.8:8000/ws/v2/f3064185-36ec-44a0-858d-d47812c6dcff?clientId=redact&deviceId=redact&token=redact&lastMessageId=0-0", host: "domain.name" ``` (None of these failures occur with the Windows client - once I get past the login issue I describe below) 4. When I first reported, I was able to log in, but no content would load (however, a different issue was persistent: the login screen - using Password - would hang indefinitely at the "Verifying..." spinner. Closing and re-opening would bypass the login screen and go to the workspace. This happens on all client operating systems.). Now, however, it's just a plain black screen and the process is fully hung. I have to use the system manager to kill it.
Author
Owner

@khorshuheng commented on GitHub (Jul 4, 2025):

Ok, that's strange. So if i understand correctly, on a windows client, you are able to login and view the content without issue, but on a linux client, you failed to do so?

Is your domain accessible publicly? If so, you can send the domain to me via email (shuheng @ appflowy.io). I am using Linux client, so i can check. You can create a user with password and send them to me as well.

<!-- gh-comment-id:3034638257 --> @khorshuheng commented on GitHub (Jul 4, 2025): Ok, that's strange. So if i understand correctly, on a windows client, you are able to login and view the content without issue, but on a linux client, you failed to do so? Is your domain accessible publicly? If so, you can send the domain to me via email (shuheng @ appflowy.io). I am using Linux client, so i can check. You can create a user with password and send them to me as well.
Author
Owner

@rockerest commented on GitHub (Jul 4, 2025):

That's all correct, @khorshuheng.

I'll send you an email soon. Unfortunately, I'm ALSO not able to sign in to the admin console, even though the magic link successfully authenticates me :(

<!-- gh-comment-id:3034655042 --> @rockerest commented on GitHub (Jul 4, 2025): That's all correct, @khorshuheng. I'll send you an email soon. Unfortunately, I'm ALSO not able to sign in to the admin console, even though the magic link successfully authenticates me :(
Author
Owner

@rockerest commented on GitHub (Jul 4, 2025):

Couple of updates:

  1. Being unable to access the admin console seems to be some kind of misconfiguration. If I directly navigate to /console/web/login it works, but if I navigate to /console/ or /console/web/ it does not redirect me.
  2. The inability to see any content is almost certainly related to Password login. When I use the magic link and manually type in the code, I am able to log in just fine.
<!-- gh-comment-id:3034790403 --> @rockerest commented on GitHub (Jul 4, 2025): Couple of updates: 1. Being unable to access the admin console seems to be some kind of misconfiguration. If I directly navigate to `/console/web/login` it works, but if I navigate to `/console/` or `/console/web/` it does not redirect me. 2. The inability to see any content is almost certainly related to Password login. When I use the magic link and manually type in the code, I am able to log in just fine.
Author
Owner

@rockerest commented on GitHub (Jul 4, 2025):

I'm going to close this for now.

This specific error isn't exactly resolved, but I can authenticate successfully using the magic link. I think this is significantly related to https://github.com/AppFlowy-IO/AppFlowy/issues/8105, where Password login always hangs (Windows & Linux). If that's resolved, I think there will be a clearer picture of why I can't load the workspace after a Pasword authentication. If it merits a new issue, I'll open one once I have a clearer idea of what's actually happening.

<!-- gh-comment-id:3037118694 --> @rockerest commented on GitHub (Jul 4, 2025): I'm going to close this for now. This _specific_ error isn't exactly resolved, but I **can** authenticate successfully using the magic link. I think this is significantly related to https://github.com/AppFlowy-IO/AppFlowy/issues/8105, where Password login always hangs (Windows & Linux). If that's resolved, I think there will be a clearer picture of why I can't load the workspace after a Pasword authentication. If it merits a new issue, I'll open one once I have a clearer idea of what's actually happening.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3557
No description provided.