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

Exception: Failed to handle method call #34

Open
abacaj opened this issue Jun 18, 2018 · 8 comments
Open

Exception: Failed to handle method call #34

abacaj opened this issue Jun 18, 2018 · 8 comments
Labels

Comments

@abacaj
Copy link

abacaj commented Jun 18, 2018

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
@joelfaul
Copy link

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.

@ludelafo
Copy link
Member

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 ludelafo added the bug label Jul 23, 2018
@faku99
Copy link
Member

faku99 commented Oct 2, 2018

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

@joelfaul
Copy link

joelfaul commented Oct 4, 2018 via email

@faku99
Copy link
Member

faku99 commented Oct 5, 2018

Hi Joel, no problem for the pull request.

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

@joelfaul
Copy link

joelfaul commented Oct 5, 2018 via email

@joelfaul
Copy link

joelfaul commented Oct 5, 2018 via email

@faku99
Copy link
Member

faku99 commented Oct 9, 2018

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

I'll look into it and keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants