Closed Bug 1482456 Opened 6 years ago Closed 6 years ago

Starting geckoview_example app with '-profile' argument causes app to hang/fail startup

Categories

(GeckoView :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: rwood, Unassigned)

References

Details

Using a Google Pixel 2 and the geckoview_example.apk (Android 4.0 API16+ debug or opt) from today's mozilla inbound.

Starting the geckoview_example app with the '-profile' argument is now failing (this used to work).

The geckoview_example app starts up on the device but then the page just remains blank with the loading indicator at the top stuck. If I start the app with the same command line but remove the '-profile' arg then the app starts up and loads the default mozilla page successfully.

13:19:43     INFO -  adb launch_application: am start -W -n org.mozilla.geckoview_example/org.mozilla.geckoview_example.GeckoViewActivity -a android.intent.action.Main --ez use_multiprocess False --es args '-profile /sdcard/raptor-profile'

Portion of adb logcat with the error:

08-10 13:19:43.651  6162  6178 W GeckoProfile: ZZZ GeckoProfile sees args: -profile /sdcard/raptor-profile
08-10 13:19:43.655  6162  6178 D GeckoSharedPrefs: Current version = 2, prefs version = 2
08-10 13:19:43.655  6162  6178 W GeckoProfile: ZZZ GeckoProfile profilePath: /sdcard/raptor-profile
08-10 13:19:43.655  6162  6178 W GeckoProfile: ZZZ GeckoProfile get, dir: /sdcard/raptor-profile
08-10 13:19:43.659  6162  6178 I Gecko   : [6162, Unnamed thread cc512080]
...
08-10 13:19:43.684  6162  6180 I OpenGLRenderer: Initialized EGL, version 1.4
08-10 13:19:43.684  6162  6180 D OpenGLRenderer: Swap behavior 2
08-10 13:19:43.692  6162  6178 I Gecko   : [6162, Main Thread] ###!!! ASSERTION: Failed to open lock file.: 'Error', file /builds/worker/workspace/build/src/toolkit/profile/nsProfileLock.cpp, line 245
See Also: → 1481471
Blocks: 1480841
(In reply to Robert Wood [:rwood] from comment #0)
> 08-10 13:19:43.692  6162  6178 I Gecko   : [6162, Main Thread] ###!!!
> ASSERTION: Failed to open lock file.: 'Error', file
> /builds/worker/workspace/build/src/toolkit/profile/nsProfileLock.cpp, line
> 245

Is it possible that /sdcard/raptor-profile does not exist, or that it has an existing profile lock file (I'm not sure of the name) in it?
Is the "Storage" permission for the app turned on?
(In reply to Geoff Brown [:gbrown] from comment #1)

> Is it possible that /sdcard/raptor-profile does not exist, or that it has an
> existing profile lock file (I'm not sure of the name) in it?

Thanks Geoff, I double checked, it does exist on the sdcard, and I don't see any lock files. It is blown away first by raptor if that folder does already exist, before pushing the profile.
(In reply to Jim Chen [:jchen] [:darchons] from comment #2)
> Is the "Storage" permission for the app turned on?

Ahhhh that was it - I clicked on the 'GeckoView Example' App icon on the phone, choose app info, permissions, and turned on storage. Now the app loads up fine using the profile. Thanks! :)

Question - is there a way to set that storage permission programmatically so I can do that in the automation?
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(nchen)
Resolution: --- → INVALID
Another approach we sometimes use in automation is

  adb install -g <apk>

-g grants all runtime permissions.
Very cool! Thanks guys.
Product: Firefox for Android → GeckoView
You need to log in before you can comment on or make changes to this bug.