-
Notifications
You must be signed in to change notification settings - Fork 51
3.0.0 crashes on sending message #45
Comments
Can you show what kind of listener you use when sending? |
Here is some code from my
|
This problem is still there with 3.0.1 |
I haven't digged into this yet. I'm going to release one more update 3.0.2 soon and after that I will get to this issue. |
Could you please collect logs as described in this manual, I am unable to reproduce this problem. |
Ah, nothing happening here. My fault. Summary: It still crashes relyably with v3.1.1 on all tested devices. Makes 3.X.Y completely useless here. Attached find the requested logs. |
Am I correct in understanding that some (web) frontend is crashing and then the ChatClient crashes because it couldn't send notification to no-more-existing listener? Or am I completely off-base here? Sorry that I have to guess, the logs are missing some critical parts. |
Hi, please try |
@berkus what parts are missing? I followed your procedure. Note, that I cannot capture via AS3.2 either, as I have not figured out, how to avoid the crash flushing the logcat stuff. There is no Webserver involved, apart from a slightly different UI the embedding is still fairly close to your (Java) sample code. It is also that my app does not contain any code to restart itself, when an Activity crashes main thread, so I thought that'd be a Twilio Chat feature? I'll try to do some experiments with 4.0.0-rc11 later. Good to hear, things are proceeding, it was getting a little quiet down here.. |
The crash in ChatClient is very clear that it was expecting to see a CallbackListener but did not find one. Solution would be to find WHY this CallbackListener disappears and make it not disappear, then everything would work. If the code is indeed like shown here then between the moment of sendMessage() and the moment CallbackListener's onSuccess method is called, the reference to CallbackListener has gone away. This is possible but highly unlikely, because CallbackListener's wrapper holds a strong reference to it internally until the moment its callback is actually fired. The log from here however shows a completely different scenario - crash in Could you check the logs before the crash for patterns like
If these are not anywhere in the logs (they are at Log.WARNING level) then the original CallbackListener was found correctly but then it was gone while command was executing. We can dig more from there. |
I am a bit in a hurry right now, I am afraid I did not understand, what you wrote. Will try later, when I have more time. However building is fast. With v4.0.0-rc12 my app now crashes before even displaying the message thread, i.e. before I could even post something to crash things. Again with this crude autorestart feature which kills the logs in the AS3.2 view. I am sorry, when I have got the objects wrong, thanks for your help! |
Well, I have this settings already, no clue, why the interesting lines are still flushed so fast. Anyway, I tried to get rc12 running on emulators and actually fail: App doesn't even start up (and it does when I revert to twilio2). I know, I am a bit messy here right now, but maybe, maybe, this message is interesting for you: 2018-10-03 09:41:58.812 de.spieleck.app.badgers.debug E/linker: "/data/app/de.spieleck.app.badgers.debug-PB4dopG-HviGQ3mYo-Bc4w==/lib/x86/libtwilio-rtd-native.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23) |
Thanks, this looks interesting, will check. |
Turns out, I had "Clear log before launch" disabled, it was the filter on current process which interrrupted my logging. I am afraid the attached log is the same like in #58 . I have made many of my |
OK, got it, I found something like
Was due to the fast testing upgrades from Twilio 2 over 3 and so on. |
Aye, added annotations, will be in the next 4.0.0 release. Cheers! |
Description
My app is somewhat similar to the demo and I did the minimal changes to run on 3.0.0 instead of 2.0.8. However sending a message always crashes. Might be a duplicate of #42 .
Steps to Reproduce
Code (optional)
Can deliver some Java if this helps.
Expected Behavior
No crash
Actual Behavior
crash
Reproduces how Often
100%
Logs
On one emulator
On a different emulator
Versions
Chat Android SDK
3.0.0
Android API & Android Device
8.1 & Pixel XL Emulator
7.1.1 & Nexus X Emulator
The text was updated successfully, but these errors were encountered: