Closed Bug 1577929 Opened 6 years ago Closed 6 years ago

Support session restore in GeckoView Example

Categories

(GeckoView :: General, defect)

Unspecified
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: botond, Unassigned)

Details

When investigating a bug in GVE (which is supposed to be the preferred way to investigate platform issues on Android), you often need to reinstall and therefore restart GVE multiple times as you're trying out different platform changes.

It would be nice if GVE supported session restore, such that the page you had open at the time of the reinstall is automatically loaded when you restart. Without this, it can be tedious to manually navigate to the page in question each time on restart.

I'm +0 on the actual request: session restore is, or rather can be, complex.

But is your use case addressed by mach run? mach run --no-install --restart --url URL is what I use for this type of relaunching. Perhaps that's a good approximation?

(In reply to Nick Alexander :nalexander [he/him] from comment #1)

session restore is, or rather can be, complex.

Yeah, I can certainly see how adding support for a complex feature like session restore to GVE would be an unfortunate duplication of work already done for e.g Fenix.

I wonder if perhaps the solution to this would be to make it easier to run a browser that already supports the features in question (e.g. Fenix) against a given GV build.

Remember the B2G days, when you checked out Gecko and Gaia, and ran them in combination? Sure, there were sometimes issues with matching up the versions of Gecko and Gaia, but on the other hand we didn't need to maintain a lightweight reimplementatin of Gaia in m-c.

But is your use case addressed by mach run? mach run --no-install --restart --url URL is what I use for this type of relaunching. Perhaps that's a good approximation?

That seems like it would work in many cases (and I admit I didn't think of it, or even know that mach run worked on Android at all, so thanks for mentioning it). It doesn't work in the particular case that prompted me to file this bug, because the URL is the result of navigation that I can't replicate on desktop (because the site is different on desktop), so I'd have to somehow copy the URL from GVE's address bar to my desktop terminal.

(In reply to Botond Ballo [:botond] from comment #2)

the URL is the result of navigation that I can't replicate on desktop (because the site is different on desktop), so I'd have to somehow copy the URL from GVE's address bar to my desktop terminal.

You can usually see Mobile websites simply by changing the User Agent string (I use a WebExtension to do that and it's quite nice!)

(In reply to Botond Ballo [:botond] from comment #2)

(In reply to Nick Alexander :nalexander [he/him] from comment #1)

session restore is, or rather can be, complex.

Yeah, I can certainly see how adding support for a complex feature like session restore to GVE would be an unfortunate duplication of work already done for e.g Fenix.

I wonder if perhaps the solution to this would be to make it easier to run a browser that already supports the features in question (e.g. Fenix) against a given GV build.

Remember the B2G days, when you checked out Gecko and Gaia, and ran them in combination? Sure, there were sometimes issues with matching up the versions of Gecko and Gaia, but on the other hand we didn't need to maintain a lightweight reimplementatin of Gaia in m-c.

I wasn't part of b2g at the relevant time, but I have been thinking of (and working on) this problem for ages, and finally landed and documented the current Blessed Approach at https://mozilla.github.io/geckoview/contributor/geckoview-quick-start#include-geckoview-as-a-dependency. This works out of the box in Fenix and reference-browser. Perhaps that's enough? N.b., the instructions (printed during the build by the in-tree script) are already dated: you just need mach build to update the local GV Maven/AAR!

James recommends WONTFIX because there are other ways besides session restore to load test URLs when launching GVE.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX

(In reply to Botond Ballo [:botond] from comment #2)

But is your use case addressed by mach run? mach run --no-install --restart --url URL is what I use for this type of relaunching. Perhaps that's a good approximation?

That seems like it would work in many cases (and I admit I didn't think of it, or even know that mach run worked on Android at all, so thanks for mentioning it). It doesn't work in the particular case that prompted me to file this bug, because the URL is the result of navigation that I can't replicate on desktop (because the site is different on desktop), so I'd have to somehow copy the URL from GVE's address bar to my desktop terminal.

Here's one reason why this is not a satisfactory solution: it's not always a local build of GVE that I'm testing. My local builds are typically debug builds which are quite slow, so when I don't need local changes, I prefer to test with a GVE nightly release. However, as far as I'm aware you can't get mach run to launch a non-local build.

You need to log in before you can comment on or make changes to this bug.