markusfisch / BinaryEye

Yet another barcode scanner for Android
https://play.google.com/store/apps/details?id=de.markusfisch.android.binaryeye
MIT License
1.53k stars 121 forks source link

BinaryEye 1.45.0 crashes from QR code #228

Open hardfalcon opened 3 years ago

hardfalcon commented 3 years ago

Hi, I get reproducible crashes with BinaryEye 1.45.0 when trying to scan the following QR code: binaryeye_1 45 0_crash

markusfisch commented 3 years ago

Thanks a lot for reporting this! 👍

The reason is that WifiNetworkSuggestion.Builder.setWapiPassphrase() is throwing an IllegalArgumentException with the message "passphrase not ASCII encodable".

I just added a try/catch block around setWapiPassphrase() to safely catch these exceptions, but I'm afraid Android doesn't accept passphrases that aren't ASCII encodeable (see here).

hardfalcon commented 3 years ago

You're welcome, thanks for this great app! :)

The fact that the Android API for adding WPA PSKs seems to only accept ASCII strings is strange because the "native" QR code scanner that is built into the wifi setup dialog of Android 10 (/e/ on a Fairphone 3 in my case) accepts the very same QR code without any issues, and when clicking the "Share" button on the added connection, it actually shows the complete password with the emoji: Screenshot_20211015-213829_Settings

markusfisch commented 3 years ago

Hm, very strange, indeed 🤔

I will look into it...