Bug 493505 - Unhandled exception causing crash after multicast leak changes in GrapheneOS
Summary: Unhandled exception causing crash after multicast leak changes in GrapheneOS
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (other bugs)
Version First Reported In: unspecified
Platform: Android Android 14.x
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-22 21:20 UTC by matchboxbananasynergy
Modified: 2024-09-22 21:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matchboxbananasynergy 2024-09-22 21:20:56 UTC
SUMMARY

KDE Connect not properly handling exception.

GrapheneOS is currently working on resolving various upstream Android leaks with multicast. As part of that work, KDE Connect start crashing for people. The changes have been reverted for the time being as we work to resolve app compatibility issues, however the error below can be sorted by gracefully handling the exception.

"java.lang.RuntimeException: Unable to create service
org.kde.kdeconnect.BackgroundService: java.lang.RuntimeException: java.net.SocketException: setsockopt failed: EPERM (Operation not permitted)"

My understanding from the information that has been relayed to me, this is where the issue lies:

https://invent.kde.org/network/kdeconnect-android/-/blob/master/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java?ref_type=heads#L302

STEPS TO REPRODUCE

To reproduce the issue, you would likely need to be on a version of GrapheneOS with the changes that have since been reverted, but we still believe that handling the exception above gracefully is important.

OBSERVED RESULT

The app crashes.

EXPECTED RESULT

The app should handle the exception and not crash.