Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SdkError - Exception: Out of Memory on SyncStatusUpdate #1951

Closed
1 of 2 tasks
PhantomRay opened this issue Nov 2, 2024 · 4 comments
Closed
1 of 2 tasks

SdkError - Exception: Out of Memory on SyncStatusUpdate #1951

PhantomRay opened this issue Nov 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@PhantomRay
Copy link
Contributor

PhantomRay commented Nov 2, 2024

Checklist

  • I could not find a solution in the documentation, the existing issues or discussions.
  • I already asked for help in the chat

In which Project did the bug appear?

Other

If you selected "Other" as Project, please enter in which project the bug occurred.

No response

On which platform did the bug appear?

Android

SDK Version

Tested on 0.32, 0.33, 0.34, same.

Describe the problem caused by this bug

When using the following code, sync status is constantly returning Exception: Out of Memory

client.onSyncStatus.stream.listen(status) {
    ... // status.error: SdkError
}

Not sure what has happened. I'm pretty sure not much messages to be synced.
If I re-login, the issue disappeared.

Steps To Reproduce

In my situation, it occurs when I restart the app after login.

Screenshots or Logs

Screenshot 2024-11-02 at 12 42 47 pm

Stack Trace:

#0      new Uint8List (dart:typed_data-patch/typed_data_patch.dart:2307:3)
#1      BufferedFileReader.loadBytes (package:hive/src/io/buffered_file_reader.dart:73:18)
#2      _KeyReader._load (package:hive/src/io/frame_io_helper.dart:89:40)
#3      _KeyReader.readKeys (package:hive/src/io/frame_io_helper.dart:69:31)
#4      _rootRunUnary (dart:async/zone.dart:1407:47)
#5      _CustomZone.runUnary (dart:async/zone.dart:1308:19)
#6      _FutureListener.handleValue (dart:async/future_impl.dart:163:18)
#7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:861:45)
#8      Future._propagateToListeners (dart:async/future_impl.dart:890:13)
#9      Future._completeWithValue (dart:async/future_impl.dart:666:5)
#10     _rootRunUnary (dart:async/zone.dart:1407:47)
#11     _CustomZone.runUnary (dart:async/zone.dart:1308:19)
#12     _FutureListener.handleValue (dart:async/future_impl.dart:163:18)
#13     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:861:45)
#14...

Seems linked to hive. However not sure how to recover from this, otherwise user is blocked from using IM forever.

Security related

No response

@PhantomRay PhantomRay added the bug Something isn't working label Nov 2, 2024
@krille-chan
Copy link
Contributor

it turns out you are using Hive. We have deprecated this database in favor of Sqflite/indexedDB. Is it possible for you to migrate and see if the bug appears there as well?

@PhantomRay
Copy link
Contributor Author

Thanks for replying. How do I do that? I can simply delete the app and re-install so that anything related to hive should be gone?

@PhantomRay
Copy link
Contributor Author

Quick question, when will you remove hive completely from SDK?

@PhantomRay
Copy link
Contributor Author

Now using SQLite instead of Hive.

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

No branches or pull requests

2 participants