[GH-ISSUE #8225] [Bug] AppFlowy 0.9.9 crashes with 'too many open files' #3665

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

Originally created by @spmp on GitHub (Sep 16, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8225

Bug Description

I have installed AppFlowy via snap, flatpak, and finally deb/dpkg as after upgrading the snap the app crashes a lot. I was finally able to get a console output from the deb package and it gives me the following error:

...
(AppFlowy:138985): Gdk-CRITICAL **: 13:25:58.631: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed
flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24)
flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24)
flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24)
flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24)
flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24)

(AppFlowy:138985): Gtk-WARNING **: 13:25:59.017: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Error opening file /usr/share/icons/Yaru/16x16/status/image-missing.png: Too many open files (g-io-error-quark, 31)
Bail out! Gtk:ERROR:../../../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Error opening file /usr/share/icons/Yaru/16x16/status/image-missing.png: Too many open files (g-io-error-quark, 31)
Aborted

This is in Ubuntu 25.04

How to Reproduce

Launch AppFlowy, do stuff, do more stuff, and eventually the app will crash. It does not seem related to user input. Often it is when switching context back to the app.

Expected Behavior

That the app would not crash.

Operating System

Ubuntu 25.04

AppFlowy Version(s)

0.9.9

Screenshots

No response

Additional Context

Similar crash pattern across snap, flatpak, and deb.

Originally created by @spmp on GitHub (Sep 16, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8225 ### Bug Description I have installed AppFlowy via snap, flatpak, and finally deb/dpkg as after upgrading the snap the app crashes a lot. I was finally able to get a console output from the deb package and it gives me the following error: ``` ... (AppFlowy:138985): Gdk-CRITICAL **: 13:25:58.631: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24) flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24) flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24) flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24) flutter: Error saving preferences to disk: FileSystemException: Cannot open file, path = '/home/user/.local/share/io.appflowy.appflowy/shared_preferences.json' (OS Error: Too many open files, errno = 24) (AppFlowy:138985): Gtk-WARNING **: 13:25:59.017: Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. ** Gtk:ERROR:../../../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Error opening file /usr/share/icons/Yaru/16x16/status/image-missing.png: Too many open files (g-io-error-quark, 31) Bail out! Gtk:ERROR:../../../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Error opening file /usr/share/icons/Yaru/16x16/status/image-missing.png: Too many open files (g-io-error-quark, 31) Aborted ``` This is in Ubuntu 25.04 ### How to Reproduce Launch AppFlowy, do stuff, do more stuff, and eventually the app will crash. It does not seem related to user input. Often it is when switching context back to the app. ### Expected Behavior That the app would not crash. ### Operating System Ubuntu 25.04 ### AppFlowy Version(s) 0.9.9 ### Screenshots _No response_ ### Additional Context Similar crash pattern across snap, flatpak, and deb.
Author
Owner

@LucasXu0 commented on GitHub (Sep 17, 2025):

Hi @spmp, can you check the current system limit using ulimit -n?

<!-- gh-comment-id:3301016532 --> @LucasXu0 commented on GitHub (Sep 17, 2025): Hi @spmp, can you check the current system limit using `ulimit -n`?
Author
Owner

@spmp commented on GitHub (Sep 17, 2025):

It's low:
1024

On Tue, 16 Sept 2025 at 20:42, Lucas @.***> wrote:

LucasXu0 left a comment (AppFlowy-IO/AppFlowy#8225)
https://github.com/AppFlowy-IO/AppFlowy/issues/8225#issuecomment-3301016532

Hi @spmp https://github.com/spmp, can you check the current system
limit using ulimit -n?


Reply to this email directly, view it on GitHub
https://github.com/AppFlowy-IO/AppFlowy/issues/8225#issuecomment-3301016532,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYSXCIGZ6CKKBLETBSM2HL3TDDAJAVCNFSM6AAAAACGV5SCTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBRGAYTMNJTGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:3301085709 --> @spmp commented on GitHub (Sep 17, 2025): It's low: 1024 On Tue, 16 Sept 2025 at 20:42, Lucas ***@***.***> wrote: > *LucasXu0* left a comment (AppFlowy-IO/AppFlowy#8225) > <https://github.com/AppFlowy-IO/AppFlowy/issues/8225#issuecomment-3301016532> > > Hi @spmp <https://github.com/spmp>, can you check the current system > limit using ulimit -n? > > — > Reply to this email directly, view it on GitHub > <https://github.com/AppFlowy-IO/AppFlowy/issues/8225#issuecomment-3301016532>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAYSXCIGZ6CKKBLETBSM2HL3TDDAJAVCNFSM6AAAAACGV5SCTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMBRGAYTMNJTGI> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@LucasXu0 commented on GitHub (Sep 17, 2025):

You can try setting a larger limit and then relaunching the application.

<!-- gh-comment-id:3302735225 --> @LucasXu0 commented on GitHub (Sep 17, 2025): You can try setting a larger limit and then relaunching the application.
Author
Owner

@spmp commented on GitHub (Sep 17, 2025):

Thanks for the suggestion, I set hard limits to max system wide for my user, but no dice sadly:

{"msg":"Skipping reconnect, already connected","time":"09-17 11:18:17","target":"sync_log"}

(AppFlowy:7220): GLib-GIO-ERROR **: 11:18:17.175: epoll_create1 () failed: Too many open files
Trace/breakpoint trap

and

ulimit -u
59887

The error in the original message of not being able to save is gone at least 😉

<!-- gh-comment-id:3303921949 --> @spmp commented on GitHub (Sep 17, 2025): Thanks for the suggestion, I set hard limits to max system wide for my user, but no dice sadly: ``` {"msg":"Skipping reconnect, already connected","time":"09-17 11:18:17","target":"sync_log"} (AppFlowy:7220): GLib-GIO-ERROR **: 11:18:17.175: epoll_create1 () failed: Too many open files Trace/breakpoint trap ``` and ``` ulimit -u 59887 ``` The error in the original message of not being able to save is gone at least 😉
Author
Owner

@MouaisTe commented on GitHub (Sep 17, 2025):

I have the same problem and it's very boring. I changed my system limit but it still crash at random moments.
I use Fedora 42 and I use AppFlowy 0.9.9 with Flatpak. Notice that I use a custom icon theme.

Here are the logs (some parts are in french) :

User Logs:
--sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #33     onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26)
 (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #35     NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #36     NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:     at dart-ffi/src/lib.rs:303
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: {"msg":"[Flutter]: Uncaught platform errornStackTrace:n#0      _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)n#1      _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)n#2      customAlphabet (package:nanoid/nanoid.dart:15)n#3      nanoid (package:nanoid/nanoid.dart:8)n#4      _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)n#5      BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)n#6      TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)n#7      MappedIterable.elementAt (dart:_internal/iterable.dart:395)n#8      ListIterator.moveNext (dart:_internal/iterable.dart:364)n#9      NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)n#10     ExpandIterator.moveNext (dart:_internal/iterable.dart:499)n#11     new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)n#12     new _List._ofOther (dart:core-patch/array.dart:176)n#13     new _List.of (dart:core-patch/array.dart:130)n#14     new List.of (dart:core-patch/array_patch.dart:39)n#15     Iterable.toList (dart:core/iterable.dart:498)n#16     TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)n#17     TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)n#18     TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)n#19     DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)n#20     _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)n#21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)n#22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)n#23     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)n#24     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)n#25     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)n#26     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)n#27     EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)n#28     TextTransforms.insertText (package:appflowy_editor/src/editor/command/text_commands.dart:320)n#29     TextTransforms.insertTextAtCurrentSelection (package:appflowy_editor/src/editor/command/text_commands.dart:330)n#30     _ignoreKeysInCodeBlockCommandHandler (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:203)n#31     ignoreKeysInCodeBlock.<anonymous closure>.<anonymous closure> (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:53)n#32     executeCharacterShortcutEvent (package:appflowy_editor/src/editor/editor_component/service/ime/character_shortcut_event_helper.dart:35)n#33     onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26)n#34     KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)n<asynchronous suspension>n#35     NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)n<asynchronous suspension>n#36     NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)n<asynchronous suspension>n","time":"09-17 19:27:31","target":"dart_ffi"}
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:   2025-09-17 19:27:31 ERROR dart_ffi: [Flutter]: Uncaught platform error
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: StackTrace:
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #0      _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #1      _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #2      customAlphabet (package:nanoid/nanoid.dart:15)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #3      nanoid (package:nanoid/nanoid.dart:8)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #4      _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #5      BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #6      TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #7      MappedIterable.elementAt (dart:_internal/iterable.dart:395)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #8      ListIterator.moveNext (dart:_internal/iterable.dart:364)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #9      NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #10     ExpandIterator.moveNext (dart:_internal/iterable.dart:499)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #11     new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #12     new _List._ofOther (dart:core-patch/array.dart:176)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #13     new _List.of (dart:core-patch/array.dart:130)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #14     new List.of (dart:core-patch/array_patch.dart:39)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #15     Iterable.toList (dart:core/iterable.dart:498)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #16     TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #17     TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #18     TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #19     DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #20     _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #23     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #24     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #25     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #26     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #27     EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #28     TextTransforms.insertText (package:appflowy_editor/src/editor/command/text_commands.dart:320)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #29     TextTransforms.insertTextAtCurrentSelection (package:appflowy_editor/src/editor/command/text_commands.dart:330)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #30     _ignoreKeysInCodeBlockCommandHandler (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:203)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #31     ignoreKeysInCodeBlock.<anonymous closure>.<anonymous closure> (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:53)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #32     executeCharacterShortcutEvent (package:appflowy_editor/src/editor/editor_component/service/ime/character_shortcut_event_helper.dart:35)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #33     onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #34     KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #35     NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #36     NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:     at dart-ffi/src/lib.rs:303
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: {"msg":"[Flutter]: Uncaught platform errornStackTrace:n#0      _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)n#1      _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)n#2      customAlphabet (package:nanoid/nanoid.dart:15)n#3      nanoid (package:nanoid/nanoid.dart:8)n#4      _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)n#5      BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)n#6      TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)n#7      MappedIterable.elementAt (dart:_internal/iterable.dart:395)n#8      ListIterator.moveNext (dart:_internal/iterable.dart:364)n#9      NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)n#10     ExpandIterator.moveNext (dart:_internal/iterable.dart:499)n#11     new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)n#12     new _List._ofOther (dart:core-patch/array.dart:176)n#13     new _List.of (dart:core-patch/array.dart:130)n#14     new List.of (dart:core-patch/array_patch.dart:39)n#15     Iterable.toList (dart:core/iterable.dart:498)n#16     TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)n#17     TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)n#18     TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)n#19     DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)n#20     _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)n#21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)n#22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)n#23     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)n#24     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)n#25     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)n#26     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)n#27     EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)n#28     TextTransforms.insertText (package:appflowy_editor/src/editor/command/text_commands.dart:320)n#29     TextTransforms.insertTextAtCurrentSelection (package:appflowy_editor/src/editor/command/text_commands.dart:330)n#30     _ignoreKeysInCodeBlockCommandHandler (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:203)n#31     ignoreKeysInCodeBlock.<anonymous closure>.<anonymous closure> (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:53)n#32     executeCharacterShortcutEvent (package:appflowy_editor/src/editor/editor_component/service/ime/character_shortcut_event_helper.dart:35)n#33     onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26)n#34     KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)n<asynchronous suspension>n#35     NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)n<asynchronous suspension>n#36     NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)n<asynchronous suspension>n","time":"09-17 19:27:31","target":"dart_ffi"}
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:   2025-09-17 19:27:31 ERROR dart_ffi: [Flutter]: Uncaught platform error
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: StackTrace:
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #0      _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #1      _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #2      customAlphabet (package:nanoid/nanoid.dart:15)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #3      nanoid (package:nanoid/nanoid.dart:8)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #4      _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #5      BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #6      TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #7      MappedIterable.elementAt (dart:_internal/iterable.dart:395)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #8      ListIterator.moveNext (dart:_internal/iterable.dart:364)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #9      NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #10     ExpandIterator.moveNext (dart:_internal/iterable.dart:499)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #11     new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #12     new _List._ofOther (dart:core-patch/array.dart:176)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #13     new _List.of (dart:core-patch/array.dart:130)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #14     new List.of (dart:core-patch/array_patch.dart:39)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #15     Iterable.toList (dart:core/iterable.dart:498)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #16     TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #17     TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #18     TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #19     DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #20     _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #23     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #24     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #25     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #26     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #27     EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #28     onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:89)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #29     KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #30     NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #31     NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension>
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]:     at dart-ffi/src/lib.rs:303
sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: {"msg":"[Flutter]: Uncaught platform errornStackTrace:n#0      _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)n#1      _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)n#2      customAlphabet (package:nanoid/nanoid.dart:15)n#3      nanoid (package:nanoid/nanoid.dart:8)n#4      _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)n#5      BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)n#6      TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)n#7      MappedIterable.elementAt (dart:_internal/iterable.dart:395)n#8      ListIterator.moveNext (dart:_internal/iterable.dart:364)n#9      NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)n#10     ExpandIterator.moveNext (dart:_internal/iterable.dart:499)n#11     new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)n#12     new _List._ofOther (dart:core-patch/array.dart:176)n#13     new _List.of (dart:core-patch/array.dart:130)n#14     new List.of (dart:core-patch/array_patch.dart:39)n#15     Iterable.toList (dart:core/iterable.dart:498)n#16     TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)n#17     TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)n#18     TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)n#19     DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)n#20     _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)n#21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)n#22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)n#23     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)n#24     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)n#25     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)n#26     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)n#27     EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)n#28     onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:89)n<asynchronous suspension>n#29     KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)n<asynchronous suspension>n#30     NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)n<asynchronous suspension>n#31     NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)n<asynchronous suspension>n","time":"09-17 19:27:31","target":"dart_ffi"}
sept. 17 19:27:32 fedora AppFlowy[48620]: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed
sept. 17 19:27:33 fedora AppFlowy[48620]: epoll_create1 () failed: Trop de fichiers ouverts
--

<!-- gh-comment-id:3303975449 --> @MouaisTe commented on GitHub (Sep 17, 2025): I have the same problem and it's very boring. I changed my system limit but it still crash at random moments. I use Fedora 42 and I use AppFlowy 0.9.9 with Flatpak. Notice that I use a custom icon theme. Here are the logs (some parts are in french) : ``` User Logs: --sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #33 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26) (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #35 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #36 NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: at dart-ffi/src/lib.rs:303 sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: {"msg":"[Flutter]: Uncaught platform errornStackTrace:n#0 _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)n#1 _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)n#2 customAlphabet (package:nanoid/nanoid.dart:15)n#3 nanoid (package:nanoid/nanoid.dart:8)n#4 _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)n#5 BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)n#6 TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)n#7 MappedIterable.elementAt (dart:_internal/iterable.dart:395)n#8 ListIterator.moveNext (dart:_internal/iterable.dart:364)n#9 NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)n#10 ExpandIterator.moveNext (dart:_internal/iterable.dart:499)n#11 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)n#12 new _List._ofOther (dart:core-patch/array.dart:176)n#13 new _List.of (dart:core-patch/array.dart:130)n#14 new List.of (dart:core-patch/array_patch.dart:39)n#15 Iterable.toList (dart:core/iterable.dart:498)n#16 TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)n#17 TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)n#18 TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)n#19 DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)n#20 _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)n#21 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)n#22 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)n#23 _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)n#24 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)n#25 _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)n#26 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)n#27 EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)n#28 TextTransforms.insertText (package:appflowy_editor/src/editor/command/text_commands.dart:320)n#29 TextTransforms.insertTextAtCurrentSelection (package:appflowy_editor/src/editor/command/text_commands.dart:330)n#30 _ignoreKeysInCodeBlockCommandHandler (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:203)n#31 ignoreKeysInCodeBlock.<anonymous closure>.<anonymous closure> (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:53)n#32 executeCharacterShortcutEvent (package:appflowy_editor/src/editor/editor_component/service/ime/character_shortcut_event_helper.dart:35)n#33 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26)n#34 KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)n<asynchronous suspension>n#35 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)n<asynchronous suspension>n#36 NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)n<asynchronous suspension>n","time":"09-17 19:27:31","target":"dart_ffi"} sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: 2025-09-17 19:27:31 ERROR dart_ffi: [Flutter]: Uncaught platform error sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: StackTrace: sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #0 _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #1 _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #2 customAlphabet (package:nanoid/nanoid.dart:15) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #3 nanoid (package:nanoid/nanoid.dart:8) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #4 _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #5 BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #6 TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #7 MappedIterable.elementAt (dart:_internal/iterable.dart:395) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #8 ListIterator.moveNext (dart:_internal/iterable.dart:364) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #9 NonNullsIterator.moveNext (dart:_internal/iterable.dart:931) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #10 ExpandIterator.moveNext (dart:_internal/iterable.dart:499) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #11 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #12 new _List._ofOther (dart:core-patch/array.dart:176) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #13 new _List.of (dart:core-patch/array.dart:130) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #14 new List.of (dart:core-patch/array_patch.dart:39) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #15 Iterable.toList (dart:core/iterable.dart:498) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #16 TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #17 TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #18 TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #19 DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #20 _RootZone.runUnaryGuarded (dart:async/zone.dart:1609) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #21 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #22 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #23 _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #24 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #25 _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #26 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #27 EditorState.apply (package:appflowy_editor/src/editor_state.dart:422) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #28 TextTransforms.insertText (package:appflowy_editor/src/editor/command/text_commands.dart:320) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #29 TextTransforms.insertTextAtCurrentSelection (package:appflowy_editor/src/editor/command/text_commands.dart:330) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #30 _ignoreKeysInCodeBlockCommandHandler (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:203) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #31 ignoreKeysInCodeBlock.<anonymous closure>.<anonymous closure> (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:53) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #32 executeCharacterShortcutEvent (package:appflowy_editor/src/editor/editor_component/service/ime/character_shortcut_event_helper.dart:35) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #33 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #34 KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #35 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #36 NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: at dart-ffi/src/lib.rs:303 sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: {"msg":"[Flutter]: Uncaught platform errornStackTrace:n#0 _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)n#1 _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)n#2 customAlphabet (package:nanoid/nanoid.dart:15)n#3 nanoid (package:nanoid/nanoid.dart:8)n#4 _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)n#5 BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)n#6 TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)n#7 MappedIterable.elementAt (dart:_internal/iterable.dart:395)n#8 ListIterator.moveNext (dart:_internal/iterable.dart:364)n#9 NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)n#10 ExpandIterator.moveNext (dart:_internal/iterable.dart:499)n#11 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)n#12 new _List._ofOther (dart:core-patch/array.dart:176)n#13 new _List.of (dart:core-patch/array.dart:130)n#14 new List.of (dart:core-patch/array_patch.dart:39)n#15 Iterable.toList (dart:core/iterable.dart:498)n#16 TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)n#17 TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)n#18 TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)n#19 DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)n#20 _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)n#21 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)n#22 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)n#23 _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)n#24 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)n#25 _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)n#26 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)n#27 EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)n#28 TextTransforms.insertText (package:appflowy_editor/src/editor/command/text_commands.dart:320)n#29 TextTransforms.insertTextAtCurrentSelection (package:appflowy_editor/src/editor/command/text_commands.dart:330)n#30 _ignoreKeysInCodeBlockCommandHandler (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:203)n#31 ignoreKeysInCodeBlock.<anonymous closure>.<anonymous closure> (package:appflowy_editor_plugins/src/code_block/code_block_shortcuts.dart:53)n#32 executeCharacterShortcutEvent (package:appflowy_editor/src/editor/editor_component/service/ime/character_shortcut_event_helper.dart:35)n#33 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:26)n#34 KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)n<asynchronous suspension>n#35 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)n<asynchronous suspension>n#36 NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)n<asynchronous suspension>n","time":"09-17 19:27:31","target":"dart_ffi"} sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: 2025-09-17 19:27:31 ERROR dart_ffi: [Flutter]: Uncaught platform error sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: StackTrace: sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #0 _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #1 _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #2 customAlphabet (package:nanoid/nanoid.dart:15) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #3 nanoid (package:nanoid/nanoid.dart:8) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #4 _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #5 BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #6 TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #7 MappedIterable.elementAt (dart:_internal/iterable.dart:395) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #8 ListIterator.moveNext (dart:_internal/iterable.dart:364) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #9 NonNullsIterator.moveNext (dart:_internal/iterable.dart:931) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #10 ExpandIterator.moveNext (dart:_internal/iterable.dart:499) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #11 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #12 new _List._ofOther (dart:core-patch/array.dart:176) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #13 new _List.of (dart:core-patch/array.dart:130) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #14 new List.of (dart:core-patch/array_patch.dart:39) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #15 Iterable.toList (dart:core/iterable.dart:498) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #16 TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #17 TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #18 TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #19 DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #20 _RootZone.runUnaryGuarded (dart:async/zone.dart:1609) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #21 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #22 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #23 _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #24 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #25 _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #26 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #27 EditorState.apply (package:appflowy_editor/src/editor_state.dart:422) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #28 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:89) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #29 KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #30 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: #31 NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126) sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: <asynchronous suspension> sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: at dart-ffi/src/lib.rs:303 sept. 17 19:27:31 fedora io.appflowy.AppFlowy.desktop[48620]: {"msg":"[Flutter]: Uncaught platform errornStackTrace:n#0 _SecureRandom._getBytes (dart:math-patch/math_patch.dart:281)n#1 _SecureRandom.nextInt (dart:math-patch/math_patch.dart:293)n#2 customAlphabet (package:nanoid/nanoid.dart:15)n#3 nanoid (package:nanoid/nanoid.dart:8)n#4 _extension#2.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:295)n#5 BlockAction.toBlockAction (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:149)n#6 TransactionAdapter.transactionToBlockActions.<anonymous closure> (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:115)n#7 MappedIterable.elementAt (dart:_internal/iterable.dart:395)n#8 ListIterator.moveNext (dart:_internal/iterable.dart:364)n#9 NonNullsIterator.moveNext (dart:_internal/iterable.dart:931)n#10 ExpandIterator.moveNext (dart:_internal/iterable.dart:499)n#11 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202)n#12 new _List._ofOther (dart:core-patch/array.dart:176)n#13 new _List.of (dart:core-patch/array.dart:130)n#14 new List.of (dart:core-patch/array_patch.dart:39)n#15 Iterable.toList (dart:core/iterable.dart:498)n#16 TransactionAdapter.transactionToBlockActions (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:118)n#17 TransactionAdapter._applyInternal (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:54)n#18 TransactionAdapter.apply (package:appflowy/plugins/document/application/editor_transaction_adapter.dart:36)n#19 DocumentBloc._initAppFlowyEditorState.<anonymous closure> (package:appflowy/plugins/document/application/document_bloc.dart:294)n#20 _RootZone.runUnaryGuarded (dart:async/zone.dart:1609)n#21 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)n#22 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297)n#23 _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:378)n#24 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:315)n#25 _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:377)n#26 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244)n#27 EditorState.apply (package:appflowy_editor/src/editor_state.dart:422)n#28 onInsert (package:appflowy_editor/src/editor/editor_component/service/ime/delta_input_on_insert_impl.dart:89)n<asynchronous suspension>n#29 KeyboardServiceWidgetState.buildTextInputService.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/keyboard_service_widget.dart:377)n<asynchronous suspension>n#30 NonDeltaTextInputService.apply (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:55)n<asynchronous suspension>n#31 NonDeltaTextInputService.updateEditingValue.<anonymous closure> (package:appflowy_editor/src/editor/editor_component/service/ime/non_delta_input_service.dart:126)n<asynchronous suspension>n","time":"09-17 19:27:31","target":"dart_ffi"} sept. 17 19:27:32 fedora AppFlowy[48620]: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed sept. 17 19:27:33 fedora AppFlowy[48620]: epoll_create1 () failed: Trop de fichiers ouverts -- ```
Author
Owner

@LucasXu0 commented on GitHub (Sep 18, 2025):

@MouaisTe Are you runing the application in debug mode?

<!-- gh-comment-id:3305179843 --> @LucasXu0 commented on GitHub (Sep 18, 2025): ~~@MouaisTe Are you runing the application in debug mode?~~
Author
Owner

@LucasXu0 commented on GitHub (Sep 18, 2025):

When you see the 'Too many open files' error, please try running lsof -p <APPFLOWY_PID> to see what files AppFlowy has open.

<!-- gh-comment-id:3305613469 --> @LucasXu0 commented on GitHub (Sep 18, 2025): When you see the 'Too many open files' error, please try running `lsof -p <APPFLOWY_PID>` to see what files AppFlowy has open.
Author
Owner

@MouaisTe commented on GitHub (Sep 18, 2025):

Here it is

COMMAND   PID  USER   FD      TYPE             DEVICE SIZE/OFF    NODE NAME
bwrap   18125 myself  cwd       DIR               0,45     1138     257 /home/myself
bwrap   18125 myself  rtd       DIR               0,38      180     256 /
bwrap   18125 myself  txt       REG               0,38    86744    8438 /usr/bin/bwrap
bwrap   18125 myself  mem       REG               0,36             8438 /usr/bin/bwrap (path dev=0,38)
bwrap   18125 myself  mem       REG               0,36            40622 /usr/lib64/libpcre2-8.so.0.14.0 (path dev=0,38)
bwrap   18125 myself  mem       REG               0,36          3833323 /usr/lib64/libc.so.6 (path dev=0,38)
bwrap   18125 myself  mem       REG               0,36          3475263 /usr/lib64/libgcc_s-15-20250808.so.1 (path dev=0,38)
bwrap   18125 myself  mem       REG               0,36            39850 /usr/lib64/libcap.so.2.73 (path dev=0,38)
bwrap   18125 myself  mem       REG               0,36          1463884 /usr/lib64/libselinux.so.1 (path dev=0,38)
bwrap   18125 myself  mem       REG               0,36          3833320 /usr/lib64/ld-linux-x86-64.so.2 (path dev=0,38)
bwrap   18125 myself    0r      CHR                1,3      0t0       4 /dev/null
bwrap   18125 myself    1u     unix 0x000000000e093bf2      0t0  171834 type=STREAM (CONNECTED)
bwrap   18125 myself    2u     unix 0x000000000e093bf2      0t0  171834 type=STREAM (CONNECTED)
bwrap   18125 myself    3u  a_inode               0,16        0    2086 [signalfd]
bwrap   18125 myself    4u  a_inode               0,16        0    2086 [eventfd:576]
<!-- gh-comment-id:3307256488 --> @MouaisTe commented on GitHub (Sep 18, 2025): Here it is ``` COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bwrap 18125 myself cwd DIR 0,45 1138 257 /home/myself bwrap 18125 myself rtd DIR 0,38 180 256 / bwrap 18125 myself txt REG 0,38 86744 8438 /usr/bin/bwrap bwrap 18125 myself mem REG 0,36 8438 /usr/bin/bwrap (path dev=0,38) bwrap 18125 myself mem REG 0,36 40622 /usr/lib64/libpcre2-8.so.0.14.0 (path dev=0,38) bwrap 18125 myself mem REG 0,36 3833323 /usr/lib64/libc.so.6 (path dev=0,38) bwrap 18125 myself mem REG 0,36 3475263 /usr/lib64/libgcc_s-15-20250808.so.1 (path dev=0,38) bwrap 18125 myself mem REG 0,36 39850 /usr/lib64/libcap.so.2.73 (path dev=0,38) bwrap 18125 myself mem REG 0,36 1463884 /usr/lib64/libselinux.so.1 (path dev=0,38) bwrap 18125 myself mem REG 0,36 3833320 /usr/lib64/ld-linux-x86-64.so.2 (path dev=0,38) bwrap 18125 myself 0r CHR 1,3 0t0 4 /dev/null bwrap 18125 myself 1u unix 0x000000000e093bf2 0t0 171834 type=STREAM (CONNECTED) bwrap 18125 myself 2u unix 0x000000000e093bf2 0t0 171834 type=STREAM (CONNECTED) bwrap 18125 myself 3u a_inode 0,16 0 2086 [signalfd] bwrap 18125 myself 4u a_inode 0,16 0 2086 [eventfd:576] ```
Author
Owner

@spmp commented on GitHub (Sep 18, 2025):

OK, so I went a bit over the top and had a look at lsof every 5 seconds, and this was mostly when the app was not in focus. The file count increases constantly and the app crashes when resuming focus when file count is greater than 1024.
I also kept a list of all the files each time.
The diff between them is largely IPV4 connections like:

diff /tmp/appflowy-files-2025-09-18-095517.txt /tmp/appflowy-files-2025-09-18-095512.txt
1253,1256c1253,1256
< AppFlowy 28194 user 1012u     IPv4             184912      0t0      TCP laptop:37054->192.0.80.242:https (CLOSE_WAIT)
< AppFlowy 28194 user 1013u     IPv4             188632      0t0      TCP laptop:37056->192.0.80.242:https (CLOSE_WAIT)
< AppFlowy 28194 user 1014u     IPv4             186808      0t0      TCP laptop:37058->192.0.80.242:https (CLOSE_WAIT)
< AppFlowy 28194 user 1015u     IPv4             184275      0t0      TCP laptop:52606->192.0.80.240:https (CLOSE_WAIT)
---
> AppFlowy 28194 user 1012u     IPv4             184912      0t0      TCP laptop:37054->192.0.80.242:https (ESTABLISHED)
> AppFlowy 28194 user 1013u     IPv4             188632      0t0      TCP laptop:37056->192.0.80.242:https (ESTABLISHED)
> AppFlowy 28194 user 1014u     IPv4             186808      0t0      TCP laptop:37058->192.0.80.242:https (ESTABLISHED)
> AppFlowy 28194 user 1015u     IPv4             184275      0t0      TCP laptop:52606->192.0.80.240:https (ESTABLISHED)

And file differences

diff /tmp/appflowy-files-2025-09-18-095910.txt /tmp/appflowy-files-2025-09-18-095522.txt
274c274
< AppFlowy 28194 user   33w      REG               0,52    12815 49009751 /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/log.sync.2025-09-18-15
---
> AppFlowy 28194 user   33w      REG               0,52    12718 49009751 /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/log.sync.2025-09-18-15
895a896
> AppFlowy 28194 user  655u      REG               0,52   229376 48987987 /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/486492204777345024/flowy-database.db
<!-- gh-comment-id:3308357192 --> @spmp commented on GitHub (Sep 18, 2025): OK, so I went a bit over the top and had a look at `lsof` every 5 seconds, and this was mostly when the app was not in focus. The file count increases constantly and the app crashes when resuming focus when file count is greater than 1024. I also kept a list of all the files each time. The diff between them is largely IPV4 connections like: ``` diff /tmp/appflowy-files-2025-09-18-095517.txt /tmp/appflowy-files-2025-09-18-095512.txt 1253,1256c1253,1256 < AppFlowy 28194 user 1012u IPv4 184912 0t0 TCP laptop:37054->192.0.80.242:https (CLOSE_WAIT) < AppFlowy 28194 user 1013u IPv4 188632 0t0 TCP laptop:37056->192.0.80.242:https (CLOSE_WAIT) < AppFlowy 28194 user 1014u IPv4 186808 0t0 TCP laptop:37058->192.0.80.242:https (CLOSE_WAIT) < AppFlowy 28194 user 1015u IPv4 184275 0t0 TCP laptop:52606->192.0.80.240:https (CLOSE_WAIT) --- > AppFlowy 28194 user 1012u IPv4 184912 0t0 TCP laptop:37054->192.0.80.242:https (ESTABLISHED) > AppFlowy 28194 user 1013u IPv4 188632 0t0 TCP laptop:37056->192.0.80.242:https (ESTABLISHED) > AppFlowy 28194 user 1014u IPv4 186808 0t0 TCP laptop:37058->192.0.80.242:https (ESTABLISHED) > AppFlowy 28194 user 1015u IPv4 184275 0t0 TCP laptop:52606->192.0.80.240:https (ESTABLISHED) ``` And file differences ``` diff /tmp/appflowy-files-2025-09-18-095910.txt /tmp/appflowy-files-2025-09-18-095522.txt 274c274 < AppFlowy 28194 user 33w REG 0,52 12815 49009751 /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/log.sync.2025-09-18-15 --- > AppFlowy 28194 user 33w REG 0,52 12718 49009751 /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/log.sync.2025-09-18-15 895a896 > AppFlowy 28194 user 655u REG 0,52 229376 48987987 /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/486492204777345024/flowy-database.db ```
Author
Owner

@spmp commented on GitHub (Sep 18, 2025):

Also worth noting that the crashes seem to log me out on my other device - my iOS app. Web app stays logged in, but that's got other issues ;)

<!-- gh-comment-id:3308461722 --> @spmp commented on GitHub (Sep 18, 2025): Also worth noting that the crashes seem to log me out on my other device - my iOS app. Web app stays logged in, but that's got other issues ;)
Author
Owner

@spmp commented on GitHub (Sep 18, 2025):

I have been monitoring the number of open files whilst in an active session, the number of files stays stable around 1294 before AppFlowy eventually crashed on a ctrl+x - so yes, open files, but maybe not. I will see if the number gets higher.

APID=$(pgrep AppFlowy); while : ; do date; lsof -p ${APID} 2>/dev/null| wc -l; sleep 10; done
...
Thu 18 Sep 2025 12:10:59 MDT
1293
...
Thu 18 Sep 2025 12:12:53 MDT
1295
Thu 18 Sep 2025 12:13:03 MDT
1295
...
Thu 18 Sep 2025 12:15:36 MDT
1295
Thu 18 Sep 2025 12:15:46 MDT
1294
Thu 18 Sep 2025 12:15:56 MDT
1294
Thu 18 Sep 2025 12:16:07 MDT
1294

I downgraded to 0.9.8 and no problems. Open files at ~340

<!-- gh-comment-id:3309258272 --> @spmp commented on GitHub (Sep 18, 2025): I have been monitoring the number of open files whilst in an active session, the number of files stays stable around 1294 before AppFlowy eventually crashed on a `ctrl+x` - so yes, open files, but maybe not. I will see if the number gets higher. ``` APID=$(pgrep AppFlowy); while : ; do date; lsof -p ${APID} 2>/dev/null| wc -l; sleep 10; done ... Thu 18 Sep 2025 12:10:59 MDT 1293 ... Thu 18 Sep 2025 12:12:53 MDT 1295 Thu 18 Sep 2025 12:13:03 MDT 1295 ... Thu 18 Sep 2025 12:15:36 MDT 1295 Thu 18 Sep 2025 12:15:46 MDT 1294 Thu 18 Sep 2025 12:15:56 MDT 1294 Thu 18 Sep 2025 12:16:07 MDT 1294 ``` I downgraded to 0.9.8 and no problems. Open files at ~340
Author
Owner

@LucasXu0 commented on GitHub (Sep 19, 2025):

Can you try this version: https://github.com/AppFlowy-IO/AppFlowy-Builder/releases/tag/0.10.0-250918-0747? We've added some logs to help address the issue.

<!-- gh-comment-id:3310295645 --> @LucasXu0 commented on GitHub (Sep 19, 2025): Can you try this version: https://github.com/AppFlowy-IO/AppFlowy-Builder/releases/tag/0.10.0-250918-0747? We've added some logs to help address the issue.
Author
Owner

@spmp commented on GitHub (Sep 22, 2025):

OK, tried with 0.10.0, open files (including network connections to about 1294, open files to around 338, then crash.
Heres some of the output:

{"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: Failed to create a temp file at /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/486492204777345024/http_cache/tmp","time":"09-22 14:50:36","target":"flowy_user::user_manager::manager_workspace_control"}
  2025-09-22 14:52:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 14:52:35","target":"sync_log"}
  2025-09-22 14:54:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 14:54:35","target":"sync_log"}
{"msg":"[🟢 GET_SERVER_INFO - START]","time":"09-22 14:55:35","target":"client_api::http"}
{"msg":"[GET_SERVER_INFO - END]","time":"09-22 14:55:35","target":"client_api::http"}
  2025-09-22 14:55:35 ERROR flowy_user::user_manager::manager_workspace_control: Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)
    at flowy-user/src/user_manager/manager_workspace_control.rs:94

{"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)","time":"09-22 14:55:35","target":"flowy_user::user_manager::manager_workspace_control"}
  2025-09-22 14:56:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 14:56:35","target":"sync_log"}
  2025-09-22 14:58:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 14:58:35","target":"sync_log"}
  2025-09-22 15:00:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 15:00:35","target":"sync_log"}
{"msg":"[🟢 GET_SERVER_INFO - START]","time":"09-22 15:00:35","target":"client_api::http"}
Error reading the log directory/files: Too many open files (os error 24)
Couldn't create writer for logs: failed to create initial log file: Too many open files (os error 24)
{"msg":"[GET_SERVER_INFO - END]","time":"09-22 15:00:35","target":"client_api::http"}
  2025-09-22 15:00:35 ERROR flowy_user::user_manager::manager_workspace_control: Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)
    at flowy-user/src/user_manager/manager_workspace_control.rs:94

{"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)","time":"09-22 15:00:35","target":"flowy_user::user_manager::manager_workspace_control"}
  2025-09-22 15:02:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 15:02:35","target":"sync_log"}
  2025-09-22 15:04:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 15:04:35","target":"sync_log"}
{"msg":"[🟢 GET_SERVER_INFO - START]","time":"09-22 15:05:35","target":"client_api::http"}
{"msg":"[GET_SERVER_INFO - END]","time":"09-22 15:05:35","target":"client_api::http"}
  2025-09-22 15:05:35 ERROR flowy_user::user_manager::manager_workspace_control: Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)
    at flowy-user/src/user_manager/manager_workspace_control.rs:94

{"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)","time":"09-22 15:05:35","target":"flowy_user::user_manager::manager_workspace_control"}
  2025-09-22 15:06:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 15:06:35","target":"sync_log"}
  2025-09-22 15:08:35  INFO sync_log: Periodic check websocket connection status
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404

{"msg":"Periodic check websocket connection status","time":"09-22 15:08:35","target":"sync_log"}
  2025-09-22 15:09:37  INFO flowy_user::user_manager::manager_workspace_control: Reconnecting workspace: d7757dbf-ebcf-4187-9651-0ad6f2584ab9
    at flowy-user/src/user_manager/manager_workspace_control.rs:260

{"msg":"Reconnecting workspace: d7757dbf-ebcf-4187-9651-0ad6f2584ab9","time":"09-22 15:09:37","target":"flowy_user::user_manager::manager_workspace_control"}
  2025-09-22 15:09:37  INFO sync_log: Skipping reconnect, already connected
    at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:125

{"msg":"Skipping reconnect, already connected","time":"09-22 15:09:37","target":"sync_log"}

(AppFlowy:183646): GLib-GIO-ERROR **: 15:09:37.053: epoll_create1 () failed: Too many open files
Trace/breakpoint trap
<!-- gh-comment-id:3321506544 --> @spmp commented on GitHub (Sep 22, 2025): OK, tried with 0.10.0, open files (including network connections to about 1294, open files to around 338, then crash. Heres some of the output: ``` {"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: Failed to create a temp file at /home/user/.local/share/io.appflowy.appflowy/data_appflowy.example.com/486492204777345024/http_cache/tmp","time":"09-22 14:50:36","target":"flowy_user::user_manager::manager_workspace_control"} 2025-09-22 14:52:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 14:52:35","target":"sync_log"} 2025-09-22 14:54:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 14:54:35","target":"sync_log"} {"msg":"[🟢 GET_SERVER_INFO - START]","time":"09-22 14:55:35","target":"client_api::http"} {"msg":"[GET_SERVER_INFO - END]","time":"09-22 14:55:35","target":"client_api::http"} 2025-09-22 14:55:35 ERROR flowy_user::user_manager::manager_workspace_control: Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info) at flowy-user/src/user_manager/manager_workspace_control.rs:94 {"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)","time":"09-22 14:55:35","target":"flowy_user::user_manager::manager_workspace_control"} 2025-09-22 14:56:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 14:56:35","target":"sync_log"} 2025-09-22 14:58:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 14:58:35","target":"sync_log"} 2025-09-22 15:00:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 15:00:35","target":"sync_log"} {"msg":"[🟢 GET_SERVER_INFO - START]","time":"09-22 15:00:35","target":"client_api::http"} Error reading the log directory/files: Too many open files (os error 24) Couldn't create writer for logs: failed to create initial log file: Too many open files (os error 24) {"msg":"[GET_SERVER_INFO - END]","time":"09-22 15:00:35","target":"client_api::http"} 2025-09-22 15:00:35 ERROR flowy_user::user_manager::manager_workspace_control: Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info) at flowy-user/src/user_manager/manager_workspace_control.rs:94 {"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)","time":"09-22 15:00:35","target":"flowy_user::user_manager::manager_workspace_control"} 2025-09-22 15:02:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 15:02:35","target":"sync_log"} 2025-09-22 15:04:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 15:04:35","target":"sync_log"} {"msg":"[🟢 GET_SERVER_INFO - START]","time":"09-22 15:05:35","target":"client_api::http"} {"msg":"[GET_SERVER_INFO - END]","time":"09-22 15:05:35","target":"client_api::http"} 2025-09-22 15:05:35 ERROR flowy_user::user_manager::manager_workspace_control: Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info) at flowy-user/src/user_manager/manager_workspace_control.rs:94 {"msg":"Failed to sync server info for URL https://appflowy.example.com: code:Internal error, message:An unhandled error occurred:Middleware error: error sending request for url (https://appflowy.example.com/api/server-info)","time":"09-22 15:05:35","target":"flowy_user::user_manager::manager_workspace_control"} 2025-09-22 15:06:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 15:06:35","target":"sync_log"} 2025-09-22 15:08:35 INFO sync_log: Periodic check websocket connection status at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:404 {"msg":"Periodic check websocket connection status","time":"09-22 15:08:35","target":"sync_log"} 2025-09-22 15:09:37 INFO flowy_user::user_manager::manager_workspace_control: Reconnecting workspace: d7757dbf-ebcf-4187-9651-0ad6f2584ab9 at flowy-user/src/user_manager/manager_workspace_control.rs:260 {"msg":"Reconnecting workspace: d7757dbf-ebcf-4187-9651-0ad6f2584ab9","time":"09-22 15:09:37","target":"flowy_user::user_manager::manager_workspace_control"} 2025-09-22 15:09:37 INFO sync_log: Skipping reconnect, already connected at /home/runner/.cargo/git/checkouts/appflowy-cloud-premium-83eadd17bbe0d0b5/18a9a35/libs/client-api/src/v2/controller.rs:125 {"msg":"Skipping reconnect, already connected","time":"09-22 15:09:37","target":"sync_log"} (AppFlowy:183646): GLib-GIO-ERROR **: 15:09:37.053: epoll_create1 () failed: Too many open files Trace/breakpoint trap ```
Author
Owner

@LucasXu0 commented on GitHub (Sep 24, 2025):

@spmp can you check if you have the following folder on your machine? ~/.local/share/io.appflowy.appflowy/*/http_cache/tmp/*. It may be located in a different path based on your installation method, but it should end with http_cache/tmp

<!-- gh-comment-id:3326340522 --> @LucasXu0 commented on GitHub (Sep 24, 2025): @spmp can you check if you have the following folder on your machine? `~/.local/share/io.appflowy.appflowy/*/http_cache/tmp/*`. It may be located in a different path based on your installation method, but it should end with `http_cache/tmp`
Author
Owner

@spmp commented on GitHub (Sep 24, 2025):

@LucasXu0 I do have that folder at ~/.local/share/io.appflowy.appflowy/*/*/http_cache/tmp, it contains no files.

<!-- gh-comment-id:3329982759 --> @spmp commented on GitHub (Sep 24, 2025): @LucasXu0 I do have that folder at `~/.local/share/io.appflowy.appflowy/*/*/http_cache/tmp`, it contains no files.
Author
Owner

@LucasXu0 commented on GitHub (Sep 25, 2025):

@spmp Can you check your data folder to see if any of them contain multiple files or folders? If so, please let me know the names of those folders.

<!-- gh-comment-id:3331377504 --> @LucasXu0 commented on GitHub (Sep 25, 2025): @spmp Can you check your data folder to see if any of them contain multiple files or folders? If so, please let me know the names of those folders.
Author
Owner

@LucasXu0 commented on GitHub (Sep 26, 2025):

Here's the latest version that may fix the 'too many open files' issue. Please try it: AppFlowy Release 0.10.0-250926-0607 and let me know if it works for you.

<!-- gh-comment-id:3337322977 --> @LucasXu0 commented on GitHub (Sep 26, 2025): Here's the latest version that may fix the 'too many open files' issue. Please try it: [AppFlowy Release 0.10.0-250926-0607](https://github.com/AppFlowy-IO/AppFlowy-Builder/releases/tag/0.10.0-250926-0607) and let me know if it works for you.
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#3665
No description provided.