Closed Bug 1573479 Opened 6 years ago Closed 6 years ago

Crash in [@ android.os.RemoteException: at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java)]

Categories

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

Firefox 68
Unspecified
Android
defect

Tracking

(firefox-esr6870+ verified, firefox69 wontfix, firefox70 wontfix, firefox71 wontfix)

VERIFIED FIXED
Tracking Status
firefox-esr68 70+ verified
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix

People

(Reporter: marcia, Assigned: petru)

References

Details

(Keywords: crash, regression, topcrash)

Crash Data

Attachments

(1 file)

This bug is for crash report bp-afacaf40-b916-4420-adc7-ca1420190813.

Seen while looking at Fennec crash stats - this appears to have been around in a few previous releases, but is higher in 68: https://bit.ly/2YZoBY9

Java stack trace:

android.os.RemoteException
	at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:2144)
	at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:905)
	at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:668)
	at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1534)
	at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:610)

All crashes seem to be from android 9 (API 28).

the volume of submitted crash reports is spiking up in the last few days. user comments say they can generally reproduce the crash when they go to the menu > share > copy to clipboard.

i am able to reproduce the crash on android 9 with those steps as well

Has STR: --- → yes

Petru, Andrei, can you take a look?

Flags: needinfo?(petru.lingurar)
Flags: needinfo?(andrei.a.lazar)
Priority: -- → P1
Assignee: nobody → vlad.baicu
Flags: needinfo?(petru.lingurar)
Flags: needinfo?(andrei.a.lazar)

Bug 1578796 is the Android 10 version of this crash.

Vlad, can you provide an update on your status here?

Flags: needinfo?(vlad.baicu)
Crash Signature: [@ android.os.RemoteException: at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java)] → [@ android.os.RemoteException: at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java)] [@ android.os.RemoteException: at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(…

Not surprisingly, the spike for Android 10 coincides with when Google pushed it out on Tuesday, 9-3: https://mzl.la/2lzh2tk. The other signature shows a spike starting around 8-26 according to the crash stats graph: https://mzl.la/2m1V828.

Crash Signature: [@ android.os.RemoteException: at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java)] [@ android.os.RemoteException: at → [@ android.os.RemoteException: at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java)] [@ android.os.RemoteException: at
Keywords: topcrash

I am currently working on the sign in buttons feature and this is next in line in my queue. If we need to move faster we can rearrange by assisgning someone else from the team

Flags: needinfo?(vlad.baicu)

I would argue a new topcrash should take precedence over new feature work...

At best we can pick this up on Monday. However please NI Stefan regarding the prioritisation of these bugs. Currently we have quite a few in our hands (most of which P1s), and we cannnot be aware of their urgency at all times

Flags: needinfo?(sarentz)
Assignee: vlad.baicu → petru.lingurar
Status: NEW → ASSIGNED

the volume of this signature is now declining again in the past couple of days - i also don't have the "copy to clipboard" option available in the share menu of my android 9 device anymore. maybe google rolled out an update changing the behaviour that fixed the issue as suddenly as it started?

This seems to be indeed a recent issue introduced externally from our app.
There are applications, most notably Google Maps, that would also offer a "copy to clipboard" sharing action but then would not know how to parse the sent data and crash, issue that exists also on Fenix - https://github.com/mozilla-mobile/fenix/issues/3371

A more helpful stack trace from our app:

java.lang.SecurityException: Permission Denial:
starting Intent { act=android.intent.action.SEND typ=text/plain flg=0x80001
cmp=com.google.android.apps.maps/com.google.android.apps.gmm.sharing.SendTextToClipboardActivity
clip={text/plain T:https://m.youtube.com/} (has extras) }
from ProcessRecord{909d292 8032:org.mozilla.firefox/u0a415} (pid=8032, uid=10415)
not exported from uid 10128

com.google.android.apps.maps/com.google.android.apps.gmm.sharing.SendTextToClipboardActivity relatively recent started to support ACTION_SEND which we also use to query all of the installed apps to build our share to list. The SendTextToClipboardActivity is not exported though - not available for outside callers and so whenever we try to share something to Maps we get that SecurityException.

Recent versions of Google Maps (10.23.4 was problematic, 10.24.4 is not anymore) do not declare an intent-filter for ACTION_SEND anymore so this bug should not be reproducible anymore for users who update their Google Maps application to the latest version. I suspect Google Maps was the most notable offender.

As a future-proof fix though, all we can do is prevent crashes in the event that sharing fails.
And then maybe show a Toast message informing users that sharing failed.

Flags: needinfo?(sarentz)

(In reply to [:philipp] from comment #12)

i also don't have the "copy to clipboard" option available in the share menu of my android 9 device anymore.

Firefox does not insert it's own "Copy to clipboard" option.
All options the users see in the sharing menu are options offered by the currently installed applications.
On my device I see Google Drive offering such an option com.google.android.apps.docs/.drive.clipboard.SendTextToClipboardActivity which seems to work great.

Flags: qe-verify+

Hi, I verified with the provided try build(Comment16) with Google Pixel 3a XL (Android 9) and Samsung Galaxy Note9 (Android 9)

NOTES:
Tested Through "Menu"/"Share"/"Copy to clipboard" option - For "Google Maps" application the "Copy to clipboard" option was not present.
Tested through "Menu"/"Share"/"Copy to clipboard" option - For "Adobe Creative Cloud" a toast notificaton at the bottom of the device is displayed "Unable to share to the indicated app" - implementation as per Comment13 - last line.
Tested through Long tapping on a link/"Share"/"Copy to clipboard" option - For "Adobe Creative Cloud" a toast notificaton at the bottom of the device is displayed "Unable to share to the indicated app" - implementation as per Comment13 - last line.

I will leave the ticket with this status, until it is uplifted to ESR.

Thanks

Comment on attachment 9092367 [details]
Bug 1573479 - Show Toast, not crash when sharing fails; r?VladBaicu

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Prevent crashes if a share option fails.
  • User impact if declined: The app may crash if a share target does not properly handle data sent from our app.
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple try-catch with a Toast shown in case of error.
  • String or UUID changes made by this patch: share_error_toast_message
Attachment #9092367 - Flags: approval-mozilla-esr68?

Comment on attachment 9092367 [details]
Bug 1573479 - Show Toast, not crash when sharing fails; r?VladBaicu

Approved for Fennec 68.2b4.

Attachment #9092367 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
QA Whiteboard: [qa-triaged]

I tried to reproduce the issue on Beta 68.2b4 on a Pixel 3 XL (Android 9) following the repro steps from comment 17 but was unable to, I will mark this issue as VERIFIED.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
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: