Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

[audiofileplayer] The play stops or doesn't start and there are crashes and ANRs #120

@mr-mmmmore

Description

@mr-mmmmore

Hi,

Since our app has been on production a few weeks ago I've been seing a rather high amount of crashes and ANRs related to this plugin on Google Play. I was waiting to have more information from user feedbacks to create an issue, so here it is.

Today a user complained about the audio play not starting, or stopping randomly while using our app. I have been able to link the following crash and ANR to this specific user:

Crash

java.lang.NullPointerException:
at com.google.flutter.plugins.audiofileplayer.AudiofileplayerPlugin.onMediaButtonClick (AudiofileplayerPlugin.java:25)
at com.google.flutter.plugins.audiofileplayer.AudiofileplayerService$MediaSessionCallback.onMediaButtonEvent (AudiofileplayerService.java:92)
at android.support.v4.media.session.MediaSessionCompat$Callback$StubApi21.onMediaButtonEvent (MediaSessionCompat.java:2)
at android.support.v4.media.session.MediaSessionCompatApi21$CallbackProxy.onMediaButtonEvent (MediaSessionCompatApi21.java:2)
at android.media.session.MediaSession$CallbackMessageHandler.handleMessage (MediaSession.java:1578)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:8167)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1100)

ANR
Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{4a438d1 u0 myapp.bundleid.com/com.google.flutter.plugins.audiofileplayer.AudiofileplayerService}

This user is on Android 10 (SDK 29).

The app uses the latest plugin (v. 2.0.1) with Flutter 2.2.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions