Closed
Bug 961144
Opened 11 years ago
Closed 11 years ago
Android 4.3 java.lang.NoSuchFieldError: android.net.wifi.WifiConfiguration.password
Categories
(Testing Graveyard :: SUTAgent, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1009113
People
(Reporter: bc, Unassigned)
Details
Attachments
(1 file)
Using SUTAgent 1.20 on Nexus 7 2013 jss15q devices, I was getting intermittent
D/AndroidRuntime( 1565): Shutting down VM
W/dalvikvm( 1565): threadid=1: thread exiting with uncaught exception (group=0x415d7700)
E/AndroidRuntime( 1565): FATAL EXCEPTION: main
E/AndroidRuntime( 1565): java.lang.NoSuchFieldError: android.net.wifi.WifiConfiguration.password
E/AndroidRuntime( 1565): at com.mozilla.SUTAgentAndroid.SUTAgentAndroid.setUpNetwork(SUTAgentAndroid.java:604)
E/AndroidRuntime( 1565): at com.mozilla.SUTAgentAndroid.SUTAgentAndroid.onCreate(SUTAgentAndroid.java:193)
E/AndroidRuntime( 1565): at android.app.Activity.performCreate(Activity.java:5133)
E/AndroidRuntime( 1565): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1565): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
E/AndroidRuntime( 1565): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime( 1565): at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime( 1565): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime( 1565): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1565): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1565): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime( 1565): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1565): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 1565): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 1565): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 1565): at dalvik.system.NativeStart.main(Native Method)
We use an older version of WifiConfiguration.java which has been checked into the tree. The most recent version does not have a password field or the identity field. It *seems* that we are sometimes getting the Android version of WifiConfiguration rather than the one we have bundled with SUTAgent. Is that possible?
I commented the lines from SUTAgentAndroid.java
+++ b/build/mobile/sutagent/android/SUTAgentAndroid.java
@@ -596,18 +596,20 @@ public class SUTAgentAndroid extends Act
wc.eap.setValue("PEAP");
wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
}
wc.hiddenSSID = false;
wc.status = WifiConfiguration.Status.ENABLED;
+ /*
wc.password.setValue("\"password\"");
wc.identity.setValue("\"bmoss@mozilla.com\"");
+ */
and no longer see any java.lang.NoSuchFieldError errors. It does not appear that we use the password or identity in production anywhere.
Our network setup appears to be a jumble of code that could use some love. I wonder if we should stop shipping the old version of WifiConfiguration and adapt to the current version as provided by Android.
At the very least, I would like to drop these two lines for password and identity.
| Reporter | ||
Comment 1•11 years ago
|
||
fyi, I built SUTAgent with the password, identify lines commented out and with Power.java and WifiConfiguration.java removed from Makefile.in and it appears to work fine.
If we decide we need to keep the "enterprisey" features of WifiConnection which aren't available until API level 18, perhaps we should replace the old version of WifiConfiguration.java in the tree with a newer version. It is licensed under Apache License, Version 2.0 the same as the one in the tree now.
| Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•