Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android:startForegroundService TransferService is crashing in API 33. #3322

Closed
ajayakrishnan opened this issue Jun 12, 2023 · 2 comments
Closed
Labels
bug Something isn't working closing soon Issue will auto-close if there is no additional activity within 7 days. pending-community-response Issue is pending response from the issue requestor s3 Issues with the AWS Android SDK for Simple Storage Service (S3).

Comments

@ajayakrishnan
Copy link

ajayakrishnan commented Jun 12, 2023

Describe the bug
Calling startForegroundService with TransferService is crashing in API 33 when the app is removed from background.

Fatal Exception: java.lang.RuntimeException: Unable to create application com.test.application.TestApplication: android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false: service TransferService
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7619)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

To Reproduce

  1. Open the app
  2. Put the app in the background.
  3. Clear from memory.
  4. App crashes.

**Environment Information

  • AWS Android SDK Version: com.amazonaws:aws-android-sdk-s3:2.16.5
  • Device: Samsung s10 lite
  • Android Version: Tiramisu API level 33
@gpanshu
Copy link
Contributor

gpanshu commented Jun 20, 2023

Hi @ajayakrishnan whats your compilesdkversion and targetsdkversion?

@gpanshu gpanshu added the pending-community-response Issue is pending response from the issue requestor label Jun 20, 2023
@tylerjroach
Copy link
Member

@ajayakrishnan Please update to the newest version of the SDK. There were changes in the way that the storage foreground service is started/stopped between the version you are using and the latest. If you are still seeing crashes with the latest version, please let us know.

@eeatonaws eeatonaws added bug Something isn't working s3 Issues with the AWS Android SDK for Simple Storage Service (S3). labels Jun 26, 2023
@eeatonaws eeatonaws added the closing soon Issue will auto-close if there is no additional activity within 7 days. label Jul 18, 2023
@gpanshu gpanshu closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing soon Issue will auto-close if there is no additional activity within 7 days. pending-community-response Issue is pending response from the issue requestor s3 Issues with the AWS Android SDK for Simple Storage Service (S3).
Projects
None yet
Development

No branches or pull requests

4 participants