flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

MissingPluginException(No implementation found for method resetPlugin on channel com.dooboolab.flutter_sound_player)[BUG]:

Open binemmanuel opened this issue 3 years ago • 2 comments

I get this exception though it looks like everything works fine on debug mode but the app crashes on none debug mode.

E/flutter ( 5779): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method resetPlugin on channel com.dooboolab.flutter_sound_player)
E/flutter ( 5779): #0      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:165
E/flutter ( 5779): <asynchronous suspension>
E/flutter ( 5779): #1      FlutterSoundPlayer._openAudioSession
package:flutter_sound_lite/public/flutter_sound_player.dart:688
E/flutter ( 5779): <asynchronous suspension>
E/flutter ( 5779): #2      FlutterSoundPlayer.openAudioSession.<anonymous closure>
package:flutter_sound_lite/public/flutter_sound_player.dart:651
E/flutter ( 5779): <asynchronous suspension>
E/flutter ( 5779): #3      BasicLock.synchronized
package:synchronized/src/basic_lock.dart:33

binemmanuel avatar Jan 28 '22 14:01 binemmanuel

Too many problems with 'resetPlugin'. Someone should remove this bad hack, and do something better to solve the hot-reload crashes. I am really not happy with this dirty hack. Better to do nothing than creating other problems

Larpoux avatar Jan 28 '22 14:01 Larpoux

Here some informations on 'resetPlugin' for contributors wanting to clean things.

The problem occurs when we do a hot-reload : the dart appli is reinitialized but the native code does not know that there is a re-initialization. Then there is inconsistency between the forground in dart and the background in objective c or java. We get then a crash because the variable 'slotNo' is incorrect.

Good luck to contributors wanting to work on this issue. Of course I can help

Larpoux avatar Jan 28 '22 14:01 Larpoux

This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.

github-actions[bot] avatar Dec 06 '23 01:12 github-actions[bot]