java.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered

RESOLVED FIXED in Firefox 34

Status

()

defect
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: Margaret, Assigned: tgkokk)

Tracking

Trunk
Firefox 35
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox32 unaffected, firefox33 unaffected, firefox34+ fixed, firefox35 fixed, fennec34+)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

5 years ago
I ran into this crash on a Nexus S running 2.3.6:

E/AndroidRuntime( 8502): FATAL EXCEPTION: IntentService[updater]
E/AndroidRuntime( 8502): java.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered
E/AndroidRuntime( 8502): 	at org.mozilla.gecko.updater.UpdateService.startUpdate(UpdateService.java:221)
E/AndroidRuntime( 8502): 	at org.mozilla.gecko.updater.UpdateService.onHandleIntent(UpdateService.java:125)
E/AndroidRuntime( 8502): 	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
E/AndroidRuntime( 8502): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8502): 	at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 8502): 	at android.os.HandlerThread.run(HandlerThread.java:60)

It looks like it might be a regression from bug 1052100.
Flags: needinfo?(snorp)
Reporter

Updated

5 years ago
Summary: ava.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered → java.lang.NoSuchMethodError: android.net.ConnectivityManager.isActiveNetworkMetered
isActiveNetworkMetered API 16 (4.1)
Assignee

Comment 2

5 years ago
Posted patch 1057626-use-cm-compat.patch (obsolete) — Splinter Review
Sorry, that was me. I've attached a patch that should fix it.
Attachment #8477852 - Flags: review?(snorp)
Comment on attachment 8477852 [details] [diff] [review]
1057626-use-cm-compat.patch

Review of attachment 8477852 [details] [diff] [review]:
-----------------------------------------------------------------

Need the extraneous changes removed, otherwise looks fine.

::: mobile/android/base/updater/UpdateService.java
@@ +127,2 @@
>              // Use this instead for forcing a download from about:fennec
> +            startUpdate(UpdateServiceHelper.FLAG_REINSTALL);

We don't want these changes
Attachment #8477852 - Flags: review?(snorp) → review-
Assignee

Comment 4

5 years ago
Sorry, was trying to find out how to test the updater.
Attachment #8478304 - Flags: review?(snorp)
Assignee

Updated

5 years ago
Attachment #8477852 - Attachment is obsolete: true
Attachment #8478304 - Flags: review?(snorp) → review+
Flags: needinfo?(snorp)
Keywords: checkin-needed
(In reply to Theodore Kokkoris [:tgkokk] from comment #4)
> Created attachment 8478304 [details] [diff] [review]
> Use ConnectivityManagerCompat instead of ConnectivityManager
> 
> Sorry, was trying to find out how to test the updater.

No worries. The code you had there worked for that, right?
Assignee

Comment 6

5 years ago
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #5)
> (In reply to Theodore Kokkoris [:tgkokk] from comment #4)
> > Created attachment 8478304 [details] [diff] [review]
> > Use ConnectivityManagerCompat instead of ConnectivityManager
> > 
> > Sorry, was trying to find out how to test the updater.
> 
> No worries. The code you had there worked for that, right?

You mean the one I deleted? Nope, apparently for some reason the update server wouldn't return any updates. I tried it manually with the URL it was returning and I received an empty <updates> element, Nightly branding and all (maybe that was the reason). I'm going to give it one more try later, I'm going to file another bug now (which was ultimately why I decided to test if I can enable the updater).
Reporter

Updated

5 years ago
Assignee: nobody → t.kokkoris
Can we please run this through Try first? :)
Keywords: checkin-needed
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #7)
> Can we please run this through Try first? :)

There is no point as long as this builds (which I assume it does). There are no updater tests.
Duplicate of this bug: 1061451
Reporter

Comment 11

5 years ago
We'll need to uplift this to Aurora.
tracking-fennec: --- → ?
Comment on attachment 8478304 [details] [diff] [review]
Use ConnectivityManagerCompat instead of ConnectivityManager

Approval Request Comment
[Feature/regressing bug #]: Bug 1052100
[User impact if declined]: No Aurora updates for all Android devices < Jelly Bean.
[Describe test coverage new/current, TBPL]: None.
[Risks and why]: None really.
[String/UUID change made/needed]: N/A
Attachment #8478304 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/81307805adbb
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Comment on attachment 8478304 [details] [diff] [review]
Use ConnectivityManagerCompat instead of ConnectivityManager

Aurora+
Attachment #8478304 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
tracking-fennec: ? → 34+
You need to log in before you can comment on or make changes to this bug.