Closed Bug 1072732 Opened 11 years ago Closed 11 years ago

org.json.JSONException: No value for userRequested

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 35

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

Attachments

(1 file)

I spotted this crash in a test run. Seems related to the Searchbox on Error page work. Do we need to use optString for params that could be "" ? Does the JSON translation make those null? D/GeckoTabs( 2939): handleMessage: Content:LocationChange D/GeckoToolbar( 2939): onTabChanged: TITLE D/GeckoBrowserApp( 2939): BrowserApp.onTabChanged: 0: TITLE W/GeckoTabs( 2939): handleMessage threw for Content:LocationChange W/GeckoTabs( 2939): org.json.JSONException: No value for userRequested W/GeckoTabs( 2939): at org.json.JSONObject.get(JSONObject.java:354) W/GeckoTabs( 2939): at org.json.JSONObject.getString(JSONObject.java:510) W/GeckoTabs( 2939): at org.mozilla.gecko.Tab.handleLocationChange(Tab.java:657) W/GeckoTabs( 2939): at org.mozilla.gecko.Tabs.handleMessage(Tabs.java:467) W/GeckoTabs( 2939): at org.mozilla.gecko.tests.testAppMenuPathways._testSaveAsPDFPathway(testAppMenuPathways.java:43) W/GeckoTabs( 2939): at org.mozilla.gecko.tests.testAppMenuPathways.testAppMenuPathways(testAppMenuPathways.java:21) W/GeckoTabs( 2939): at java.lang.reflect.Method.invokeNative(Native Method) W/GeckoTabs( 2939): at java.lang.reflect.Method.invoke(Method.java:511) W/GeckoTabs( 2939): at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) W/GeckoTabs( 2939): at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) W/GeckoTabs( 2939): at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) W/GeckoTabs( 2939): at junit.framework.TestCase.runBare(TestCase.java:127) W/GeckoTabs( 2939): at junit.framework.TestResult$1.protect(TestResult.java:106) W/GeckoTabs( 2939): at junit.framework.TestResult.runProtected(TestResult.java:124) W/GeckoTabs( 2939): at junit.framework.TestResult.run(TestResult.java:109) W/GeckoTabs( 2939): at junit.framework.TestCase.run(TestCase.java:118) W/GeckoTabs( 2939): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) W/GeckoTabs( 2939): at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) W/GeckoTabs( 2939): at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:545) W/GeckoTabs( 2939): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551)
AFAIK, it shouldn't make them null and this should never not be in the message. But I do see a test that creates a fake message with the wrong parameter name: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/tests/testAppMenuPathways.java#35
(In reply to Wesley Johnston (:wesj) from comment #2) > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/tests/ > testAppMenuPathways.java#35 Nice. r+
Blocks: 1042199
Actually, I'll let you r+
Assignee: wjohnston → mark.finkle
Attachment #8497574 - Flags: review?(wjohnston)
Attachment #8497574 - Flags: review?(wjohnston) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: