livechat / chat-window-android

LiveChat mobile chat window for Android
https://developers.livechatinc.com/mobile/android/
MIT License
23 stars 28 forks source link

LiveChat not working without GSON proguard rules #96

Closed p-dmitriy closed 1 day ago

p-dmitriy commented 2 days ago

Hi! After migration to kotlinx.serialization library we faced problem with live chat. It is not possible to start new chat with "no internet" error: telegram-cloud-photo-size-2-5307625696140583578-y But chat can be opened when you press "start chat", getting the error, then close and reopen chat.

After some research we figured out that the problem was in GSON ProGuard/R8 rules that was deleted when we migrated to kotlinx.serialization. Please mention in README that livechat requires those rules from host app and maybe you can show more meaningful error in this case. As I can see here you deserialize NewMessage and not expect any exceptions, but they can be thrown if rules missing.

Seems #77 issue has same cause.

p-dmitriy commented 2 days ago

Or I think updating gson to 2.11.0, which provides proguard/r8 rules, can be enough to fix that.

nomyzs commented 1 day ago

Hey @p-dmitriy You are right. I managed to reproduce the issue by running the R8 in full mode. You will find a fix in v2.4.3 release. This was very helpful, thank you!