Open hypery2k opened 5 years ago
just noticed that it's occuring on a message with many replies in a thread. Maybe that's the real issue
this could be related: https://github.com/square/moshi/issues/509
We also experience this issue on multiple Android devices, as described above.
Same here, used to work, but recent update to Android app broke it somehow. Not sure it is related to message count, as we have multiple large channels, and only some of them fail to load in the app (all work on Desktop, and presumably iOS).
Same here, used to work, but recent update to Android app broke it somehow. Not sure it is related to message count, as we have multiple large channels, and only some of them fail to load in the app (all work on Desktop, and presumably iOS).
I don't think its really depending on the messages in the channel, from the code and memory stats I think it's more related to data complexity. e.g. if a channel has linked items on a post, e.g. links, threads, reactions the JSON Mapping consumes more memory here, which might by an issue on Android due the heap restrictions on DalvikVM, as i also see this in the logs:
I/art: Background sticky concurrent mark sweep GC freed 405886(29MB) AllocSpace objects, 0(0B) LOS objects, 37% free, 44MB/70MB, paused 2.806ms total 132.842ms
I/art: Background sticky concurrent mark sweep GC freed 400591(29MB) AllocSpace objects, 0(0B) LOS objects, 37% free, 44MB/70MB, paused 2.595ms total 118.279ms
Additional information that might be useful for debugging: The Beta-App (Rocket Chat Experimental on Play Store) works fine. I'm not able to reproduce the bug described above with the exact same channels/rooms. So using this App is a small Workaround for those who need to access affected channels/rooms on a mobile device.
Describe the bug
When loading rooms with lots of message the loading indicator never goes away. Rooms with less messages work. The iOS app with the same backend is working fine. The REST call is fast (~200ms response time)
To Reproduce
Expected behavior
Loading ;)
Logs
I can see that the http call goes through:
Screenshots
-
Devices and Versions
Additional context
I debugged the app and i can see that I hit a breakpoint here:
https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK/blob/ebeaa66c8d557ef869ed9c2b6a488b63f1972c97/core/src/main/kotlin/chat/rocket/core/internal/rest/Message.kt#L301
But the return is never reached:
https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK/blob/ebeaa66c8d557ef869ed9c2b6a488b63f1972c97/core/src/main/kotlin/chat/rocket/core/internal/rest/Message.kt#L318
I think it's an memory issue with the JSON Mapping:
Even tried to request more memory via AndroidManifest.xml and doesn't work out:
If i lower count in the client.message call to 20 its working: https://github.com/RocketChat/Rocket.Chat.Android/blob/a1cc67224d67c24c7a53eab8a863f83edb7737d4/app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt#L266
I think one approach to solve this, would be to let check for memory warnings there and reduce the loading ahead (aka count)