Perma TEST-UNEXPECTED-FAIL | <issue category="Correctness" errorLine1=" AppWidgetManager appWidgetManager = getApplicationContext().getSystemService(AppWidgetManager.class);"

RESOLVED FIXED in Firefox 67

Status

()

defect
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: intermittent-bug-filer, Assigned: petru)

Tracking

({intermittent-failure, regression})

unspecified
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox65 unaffected, firefox66 unaffected, firefox67 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 months ago
treeherder

#[markdown(off)]
Filed by: archaeopteryx [at] coole-files.de

https://treeherder.mozilla.org/logviewer.html#?job_id=232934470&repo=mozilla-central

https://queue.taskcluster.net/v1/task/emCvtqTVTxSl5QhPeJhHug/runs/0/artifacts/public/logs/live_backing.log

These are from bug 1526926 etc.

[task 2019-03-09T22:06:48.693Z] 22:06:48 INFO - BUILD FAILED in 41s
[task 2019-03-09T22:06:48.693Z] 22:06:48 INFO - 47 actionable tasks: 1 executed, 46 up-to-date
[task 2019-03-09T22:06:49.305Z] 22:06:49 INFO - TinderboxPrint: report<br/><a href="https://queue.taskcluster.net/v1/task/emCvtqTVTxSl5QhPeJhHug/runs/0/artifacts/public/android/lint/lint-results-withoutGeckoBinariesDebug.html">HTML withoutGeckoBinariesDebug report</a>, visit "Inspect Task" link for details
[task 2019-03-09T22:06:49.305Z] 22:06:49 INFO - TinderboxPrint: report<br/><a href="https://queue.taskcluster.net/v1/task/emCvtqTVTxSl5QhPeJhHug/runs/0/artifacts/public/android/lint/lint-results-withoutGeckoBinariesDebug.xml">XML withoutGeckoBinariesDebug report</a>, visit "Inspect Task" link for details
[task 2019-03-09T22:06:49.305Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | android-lint | Lint found errors in the project; aborting build. See the report at: https://queue.taskcluster.net/v1/task/emCvtqTVTxSl5QhPeJhHug/runs/0/artifacts/public/android/lint/lint-results-withoutGeckoBinariesDebug.html
[task 2019-03-09T22:06:49.306Z] 22:06:49 INFO - SUITE-START | android-lint | withoutGeckoBinariesDebug
[task 2019-03-09T22:06:49.307Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | <issue category="Correctness" errorLine1=" AppWidgetManager appWidgetManager = getApplicationContext().getSystemService(AppWidgetManager.class);" errorLine2=" ~~~~~~~~~~~~~~~~" explanation="This check scans through all the Android API calls in the application and warns about any calls that are not available on **all** versions targeted by this application (according to its minimum SDK attribute in the manifest).&#10;&#10;If you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files.&#10;&#10;If your code is **deliberately** accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.&#10;&#10;If you are deliberately setting `android:` attributes in style definitions, make sure you place this in a `values-v`*NN* folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms.&#10;&#10;Similarly, you can use tools:targetApi=&quot;11&quot; in an XML file to indicate that the element will only be inflated in an adequate context." id="NewApi" message="Call requires API level 23 (current min is 16): android.content.Context#getSystemService" priority="6" quickfix="studio" severity="Error" summary="Calling new methods on older versions">
[task 2019-03-09T22:06:49.307Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | <location column="81" file="/builds/worker/workspace/build/src/mobile/android/base/java/org/mozilla/gecko/LauncherActivity.java" line="234" />
[task 2019-03-09T22:06:49.307Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | </issue>
[task 2019-03-09T22:06:49.308Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | <issue category="Correctness" errorLine1=" if (appWidgetManager != null &amp;&amp; appWidgetManager.isRequestPinAppWidgetSupported()) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" explanation="This check scans through all the Android API calls in the application and warns about any calls that are not available on **all** versions targeted by this application (according to its minimum SDK attribute in the manifest).&#10;&#10;If you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files.&#10;&#10;If your code is **deliberately** accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.&#10;&#10;If you are deliberately setting `android:` attributes in style definitions, make sure you place this in a `values-v`*NN* folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms.&#10;&#10;Similarly, you can use tools:targetApi=&quot;11&quot; in an XML file to indicate that the element will only be inflated in an adequate context." id="NewApi" message="Call requires API level 26 (current min is 16): android.appwidget.AppWidgetManager#isRequestPinAppWidgetSupported" priority="6" quickfix="studio" severity="Error" summary="Calling new methods on older versions">
[task 2019-03-09T22:06:49.308Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | <location column="70" file="/builds/worker/workspace/build/src/mobile/android/base/java/org/mozilla/gecko/LauncherActivity.java" line="237" />
[task 2019-03-09T22:06:49.308Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | </issue>
[task 2019-03-09T22:06:49.309Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | <issue category="Correctness" errorLine1=" appWidgetManager.requestPinAppWidget(componentName, null, successCallback);" errorLine2=" ~~~~~~~~~~~~~~~~~~~" explanation="This check scans through all the Android API calls in the application and warns about any calls that are not available on **all** versions targeted by this application (according to its minimum SDK attribute in the manifest).&#10;&#10;If you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files.&#10;&#10;If your code is **deliberately** accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.&#10;&#10;If you are deliberately setting `android:` attributes in style definitions, make sure you place this in a `values-v`*NN* folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms.&#10;&#10;Similarly, you can use tools:targetApi=&quot;11&quot; in an XML file to indicate that the element will only be inflated in an adequate context." id="NewApi" message="Call requires API level 26 (current min is 16): android.appwidget.AppWidgetManager#requestPinAppWidget" priority="6" quickfix="studio" severity="Error" summary="Calling new methods on older versions">
[task 2019-03-09T22:06:49.309Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | <location column="42" file="/builds/worker/workspace/build/src/mobile/android/base/java/org/mozilla/gecko/LauncherActivity.java" line="249" />
[task 2019-03-09T22:06:49.309Z] 22:06:49 INFO - TEST-UNEXPECTED-FAIL | </issue>
[task 2019-03-09T22:06:49.309Z] 22:06:49 INFO - SUITE-END | android-lint | withoutGeckoBinariesDebug

Blocks: 1526926
Flags: needinfo?(sarentz)
Flags: needinfo?(petru.lingurar)
Flags: needinfo?(andrei.a.lazar)
Priority: P5 → --
Summary: Intermittent TEST-UNEXPECTED-FAIL | <issue category="Correctness" errorLine1=" AppWidgetManager appWidgetManager = getApplicationContext().getSystemService(AppWidgetManager.class);" → Perma TEST-UNEXPECTED-FAIL | <issue category="Correctness" errorLine1=" AppWidgetManager appWidgetManager = getApplicationContext().getSystemService(AppWidgetManager.class);"
Comment hidden (Intermittent Failures Robot)
Assignee

Comment 2

3 months ago

Thanks aryx!
Doesn't seem to be really an issue in the code or in how the app will behave, it's just that Lint doesn't know how to follow that api guard we have and wants the check to be done in place.

Flags: needinfo?(sarentz)
Flags: needinfo?(petru.lingurar)
Flags: needinfo?(andrei.a.lazar)
Assignee

Comment 3

3 months ago

Previous code was using our own sugary feature26Plus check which Lint doesn't
properly follow.
As such even if the code was properly guarded and behaved correctly Lint would
show errors about improper usage of methods which require higher api levels.
Doing the api check in place ensures it will get picked up by Lint's
ApiDetector and so it will not report about such errors here.

Assignee

Updated

3 months ago
Keywords: checkin-needed

Comment 4

3 months ago

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/cde32a937730
Use in place api check to prevent Lint ApiDetector errors; r=AndreiLazar

Keywords: checkin-needed

Comment 5

3 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Assignee: nobody → petru.lingurar
Comment hidden (Intermittent Failures Robot)
You need to log in before you can comment on or make changes to this bug.