Bug 412493

Summary: Exception in SMSPlugin's onPacketReceived()
Product: [Applications] kdeconnect Reporter: Ricardo Rodrigues <ricardo.e.p.rodrigues>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: normal CC: simon
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Android   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 0caa30e1d7a84b37f36f833591c37560de9840b4
Sentry Crash Report:

Description Ricardo Rodrigues 2019-09-30 23:26:30 UTC
SUMMARY

No SMS history is shown.

Although similar in name to bug 402032, it does show a different error, complaining instead of "Attempt to invoke interface method 'int java.util.List.size()' on a null object reference".

I am able to send SMS.

STEPS TO REPRODUCE
1. Connect the device to the computer
2. Open the SMS chat window. (currently using GSConnect)

OBSERVED RESULT

No Conversations appear.

EXPECTED RESULT

All SMS history should appear.


SOFTWARE/OS VERSIONS
Linux: Ubuntu 19.04 using GSConnect (built from master)
Android: Oneplus 3T (Android 9)

ADDITIONAL INFORMATION

Log output:

10-01 00:20:16.757  4102  5842 E KDE/Device: Exception in SMSPlugin's onPacketReceived()
10-01 00:20:16.757  4102  5842 E KDE/Device: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Helpers.TelephonyHelper.getAllPhoneNumbers(TelephonyHelper.java:99)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Helpers.SMSHelper.getMessages(SMSHelper.java:213)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Helpers.SMSHelper.getConversations(SMSHelper.java:335)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Plugins.SMSPlugin.SMSPlugin.handleRequestConversations(SMSPlugin.java:393)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Plugins.SMSPlugin.SMSPlugin.onPacketReceived(SMSPlugin.java:329)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Device.onPacketReceived(Device.java:569)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Backends.BaseLink.packageReceived(BaseLink.java:84)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Backends.LanBackend.LanLink.receivedNetworkPacket(LanLink.java:255)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Backends.LanBackend.LanLink.lambda$reset$0$LanLink(LanLink.java:109)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at org.kde.kdeconnect.Backends.LanBackend.-$$Lambda$LanLink$TabvaCXA5qL_bcJDmIELWusNThw.run(Unknown Source:4)
10-01 00:20:16.757  4102  5842 E KDE/Device: 	at java.lang.Thread.run(Thread.java:764)
Comment 1 Simon Redman 2024-12-16 22:27:12 UTC
We believe this is fixed in 0caa30e1d7a84b37f36f833591c37560de9840b4. Please reopen if this issue still occurs.