Flutter-AssetsAudioPlayer icon indicating copy to clipboard operation
Flutter-AssetsAudioPlayer copied to clipboard

play asset error on android

Open visign3d opened this issue 3 years ago • 2 comments

Just trying play some asset sound on android:

AssetsAudioPlayer.newPlayer().open(
      Audio("sounds/ui_camera-shutter.wav"),
      autoStart: true,
      showNotification: true,
    );

error mesage:

I/ViewRootImpl@8c5707f[MainActivity](15905): ViewPostIme pointer 0
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/ViewRootImpl@8c5707f[MainActivity](15905): ViewPostIme pointer 1
I/MSHandlerLifeCycle(15905): isMultiSplitHandlerRequested: windowingMode=1 isFullscreen=true isPopOver=false isHidden=false skipActivityType=false isHandlerType=true this: DecorView@23b1787[MainActivity]
I/ExoPlayerImpl(15905): Init 8b9cb4b [ExoPlayerLib/2.17.1] [p3s, SM-G998B, samsung, 31]
[App] Sound.play : play
I/ExoPlayerImpl(15905): Release 8b9cb4b [ExoPlayerLib/2.17.1] [p3s, SM-G998B, samsung, 31] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.datasource]
V/MediaPlayer-JNI(15905): native_setup
V/MediaPlayerNative(15905): constructor
V/MediaPlayerNative(15905): setListener
V/MediaPlayer(15905): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(15905): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI(15905): release
V/MediaPlayerNative(15905): setListener
V/MediaPlayerNative(15905): disconnect
V/MediaPlayerNative(15905): destructor
V/MediaPlayerNative(15905): disconnect
W/System.err(15905): com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$NoPlayerFoundException
W/System.err(15905): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:70)
W/System.err(15905): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:88)
W/System.err(15905): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder.access$_findWorkingPlayer(PlayerFinder.kt:26)
W/System.err(15905): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$_findWorkingPlayer$1.invokeSuspend(Unknown Source:15)
W/System.err(15905): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err(15905): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
W/System.err(15905): 	at android.os.Handler.handleCallback(Handler.java:938)
W/System.err(15905): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(15905): 	at android.os.Looper.loopOnce(Looper.java:226)
W/System.err(15905): 	at android.os.Looper.loop(Looper.java:313)
W/System.err(15905): 	at android.app.ActivityThread.main(ActivityThread.java:8669)
W/System.err(15905): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err(15905): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
W/System.err(15905): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
I/flutter (15905): PlatformException(OPEN, null, null, null)
E/flutter (15905): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(OPEN, null, null, null)
E/flutter (15905): 

flutter version : 3.0.1

visign3d avatar Jul 31 '22 09:07 visign3d

same error how do you solve it?

Sums-shadow avatar Oct 06 '22 13:10 Sums-shadow

I'm also facing the same error

Testing on Emulator, [emu64a, sdk_gphone64_arm64, Google, 33] Android 13 (sdk 33)

I/ExoPlayerImpl( 7556): Release 37cb05c [ExoPlayerLib/2.18.1] [emu64a, sdk_gphone64_arm64, Google, 33] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.datasource, goog.exo.extractor]
D/CCodecBuffers( 7556): [c2.android.mp3.decoder#70:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 0
D/CCodecBuffers( 7556): [c2.android.mp3.decoder#70:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 1
D/CCodecBuffers( 7556): [c2.android.mp3.decoder#70:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 2
D/MediaCodec( 7556): keep callback message for reclaim
I/CCodecConfig( 7556): query failed after returning 7 values (BAD_INDEX)
W/Codec2Client( 7556): query -- param skipped: index = 1342179345.
W/Codec2Client( 7556): query -- param skipped: index = 2415921170.
4
D/CCodecBufferChannel( 7556): [c2.android.mp3.decoder#70] MediaCodec discarded an unknown buffer
I/hw-BpHwBinder( 7556): onLastStrongRef automatically unlinking death recipients
I/ExoPlayerImpl( 7556): Init 6fae88c [ExoPlayerLib/2.18.1] [emu64a, sdk_gphone64_arm64, Google, 33]
I/ExoPlayerImpl( 7556): Release 6fae88c [ExoPlayerLib/2.18.1] [emu64a, sdk_gphone64_arm64, Google, 33] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.datasource, goog.exo.extractor]
V/MediaPlayer( 7556): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 7556): cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/System.err( 7556): com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$NoPlayerFoundException
W/System.err( 7556): atcom.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:70)
W/System.err( 7556): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:88)
W/System.err( 7556): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder.access$_findWorkingPlayer(PlayerFinder.kt:26)
W/System.err( 7556): 	at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$_findWorkingPlayer$1.invokeSuspend(Unknown Source:15)
W/System.err( 7556): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err( 7556): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
W/System.err( 7556): 	at android.os.Handler.handleCallback(Handler.java:942)
W/System.err( 7556): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 7556): 	at android.os.Looper.loopOnce(Looper.java:201)
W/System.err( 7556): 	at android.os.Looper.loop(Looper.java:288)
W/System.err( 7556): 	at android.app.ActivityThread.main(ActivityThread.java:7872)
W/System.err( 7556): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 7556): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
W/System.err( 7556): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
D/BufferPoolAccessor2.0( 7556): bufferpool2 0xb4000071d1e3ba88 : 0(0 size) total buffers - 0(0 size) used buffers - 179/184 (recycle/alloc) - 5/356 (fetch/transfer)
D/BufferPoolAccessor2.0( 7556): bufferpool2 0xb4000071d1efcc08 : 0(0 size) total buffers - 0(0 size) used buffers - 54/59 (recycle/alloc) - 5/106 (fetch/transfer)
D/BufferPoolAccessor2.0( 7556): evictor expired: 2, evicted: 2
D/BufferPoolAccessor2.0( 7556): evictor expired: 1, evicted: 0
D/BufferPoolAccessor2.0( 7556): bufferpool2 0xb4000071d1eeb438 : 0(0 size) total buffers - 0(0 size) used buffers - 131/136 (recycle/alloc) - 5/260 (fetch/transfer)
D/BufferPoolAccessor2.0( 7556): evictor expired: 1, evicted: 1

xSuperMu avatar Jan 03 '23 00:01 xSuperMu