stereo icon indicating copy to clipboard operation
stereo copied to clipboard

Exception: Failed to handle method call

Open abacaj opened this issue 7 years ago • 8 comments

I have tried to load the example and get this error:

E/MediaPlayerNative(20252): stop called in state 1, mPlayer(0x0)
E/MediaPlayerNative(20252): error (-38, 0)
V/MediaPlayer(20252): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer(20252): cleanDrmObj: mDrmObj=null mDrmSessionId=null
E/MethodChannel#com.twofind.stereo(20252): Failed to handle method call
E/MethodChannel#com.twofind.stereo(20252): java.lang.IllegalArgumentException
E/MethodChannel#com.twofind.stereo(20252): 	at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:74)
E/MethodChannel#com.twofind.stereo(20252): 	at com.twofind.stereo.AudioTrack.toJson(AudioTrack.java:14)
E/MethodChannel#com.twofind.stereo(20252): 	at com.twofind.stereo.StereoPlugin.load(StereoPlugin.java:155)
E/MethodChannel#com.twofind.stereo(20252): 	at com.twofind.stereo.StereoPlugin.onMethodCall(StereoPlugin.java:75)
E/MethodChannel#com.twofind.stereo(20252): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#com.twofind.stereo(20252): 	at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:152)
E/MethodChannel#com.twofind.stereo(20252): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#com.twofind.stereo(20252): 	at android.os.MessageQueue.next(MessageQueue.java:325)
E/MethodChannel#com.twofind.stereo(20252): 	at android.os.Looper.loop(Looper.java:142)
E/MethodChannel#com.twofind.stereo(20252): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
E/MethodChannel#com.twofind.stereo(20252): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.twofind.stereo(20252): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/MethodChannel#com.twofind.stereo(20252): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
W/MediaPlayer(20252): mediaplayer went away with unhandled events

abacaj avatar Jun 18 '18 23:06 abacaj

I'm getting the Failed to handle method call error when I click on one of the play mp3 buttons, such as 'Play dubstep.mp3'. But only when running in Android (either emulator or physical device):

E/MethodChannel#com.twofind.stereo( 6359): Failed to handle method call
E/MethodChannel#com.twofind.stereo( 6359): java.lang.IllegalArgumentException
E/MethodChannel#com.twofind.stereo( 6359): 	at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:74)
E/MethodChannel#com.twofind.stereo( 6359): 	at com.twofind.stereo.AudioTrack.toJson(AudioTrack.java:14)
E/MethodChannel#com.twofind.stereo( 6359): 	at com.twofind.stereo.StereoPlugin.load(StereoPlugin.java:155)
E/MethodChannel#com.twofind.stereo( 6359): 	at com.twofind.stereo.StereoPlugin.onMethodCall(StereoPlugin.java:75)
E/MethodChannel#com.twofind.stereo( 6359): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#com.twofind.stereo( 6359): 	at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:152)
E/MethodChannel#com.twofind.stereo( 6359): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#com.twofind.stereo( 6359): 	at android.os.MessageQueue.next(MessageQueue.java:325)
E/MethodChannel#com.twofind.stereo( 6359): 	at android.os.Looper.loop(Looper.java:142)
E/MethodChannel#com.twofind.stereo( 6359): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
E/MethodChannel#com.twofind.stereo( 6359): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.twofind.stereo( 6359): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/MethodChannel#com.twofind.stereo( 6359): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

The same action works fine in iOS.

I rolled back to 1.0.0 and experienced the same problem. I'm pretty sure I tried that version (1.0.0) in Android emulator before and did not experience this exception.

joelfaul avatar Jun 30 '18 18:06 joelfaul

Dear @abacaj and @joelfaul, Sorry for the long answer, we do this project during our free time and university take all of it..

We will try to tackle this issue as soon as possible, hopefully in a few weeks as I need to reinstall and configure my workstation.

We will come back to you soon to resolve this problem, thanks for your understanding.

ludelafo avatar Jul 23 '18 16:07 ludelafo

I just tried to recreate the issue and it works fine on Android. Did you try to update Flutter to the latest version?

faku99 avatar Oct 02 '18 13:10 faku99

Hi Lucas,

I just updated to your latest code as well as ensured Flutter is current and I am getting the same exception in the Android emulator. When I get a chance, I will try a completely clean get of your code just in case I have some residual thing in my copy affecting it.

Also, I accidentally created an empty pull request on your project. I closed it but I'm not sure how to delete it.

Joel

On Tue, Oct 2, 2018 at 9:17 AM Lucas Elisei [email protected] wrote:

I just tried to recreate the issue and it works fine on Android. Did you tried to update Flutter to the latest version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2find/stereo/issues/34#issuecomment-426269766, or mute the thread https://github.com/notifications/unsubscribe-auth/ARLc2FqjkzwYAKHVziIP0JZb7QuoKevyks5ug2d7gaJpZM4Usot- .

joelfaul avatar Oct 04 '18 19:10 joelfaul

Hi Joel, no problem for the pull request.

Which version of the Android SDK are you running the application on? It might be related.

faku99 avatar Oct 05 '18 16:10 faku99

I've been using Nexus 5X API 27 for my emulator

On Fri, Oct 5, 2018 at 12:23 PM Lucas Elisei [email protected] wrote:

Hi Joel, no problem for the pull request.

Which version of the Android SDK are you running the application on? It might be related.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2find/stereo/issues/34#issuecomment-427422423, or mute the thread https://github.com/notifications/unsubscribe-auth/ARLc2OhHUTuWOtt6hjJ57dcfnZVph3tpks5uh4eZgaJpZM4Usot- .

joelfaul avatar Oct 05 '18 18:10 joelfaul

Also, I have Android 8.1 (Oreo) installed and Android P Preview partially installed. So I guess it is building with Android 8.1, API level 27.

On Fri, Oct 5, 2018 at 2:16 PM Jacob Joel [email protected] wrote:

I've been using Nexus 5X API 27 for my emulator

On Fri, Oct 5, 2018 at 12:23 PM Lucas Elisei [email protected] wrote:

Hi Joel, no problem for the pull request.

Which version of the Android SDK are you running the application on? It might be related.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2find/stereo/issues/34#issuecomment-427422423, or mute the thread https://github.com/notifications/unsubscribe-auth/ARLc2OhHUTuWOtt6hjJ57dcfnZVph3tpks5uh4eZgaJpZM4Usot- .

joelfaul avatar Oct 05 '18 18:10 joelfaul

I just ran the application on API 27 and indeed an exception is raised.

I'll look into it and keep you updated.

faku99 avatar Oct 09 '18 14:10 faku99