Tapping "Enable WiFi" makes Firefox for Android crash; java.lang.SecurityException: WifiService: Neither user 10077 nor current process has android.permission.ACCESS_WIFI_STATE.

VERIFIED FIXED in Firefox 34

Status

()

defect
--
critical
VERIFIED FIXED
5 years ago
3 years ago

People

(Reporter: jsavage, Assigned: mfinkle)

Tracking

({crash, reproducible})

34 Branch
Firefox 34
All
Android
Points:
---

Firefox Tracking Flags

(firefox34+ verified, fennec34+)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
I experienced a problem while trying to write a SUMO article for this new feature.

Steps:
1) Turn off WiFi on your Android device.
2) Launch Firefox for Android Beta (34) and try to load any webpage.
3) Tap "Enable WiFi".

Expected result: WiFi turns on(?) I don't know the sequence yet.

Actual result: Firefox crashed. 

Tried this on a Nexus 5, HTC One X, and a Samsung Galaxy Note 3, all with the same result.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1063541
(In reply to Aaron Train [:aaronmt] from comment #1)
> 
> *** This bug has been marked as a duplicate of bug 1063541 ***

Did this miss the first Beta or something?
[Tracking Requested - why for this release]: Reproducible crash

Oh no, I see, this is 

E/GeckoAppShell( 8966): java.lang.SecurityException: WifiService: Neither user 10077 nor current process has android.permission.ACCESS_WIFI_STATE.
E/GeckoAppShell( 8966): 	at android.os.Parcel.readException(Parcel.java:1465)
E/GeckoAppShell( 8966): 	at android.os.Parcel.readException(Parcel.java:1419)
E/GeckoAppShell( 8966): 	at android.net.wifi.IWifiManager$Stub$Proxy.getWifiEnabledState(IWifiManager.java:808)
E/GeckoAppShell( 8966): 	at android.net.wifi.WifiManager.getWifiState(WifiManager.java:1029)
E/GeckoAppShell( 8966): 	at android.net.wifi.WifiManager.isWifiEnabled(WifiManager.java:1041)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.GeckoNetworkManager.handleMessage(GeckoNetworkManager.java:145)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.EventDispatcher.dispatchEvent(EventDispatcher.java:168)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.GeckoAppShell.handleGeckoMessage(GeckoAppShell.java:2317)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:366)
E/GeckoAppShell( 8966): 	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:186)
Status: RESOLVED → REOPENED
tracking-fennec: --- → ?
Resolution: DUPLICATE → ---
Summary: Tapping "Enable WiFi" makes Firefox for Android crash → Tapping "Enable WiFi" makes Firefox for Android crash; java.lang.SecurityException: WifiService: Neither user 10077 nor current process has android.permission.ACCESS_WIFI_STATE.
Severity: normal → critical
Keywords: crash, reproducible
Hardware: x86 → ARM
So "Enable WiFi" requires a permission bump? Probably the same bump used by the Stumbler?

We need to back this out of Beta.
See Also: → 918645
Hmm, we have had ACCESS_WIFI_STATE and CHANGE_WIFI_STATE since Firefox 24.
Mark Finkle (:mfinkle) from comment #6)
> Hmm, we have had ACCESS_WIFI_STATE and CHANGE_WIFI_STATE since Firefox 24.

Behind a RELEASE build flag on Beta:
http://mxr.mozilla.org/mozilla-beta/source/mobile/android/base/AndroidManifest.xml.in#26
Status: REOPENED → NEW
This patch is the simplest "backout" I could conceive. All it does is always hide the Wifi helper button. If you can't press the button, you don't crash.
Assignee: nobody → mark.finkle
Attachment #8511459 - Flags: review?(rnewman)
Comment on attachment 8511459 [details] [diff] [review]
no-wifi-helper v0.1

This patch is a "straight to Beta" patch

Approval Request Comment
[Feature/regressing bug #]: bug 1042196
[User impact if declined]: Crash when pressing the button
[Describe test coverage new/current, TBPL]:
[Risks and why]: As low as I could get
[String/UUID change made/needed]: none

We'll need to remove the "Wifi button" from the Fx34 release notes too.
Attachment #8511459 - Flags: approval-mozilla-beta?
Attachment #8511459 - Flags: review?(rnewman) → review+
Blocks: 1042196
Status: NEW → ASSIGNED
Hardware: ARM → All
Comment on attachment 8511459 [details] [diff] [review]
no-wifi-helper v0.1

Too bad that this can't ship in 34. Thanks for the simple backout. Beta+
Attachment #8511459 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
https://hg.mozilla.org/releases/mozilla-beta/rev/9fd76ad57dbe

Marking as RESOLVED because we don't plan to land this on earlier releases, but flagging wesj to attend to the situation on 35.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago5 years ago
Flags: needinfo?(wjohnston)
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Release Note Request: please remove the note about "enable wifi" from the 34 relnotes. It'll be in 35 or later -- whenever we next have a permission bump release.
relnote-firefox: --- → ?

Comment 14

5 years ago
Verified as fixed on Firefox 34 Beta 4. The "Enable WiFi" button is now hidden.
Status: RESOLVED → VERIFIED
I don't think we need to do anything else. This should just ride the trains with the stumbler. If the stumbler is disabled (and this pref is disabled), we'll have to address it.
Flags: needinfo?(wjohnston)
tracking-fennec: ? → 34+
This didn't ship in 34 and isn't in the notes - removing the flag.  Is there something that needs to be noted in 35?  If yes, please re-nom.
relnote-firefox: ? → ---
You need to log in before you can comment on or make changes to this bug.