Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caused by: java.lang.IllegalArgumentException: passphrase not ASCII encodable #102

Open
swap9391 opened this issue Apr 8, 2021 · 0 comments

Comments

@swap9391
Copy link

swap9391 commented Apr 8, 2021

My Password was - "77€£¥¥♤◇☆"

This code cannot encode this type of passwords.

final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
if (!asciiEncoder.canEncode(passphrase)) {
throw new IllegalArgumentException("passphrase not ASCII encodable");
}

Log:

Process: com.example.kohlerkonnect, PID: 30162
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.wifi.SCAN_RESULTS flg=0x4000010 (has extras) } in com.thanosfisherman.wifiutils.wifiScan.WifiScanReceiver@1fd37de
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1656)
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7971)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
Caused by: java.lang.IllegalArgumentException: passphrase not ASCII encodable
at android.net.wifi.WifiNetworkSpecifier$Builder.setWpa2Passphrase(WifiNetworkSpecifier.java:207)
at com.thanosfisherman.wifiutils.ConfigSecurities.setupWifiNetworkSpecifierSecurities(ConfigSecurities.java:125)
at com.thanosfisherman.wifiutils.ConnectorUtils.connectAndroidQ(ConnectorUtils.java:288)
at com.thanosfisherman.wifiutils.ConnectorUtils.connectToWifi(ConnectorUtils.java:181)
at com.thanosfisherman.wifiutils.WifiUtils$2.onScanResultsReady(WifiUtils.java:145)
at com.thanosfisherman.wifiutils.wifiScan.WifiScanReceiver.onReceive(WifiScanReceiver.java:20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant