Closed Bug 1114658 Opened 9 years ago Closed 8 years ago

Intermittent testAppMenuPathways | Exception caught - java.lang.NullPointerException

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: RyanVM, Assigned: gbrown)

References

Details

(Keywords: crash, intermittent-failure)

+++ This bug was initially created as a clone of Bug #1114655 +++

Still beats crashing w/o any error at all.

08:39:02 INFO - SimpleTest START
08:39:02 INFO - TEST-START | testAppMenuPathways
08:39:02 INFO - TEST-PASS | testAppMenuPathways | Robocop tests need the test device screen to be powered on. -
08:39:02 INFO - TEST-PASS | testAppMenuPathways | Given message occurred for registered event: {"type":"Gecko:Ready"} - Gecko:Ready should equal Gecko:Ready
08:39:02 INFO - EventExpecter: no longer listening for Gecko:Ready
08:39:02 INFO - TEST-PASS | testAppMenuPathways | Menu is not open -
08:39:02 INFO - TEST-PASS | testAppMenuPathways | Waiting for menu to open. -
08:39:02 INFO - TEST-PASS | testAppMenuPathways | The base menu is already open -
08:39:02 INFO - TEST-PASS | testAppMenuPathways | Waiting for legacy "More" menu to open. -
08:39:02 INFO - 0 ERROR Exception caught during test! - java.lang.NullPointerException
08:39:02 INFO - at org.mozilla.gecko.tests.components.AppMenuComponent.assertMenuItemIsDisabledAndVisible(AppMenuComponent.java:135)
08:39:02 INFO - at org.mozilla.gecko.tests.testAppMenuPathways._testSaveAsPDFPathway(testAppMenuPathways.java:26)
08:39:02 INFO - at org.mozilla.gecko.tests.testAppMenuPathways.testAppMenuPathways(testAppMenuPathways.java:21)
08:39:02 INFO - at java.lang.reflect.Method.invokeNative(Native Method)
08:39:02 INFO - at java.lang.reflect.Method.invoke(Method.java:507)
08:39:02 INFO - at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204)
08:39:02 INFO - at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:194)
08:39:02 INFO - at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:186)
08:39:02 INFO - at org.mozilla.gecko.tests.UITest.runTest(UITest.java:94)
08:39:02 INFO - at junit.framework.TestCase.runBare(TestCase.java:127)
08:39:02 INFO - at junit.framework.TestResult$1.protect(TestResult.java:106)
08:39:02 INFO - at junit.framework.TestResult.runProtected(TestResult.java:124)
08:39:02 INFO - at junit.framework.TestResult.run(TestResult.java:109)
08:39:02 INFO - at junit.framework.TestCase.run(TestCase.java:118)
08:39:02 INFO - at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
08:39:02 INFO - at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
08:39:02 INFO - at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
08:39:02 INFO - at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1448)
08:39:02 INFO -
08:39:02 WARNING - TEST-UNEXPECTED-FAIL | testAppMenuPathways | Exception caught - java.lang.NullPointerException
08:39:02 INFO - TEST-OK | testAppMenuPathways | took 55856ms
08:39:02 INFO - TEST-START | Shutdown
08:39:02 INFO - Passed: 6
08:39:02 INFO - Failed: 1
08:39:02 INFO - Todo: 0
08:39:02 INFO - SimpleTest FINISHED
See Also: → 1113754
See Also: → 1114655
Comments 4 and 5 are different from Comment 0:

00:05:22     INFO -  TEST-PASS | testAppMenuPathways | Robocop tests need the test device screen to be powered on. - 
00:05:22     INFO -  EventExpecter: no longer listening for Gecko:Ready
00:05:22     INFO -  TEST-PASS | testAppMenuPathways | Menu is not open - 
00:05:22     INFO -  TEST-PASS | testAppMenuPathways | Waiting for menu to open. - 
00:05:22     INFO -  0 ERROR Exception caught during test! - java.lang.NullPointerException
00:05:22     INFO -  	at org.mozilla.gecko.tests.components.AppMenuComponent.findAppMenuItemView(AppMenuComponent.java:166)
00:05:22     INFO -  	at org.mozilla.gecko.tests.components.AppMenuComponent.hasLegacyMenu(AppMenuComponent.java:98)
00:05:22     INFO -  	at org.mozilla.gecko.tests.components.AppMenuComponent.assertMenuItemIsDisabledAndVisible(AppMenuComponent.java:107)
00:05:22     INFO -  	at org.mozilla.gecko.tests.testAppMenuPathways._testSaveAsPDFPathway(testAppMenuPathways.java:26)
00:05:22     INFO -  	at org.mozilla.gecko.tests.testAppMenuPathways.testAppMenuPathways(testAppMenuPathways.java:21)
00:05:22     INFO -  	at java.lang.reflect.Method.invokeNative(Native Method)
(In reply to Geoff Brown [:gbrown] from comment #6)
> Comments 4 and 5 are different from Comment 0:
> 
> 00:05:22     INFO -  TEST-PASS | testAppMenuPathways | Robocop tests need
> the test device screen to be powered on. - 
> 00:05:22     INFO -  EventExpecter: no longer listening for Gecko:Ready
> 00:05:22     INFO -  TEST-PASS | testAppMenuPathways | Menu is not open - 
> 00:05:22     INFO -  TEST-PASS | testAppMenuPathways | Waiting for menu to
> open. - 
> 00:05:22     INFO -  0 ERROR Exception caught during test! -
> java.lang.NullPointerException
> 00:05:22     INFO -  	at
> org.mozilla.gecko.tests.components.AppMenuComponent.
> findAppMenuItemView(AppMenuComponent.java:166)
> 00:05:22     INFO -  	at
> org.mozilla.gecko.tests.components.AppMenuComponent.
> hasLegacyMenu(AppMenuComponent.java:98)
> 00:05:22     INFO -  	at
> org.mozilla.gecko.tests.components.AppMenuComponent.
> assertMenuItemIsDisabledAndVisible(AppMenuComponent.java:107)
> 00:05:22     INFO -  	at
> org.mozilla.gecko.tests.testAppMenuPathways.
> _testSaveAsPDFPathway(testAppMenuPathways.java:26)
> 00:05:22     INFO -  	at
> org.mozilla.gecko.tests.testAppMenuPathways.
> testAppMenuPathways(testAppMenuPathways.java:21)
> 00:05:22     INFO -  	at java.lang.reflect.Method.invokeNative(Native Method)

I just landed a potential fix for the stack shown here, in bug 1116615
In most (maybe all) recent failures the issue is that findAppMenuItemView returns null after opening the legacy more menu and searching for an item. Screenshots show that the menu is open and items are visible.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=288a910de12f shows that no TextViews are found in findAppMenuItemView, but if we wait 3 seconds and check again, the TextViews are there and the required item is found.
testAppMenuPathways is being enabled today in bug 1235689. 

I did not reproduce this bug in try runs, so I'll just watch it for a week in hopes of closing it soon.
Assignee: nobody → gbrown
No failures since AppMenuComponent updated and testAppMenuPathways enabled.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.