Closed Bug 1596078 Opened 5 years ago Closed 5 years ago

Crash for site from "Highlight" with a specific format when "Add page shortcut" option is applied

Categories

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

ARM
Android
defect

Tracking

(firefox-esr6871+ verified)

VERIFIED FIXED
Tracking Status
firefox-esr68 71+ verified

People

(Reporter: diana.rus, Assigned: petru)

Details

(Whiteboard: [fennec68.3])

Crash Data

Attachments

(1 file)

Environment:
Device: Google Pixel C (Android 8.0.0), Samsung Galaxy Tab A T515 (Android 9)
Build: Firefox ESR Release 68.2.1, Firefox Beta 68.3b4 and Firefox Nightly 68.3a1(2019-11-12)

Steps to reproduce:

  1. Open application.
  2. Put in URL link: https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=test&_sacat=0
  3. Bookmark the site.
  4. Tap on the URL bar so that, the Top Site focus is present.
  5. From the "Highlights" section long tap on the link from step 2.
  6. Choose "Add page Shortcut" option.

Expected Result: The "Add Page shortcut" option works as it's supposed to.
Actual Result: A crash is encountered.

Notes:

Java Stack Trace (Redacted):
java.lang.IllegalArgumentException
at com.android.internal.util.Preconditions.checkStringNotEmpty(Preconditions.java:96)
at android.content.pm.ShortcutInfo$Builder.setShortLabel(ShortcutInfo.java:872)
at org.mozilla.gecko.util.ShortcutUtils.createHomescreenIcon26(ShortcutUtils.java:75)
at org.mozilla.gecko.util.ShortcutUtils.createHomescreenIcon(ShortcutUtils.java:39)
at org.mozilla.gecko.GeckoApplication.createShortcutWithIcon(GeckoApplication.java:758)
at org.mozilla.gecko.GeckoApplication$4.onIconResponse(GeckoApplication.java:745)
at org.mozilla.gecko.icons.IconTask$2.run(IconTask.java:106)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Crash Signature: java.lang.IllegalArgumentException: at com.android.internal.util.Preconditions.checkStringNotEmpty(Preconditions.java) → [@ java.lang.IllegalArgumentException: at com.android.internal.util.Preconditions.checkStringNotEmpty(Preconditions.java)]

Looks like we're seeing this in the wild too. Can your team please take a look?

Flags: needinfo?(petru.lingurar)
Priority: -- → P3
Assignee: nobody → petru.lingurar

The above patch also takes into account the case where the title of the page would be empty, case in which by default the title would be webpage's URI. Behavior that was already used for if the title would be null.

I have not been able to reproduce the issue though and I'm thinking that this might mask a bigger problem.
Diana, can you please confirm that the title of the newly bookmarked page appears as empty in the "Highlights" section also? In my tests I see a title so I'm not exactly sure what's causing this.

Flags: needinfo?(petru.lingurar) → needinfo?(diana.rus)

Hi, verified with Google Pixel 3a (Android 9) on Firefox Nightly 68.3a1 (2019-11-22), I checked with both sites:

Note: Both pages seem to have a title for the page.
For "https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=test&_sacat=0" is "test | eBay"
For "https://www.emag.ro/search/test?ref=effective_search" is "Cauți test? Alege din oferta eMAG.ro"

Flags: needinfo?(diana.rus)

Comment on attachment 9110883 [details]
Bug 1596078 - Use URI if shortcut title would otherwise be null or empty; r?AndreiLazar

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: High volume crash.
  • User impact if declined: Possible crash when trying to add specific pages as homescreen shortcuts.
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small change.
  • String or UUID changes made by this patch:
Attachment #9110883 - Flags: approval-mozilla-esr68?

Comment on attachment 9110883 [details]
Bug 1596078 - Use URI if shortcut title would otherwise be null or empty; r?AndreiLazar

Fixes a Fennec crash. Approved for 68.3b6.

Attachment #9110883 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fennec68.3]

I have tested the issue on 68.3.0 RC using a Google Pixel 3a (Android 9) and Google Pixel 3 XL (Android 9) and the issue no longer occurs.

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: