[GH-ISSUE #8047] [Bug] AppFlowy 0.9.3 crashes when paired with Cloud 0.9.59 #3521

Closed
opened 2026-03-23 21:30:55 +00:00 by mirror · 9 comments
Owner

Originally created by @rockerest on GitHub (Jun 9, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8047

Bug Description

AppFlowy was working fine, but then I upgraded AppFlowy-Cloud to 0.9.59.

AppFlowy is now guaranteed to crash to the desktop, but the timing is not predictable.

Here is a complete crash log via docker compose logs -f from starting AppFlowy to the crash, which is only reported to the server as a client disconnect.

Image

Log text
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/user/profile HTTP/1.0" 200 348 "-" "-"
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace/f3064185-36ec-44a0-858d-d47812c6dcff/usage-and-limit HTTP/1.0" 404 0 "-" "-"
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace/f3064185-36ec-44a0-858d-d47812c6dcff/usage-and-limit HTTP/1.0" 404 0 "-" "-"
gotrue-1           | {"component":"api","duration":13191438,"level":"info","method":"GET","msg":"request completed","path":"/user/auth-info","referer":"appflowy-flutter://","remote_addr":"172.18.0.2","request_id":"047f49aa-9651-4f2c-9487-c5679b0e9d24","status":200,"time":"2025-06-09T20:50:34Z"}
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /gotrue/user/auth-info HTTP/1.0" 200 98 "-" "Dart/3.6 (dart:io)"
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace/v1/published-info/3561e5ab-9ee5-4d93-99ec-8b74d728fdba HTTP/1.0" 200 77 "-" "-"
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace?include_member_count=true&include_role=true HTTP/1.0" 200 403 "-" "-"
nginx-1            | 10.1.1.100 - - [09/Jun/2025:20:50:54 +0000] "GET /ws/v1 HTTP/1.1" 101 518311 "-" "-"
appflowy_cloud-1   | {"timestamp":"2025-06-09T20:50:54.302313Z","level":"INFO","fields":{"message":"remove client stream: uid:406207877313728512|device_id:{E8AAA40D-9F66-45AF-ACB4-C76B11EBC207}|connected_at:1749502240"},"target":"appflowy_collaborate::connect_state","filename":"services/appflowy-collaborate/src/connect_state.rs","line_number":109}

How to Reproduce

Environment

  • AppFlowy-Cloud 0.9.59 installed via Docker on RaspberryPi 4B
  • AppFlowy 0.9.3 on Windows (11)

A previous version of AppFlowy-Cloud did not cause this crash, but I'm not sure what the version was. Somewhere around 0.9.50, probably.

Steps

  1. Open AppFlowy
  2. Wait (sometimes for just a second or two)

Expected Behavior

No crashes to desktop.

Operating System

Windows 11

AppFlowy Version(s)

0.9.3 (but it's definitely the interaction with some later version of AppFlowy-Cloud, because this didn't happen until I upgraded)

Screenshots

No response

Additional Context

I'm happy to provide additional logs if there are any from the client. I only know how to access the Docker logs from the hosted server, so maybe there's A) something from the client or B) other logs from the server not via Docker.

Originally created by @rockerest on GitHub (Jun 9, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8047 ### Bug Description AppFlowy was working fine, but then I upgraded AppFlowy-Cloud to 0.9.59. AppFlowy is now guaranteed to crash to the desktop, but the timing is not predictable. Here is a complete crash log via `docker compose logs -f` from starting AppFlowy to the crash, which is only reported to the server as a client disconnect. ![Image](https://github.com/user-attachments/assets/739643ab-902b-4c9b-a2e2-fbd9f67fd863) <details> <summary>Log text</summary> ``` nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/user/profile HTTP/1.0" 200 348 "-" "-" nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace/f3064185-36ec-44a0-858d-d47812c6dcff/usage-and-limit HTTP/1.0" 404 0 "-" "-" nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace/f3064185-36ec-44a0-858d-d47812c6dcff/usage-and-limit HTTP/1.0" 404 0 "-" "-" gotrue-1 | {"component":"api","duration":13191438,"level":"info","method":"GET","msg":"request completed","path":"/user/auth-info","referer":"appflowy-flutter://","remote_addr":"172.18.0.2","request_id":"047f49aa-9651-4f2c-9487-c5679b0e9d24","status":200,"time":"2025-06-09T20:50:34Z"} nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /gotrue/user/auth-info HTTP/1.0" 200 98 "-" "Dart/3.6 (dart:io)" nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace/v1/published-info/3561e5ab-9ee5-4d93-99ec-8b74d728fdba HTTP/1.0" 200 77 "-" "-" nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:34 +0000] "GET /api/workspace?include_member_count=true&include_role=true HTTP/1.0" 200 403 "-" "-" nginx-1 | 10.1.1.100 - - [09/Jun/2025:20:50:54 +0000] "GET /ws/v1 HTTP/1.1" 101 518311 "-" "-" appflowy_cloud-1 | {"timestamp":"2025-06-09T20:50:54.302313Z","level":"INFO","fields":{"message":"remove client stream: uid:406207877313728512|device_id:{E8AAA40D-9F66-45AF-ACB4-C76B11EBC207}|connected_at:1749502240"},"target":"appflowy_collaborate::connect_state","filename":"services/appflowy-collaborate/src/connect_state.rs","line_number":109} ``` </details> ### How to Reproduce ### Environment - AppFlowy-Cloud 0.9.59 installed via Docker on RaspberryPi 4B - AppFlowy 0.9.3 on Windows (11) A previous version of AppFlowy-Cloud did not cause this crash, but I'm not sure what the version was. Somewhere around 0.9.50, probably. ### Steps 1. Open AppFlowy 2. Wait (sometimes for just a second or two) ### Expected Behavior No crashes to desktop. ### Operating System Windows 11 ### AppFlowy Version(s) 0.9.3 (but it's definitely the interaction with some later version of AppFlowy-Cloud, because this didn't happen until I upgraded) ### Screenshots _No response_ ### Additional Context I'm happy to provide additional logs if there are any from the client. I only know how to access the Docker logs from the hosted server, so maybe there's A) something from the client or B) other logs from the server not via Docker.
Author
Owner

@rockerest commented on GitHub (Jun 9, 2025):

I searched the Windows Event Viewer logs for AppFlowy crashes, and they're all basically identical.

Here's the latest:

  AppName AppFlowy.exe 
  AppVersion 0.9.3.0 
  AppTimeStamp 6836d6ff 
  ModuleName dart_ffi.dll 
  ModuleVersion 0.0.0.0 
  ModuleTimeStamp 6836d4a7 
  ExceptionCode c0000409 
  FaultingOffset 0000000001dbd184 
  ProcessId 0x7c08 
  ProcessCreationTime 0x1dbd985691d9400 
  AppPath C:\Program Files (x86)\AppFlowy\AppFlowy.exe 
  ModulePath C:\Program Files (x86)\AppFlowy\dart_ffi.dll 
  IntegratorReportId 7898bc13-d0a2-4c2b-baba-8e7aad115420 
  PackageFullName  
  PackageRelativeAppId  

Could c0000409 be pointing to https://doc.rust-lang.org/beta/error_codes/E0409.html?

<!-- gh-comment-id:2957101535 --> @rockerest commented on GitHub (Jun 9, 2025): I searched the Windows Event Viewer logs for AppFlowy crashes, and they're all basically identical. Here's the latest: ``` AppName AppFlowy.exe AppVersion 0.9.3.0 AppTimeStamp 6836d6ff ModuleName dart_ffi.dll ModuleVersion 0.0.0.0 ModuleTimeStamp 6836d4a7 ExceptionCode c0000409 FaultingOffset 0000000001dbd184 ProcessId 0x7c08 ProcessCreationTime 0x1dbd985691d9400 AppPath C:\Program Files (x86)\AppFlowy\AppFlowy.exe ModulePath C:\Program Files (x86)\AppFlowy\dart_ffi.dll IntegratorReportId 7898bc13-d0a2-4c2b-baba-8e7aad115420 PackageFullName PackageRelativeAppId ``` Could `c0000409` be pointing to https://doc.rust-lang.org/beta/error_codes/E0409.html?
Author
Owner

@khorshuheng commented on GitHub (Jun 10, 2025):

To obtain the client application log, go to manage data - export logs (or navigate to the folder location that stores the data).

Does it always crash right after the websocket connection?

As for the error code, it's likely stack buffer overrun.

<!-- gh-comment-id:2957415908 --> @khorshuheng commented on GitHub (Jun 10, 2025): To obtain the client application log, go to manage data - export logs (or navigate to the folder location that stores the data). Does it always crash right after the websocket connection? As for the error code, it's likely stack buffer overrun.
Author
Owner

@khorshuheng commented on GitHub (Jun 10, 2025):

Also, if you downgrade to an earlier version of appflowy cloud, does it still crash?

<!-- gh-comment-id:2957425485 --> @khorshuheng commented on GitHub (Jun 10, 2025): Also, if you downgrade to an earlier version of appflowy cloud, does it still crash?
Author
Owner

@khorshuheng commented on GitHub (Jun 10, 2025):

Ok, i can reproduce this, debugging now.

<!-- gh-comment-id:2957436486 --> @khorshuheng commented on GitHub (Jun 10, 2025): Ok, i can reproduce this, debugging now.
Author
Owner

@rockerest commented on GitHub (Jun 10, 2025):

I am able to reproduce on 0.9.57-0.9.59 but NOT on 0.9.55 (as far as I can tell).

0.9.56 is missing a Docker manifest so I had to build from source and that hard locked the RPi 😬, so I haven't been able to verify.
Something tells me it's AppFlowy-Cloud 0.9.56.

<!-- gh-comment-id:2957448116 --> @rockerest commented on GitHub (Jun 10, 2025): I am able to reproduce on 0.9.57-0.9.59 but NOT on 0.9.55 (as far as I can tell). 0.9.56 is missing a Docker manifest so I had to build from source and that hard locked the RPi 😬, so I haven't been able to verify. Something tells me it's AppFlowy-Cloud 0.9.56.
Author
Owner

@rockerest commented on GitHub (Jun 10, 2025):

Based on the logs (thanks for the info), here's a pretty typical crash:

{"msg":"🟢websocket connect success","time":"06-09 16:16:29","target":"client_api::retry"}
{"msg":"✅ Reconnected websocket successfully.","time":"06-09 16:16:29","target":"flowy_server::af_cloud::server"}
{"msg":"resume 71fcd06a-8a93-4f32-9a22-0e8751f09c22 sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"}
{"msg":"[websocket] state: Connected","time":"06-09 16:16:29","target":"flowy_server::af_cloud::server"}
{"msg":"resume 7ca7dfbe-fca6-5d52-a003-2e8b27a6f261 sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"}
{"msg":"resume 3561e5ab-9ee5-4d93-99ec-8b74d728fdba sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"}
{"msg":"resume f3064185-36ec-44a0-858d-d47812c6dcff sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"}
{"msg":"Error while processing message: failed to deserialize message: failed to decode variable length integer","time":"06-09 16:16:30","target":"client_api::collab_sync::collab_stream"}
{"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:30","target":"client_api::collab_sync::collab_stream"}
{"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:30","target":"client_api::collab_sync::collab_stream"}
{"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:31","target":"client_api::collab_sync::collab_stream"}
{"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:31","target":"client_api::collab_sync::collab_stream"}

I can provide the full log, but would prefer to do so privately if possible, as it would be a hassle to redact anything potentially private.

<!-- gh-comment-id:2957533855 --> @rockerest commented on GitHub (Jun 10, 2025): Based on the logs (thanks for the info), here's a pretty typical crash: ``` {"msg":"🟢websocket connect success","time":"06-09 16:16:29","target":"client_api::retry"} {"msg":"✅ Reconnected websocket successfully.","time":"06-09 16:16:29","target":"flowy_server::af_cloud::server"} {"msg":"resume 71fcd06a-8a93-4f32-9a22-0e8751f09c22 sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"} {"msg":"[websocket] state: Connected","time":"06-09 16:16:29","target":"flowy_server::af_cloud::server"} {"msg":"resume 7ca7dfbe-fca6-5d52-a003-2e8b27a6f261 sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"} {"msg":"resume 3561e5ab-9ee5-4d93-99ec-8b74d728fdba sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"} {"msg":"resume f3064185-36ec-44a0-858d-d47812c6dcff sync","time":"06-09 16:16:29","target":"client_api::collab_sync::sync_control"} {"msg":"Error while processing message: failed to deserialize message: failed to decode variable length integer","time":"06-09 16:16:30","target":"client_api::collab_sync::collab_stream"} {"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:30","target":"client_api::collab_sync::collab_stream"} {"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:30","target":"client_api::collab_sync::collab_stream"} {"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:31","target":"client_api::collab_sync::collab_stream"} {"msg":"Error while processing message: failed to deserialize message: while trying to read more data (expected: 1 bytes), an unexpected end of buffer was reached","time":"06-09 16:16:31","target":"client_api::collab_sync::collab_stream"} ``` I can provide the full log, but would prefer to do so privately if possible, as it would be a hassle to redact anything potentially private.
Author
Owner

@khorshuheng commented on GitHub (Jun 10, 2025):

It's alright, we have reproduce it. Some bugs have caused abnormal memory allocation.

For now, the safest way will be to revert back to older version.

<!-- gh-comment-id:2957676941 --> @khorshuheng commented on GitHub (Jun 10, 2025): It's alright, we have reproduce it. Some bugs have caused abnormal memory allocation. For now, the safest way will be to revert back to older version.
Author
Owner

@khorshuheng commented on GitHub (Jun 10, 2025):

@rockerest We have identified the issue, and will fix this in 0.9.60.

Also, it is indeed 0.9.56 that cause the issue.

<!-- gh-comment-id:2957816455 --> @khorshuheng commented on GitHub (Jun 10, 2025): @rockerest We have identified the issue, and will fix this in 0.9.60. Also, it is indeed 0.9.56 that cause the issue.
Author
Owner

@rockerest commented on GitHub (Jun 11, 2025):

Confirmed that Cloud 0.9.60 resolves this crash. Good job!

<!-- gh-comment-id:2963646273 --> @rockerest commented on GitHub (Jun 11, 2025): Confirmed that Cloud 0.9.60 resolves this crash. Good job!
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#3521
No description provided.