Bug 475909 - Poor error message when connecting to bluetooth fails
Summary: Poor error message when connecting to bluetooth fails
Status: REPORTED
Alias: None
Product: plasma-mobile-settings
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: postmarketOS Linux
: NOR minor
Target Milestone: ---
Assignee: Devin Lin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-21 05:13 UTC by Justin Zobel
Modified: 2023-10-27 17:23 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Zobel 2023-10-21 05:13:19 UTC
This may be a Bluetooth KCM issue, please feel free to move it if it's not a Plasma Mobile specific KCM.

SUMMARY
When attempting to connect to a device you've connected to before, and it is not online/available, a timeout message is displayed at the top of the screen 'br-connection-page-timeout'. This is not user-friendly text and could be improved.


STEPS TO REPRODUCE
1. Connect to a device with Bluetooth
2. Disconnect the device
3. Turn the device off
4. Attempt connecting again

OBSERVED RESULT
'br-connection-page-timeout' message appears

EXPECTED RESULT
A better, more user-friendly text is displayed, such as 'Unable to connect to [device-name]'

23.01.0 on postmarketOS (Frameworks 5.110.0).
Comment 1 Luis B 2023-10-27 17:23:39 UTC
Using your reproduction steps on postmarketOS edge (Frameworks 5.111 and Gear 23.08.2) I'm getting a different error message; it's still not great regarding user friendliness, but it is at least readable:
"Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expirerd, or the network connection was broken."

I would want to rephrase that a bit to include less jargon and be more concise, but... I can't find where in the code this text is created :D
It seems that in bluedevil/src/applet/package/contents/ui/DeviceItem.qml in the end of connectToDevice() the error text is displayed using "PlasmaBt.Notify.connetionFailed(title, text);", but the error text created by function "errorText()" just above does not match what I see being displayed and it hasn't materially changed according to git blame ever since its introduction, so clearly it's elsewhere.

Funnily enough text searching through my entire kdesrc-build directory (including sources, build dirs and final binaries) only yields a few results for my error message in *comments* inside of the Finnish translation files for kio-extras, kiconthemes, kio and kbookmarks.

Looking at how errorText creates the error string to be displayed I'd guess this being somewhat related to QDBusError::message(); but I don't know through which code path it actually sends this text to the UI.