Closed Bug 1399504 Opened 7 years ago Closed 7 years ago

Amazon Music stopped redirecting to Play Store

Categories

(Firefox for Android Graveyard :: General, defect, P2)

All
Android
defect

Tracking

(platform-rel ?, fennec+, firefox55 unaffected, firefox56 unaffected, firefox57blocking verified, firefox58 fixed)

VERIFIED FIXED
Firefox 58
Tracking Status
platform-rel --- ?
fennec + ---
firefox55 --- unaffected
firefox56 --- unaffected
firefox57 blocking verified
firefox58 --- fixed

People

(Reporter: jchen, Assigned: droeh)

References

()

Details

(Keywords: regression, Whiteboard: [platform-rel-Amazon])

Attachments

(1 file, 1 obsolete file)

In 56, going to Amazon Music without having the app installed would redirect to the Play Store. In 57, the redirect response added a "browser_fallback_url" parameter. We do handle "browser_fallback_url" but the redirect timeout in ContentDispatchChooser.js doesn't let us complete the redirect every time.
Assignee: nobody → droeh
tracking-fennec: ? → +
Hey snorp, is this a 57 blocker? Also please hook us up with a priority, thanks.
Flags: needinfo?(snorp)
Priority: -- → P1
platform-rel: --- → ?
Whiteboard: [platform-rel-Amazon]
Flags: needinfo?(snorp)
Priority: P1 → P2
This looks to just be a typo in how we decide whether or not to fail silently in the Intent:OpenNoHandler callback.
Attachment #8911861 - Flags: review?(nchen)
Comment on attachment 8911861 [details] [diff] [review]
Fix a typo in ContentDispatchChooser.js

Review of attachment 8911861 [details] [diff] [review]:
-----------------------------------------------------------------

I think this regresses the fix from bug 1278581 (even though that fix is kind of broken). I think the correct behavior is,

* Click on "foo://bar" link should have no response (first link in [1])
* Click on redirect link should perform redirection (second link in [1])

In current Nightly, first link works (no response) but second link is broken (no redirection). With this patch, first link breaks (there _is_ a response) but second link works (redirects).

[1] http://moz.jnchen.com/tests/test-bug1278581.html
Attachment #8911861 - Flags: review?(nchen) → feedback+
Fair enough -- I thought we wanted to show an error on clicking a foo://bar link, but from the comments on bug 1278581 it looks like we don't.

This patch sends both the uri and a boolean named isFallback to the Intent:OpenNoHandler callback, and always opens the uri when isFallback is true. When isFallback is false it leaves the existing behavior unmodified.
Attachment #8911861 - Attachment is obsolete: true
Attachment #8912259 - Flags: review?(nchen)
Comment on attachment 8912259 [details] [diff] [review]
Fallback URL handling

Review of attachment 8912259 [details] [diff] [review]:
-----------------------------------------------------------------

Might be easier to just send success for fallback case and redirect if success response is not null.

::: mobile/android/base/java/org/mozilla/gecko/IntentHelper.java
@@ +483,5 @@
>       *                 the uri to load if Java does not load a page
>       */
>      private void openNoHandler(final GeckoBundle msg, final EventCallback callback) {
>          final String uri = msg.getString("uri");
> +        final JSONObject errorResponse = new JSONObject();

Please use GeckoBundle.
Attachment #8912259 - Flags: review?(nchen) → review+
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eab929170ab0
Pass more information to Intent:OpenNoHandler callback so that fallback urls may always be handled correctly. r=jchen
https://hg.mozilla.org/mozilla-central/rev/eab929170ab0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Hi Dylan,
Should we uplift this bug to beta 57?
Flags: needinfo?(droeh)
Comment on attachment 8912259 [details] [diff] [review]
Fallback URL handling

Approval Request Comment
[Feature/Bug causing the regression]:
[User impact if declined]: Fallback urls will not be handled in instances where an intent tries to open an app that is not installed.
[Is this code covered by automated tests?]: No
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: 
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]: No
[Why is the change risky/not risky?]: Behavior is changed only if a fallback url is present, and only to ensure that a fallback url is never ignored.
[String changes made/needed]:
Flags: needinfo?(droeh)
Attachment #8912259 - Flags: approval-mozilla-beta?
Comment on attachment 8912259 [details] [diff] [review]
Fallback URL handling

Severe regression, Beta57+
Attachment #8912259 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on Beta 57.0b5.
Devices:
Asus ZenPad 8.0 Z380KL (Android 6.0.1)
Huawei MediaPad M2 (Android 5.1.1)
Motorola Nexus 6 (Android 7.0)
Status: RESOLVED → VERIFIED
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: