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

Every time the recorder is disposed, an error is thrown #387

Closed
gonuit opened this issue Aug 24, 2024 · 2 comments
Closed

Every time the recorder is disposed, an error is thrown #387

gonuit opened this issue Aug 24, 2024 · 2 comments
Labels
Android bug Something isn't working

Comments

@gonuit
Copy link

gonuit commented Aug 24, 2024

Package version

  • record: 5.1.2
  • record_android: 1.2.5

Environment

  • OS: Android

Describe the bug

Every time the recorder is disposed, an error is thrown.

RecordConfig(
  encoder: AudioEncoder.flac,
  numChannels: 2,
);

Expected behavior

No error is thrown

Additional context

E/MethodChannel#com.llfbandit.record/messages(11730): Failed to handle method call
E/MethodChannel#com.llfbandit.record/messages(11730): java.lang.IllegalArgumentException: Receiver not registered: com.llfbandit.record.record.bluetooth.BluetoothReceiver@7394f16
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1670)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1873)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:822)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.llfbandit.record.record.bluetooth.BluetoothReceiver.unregister(BluetoothReceiver.kt:74)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.llfbandit.record.methodcall.RecorderWrapper.maybeStopBluetooth(RecorderWrapper.kt:190)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.llfbandit.record.methodcall.RecorderWrapper.dispose(RecorderWrapper.kt:63)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.llfbandit.record.methodcall.MethodCallHandlerImpl.disposeRecorder(MethodCallHandlerImpl.kt:123)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.llfbandit.record.methodcall.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.kt:100)
E/MethodChannel#com.llfbandit.record/messages(11730):   at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#com.llfbandit.record/messages(11730):   at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#com.llfbandit.record/messages(11730):   at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#com.llfbandit.record/messages(11730):   at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.os.Handler.handleCallback(Handler.java:959)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.os.Looper.loopOnce(Looper.java:232)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.os.Looper.loop(Looper.java:317)
E/MethodChannel#com.llfbandit.record/messages(11730):   at android.app.ActivityThread.main(ActivityThread.java:8592)
E/MethodChannel#com.llfbandit.record/messages(11730):   at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/MethodChannel#com.llfbandit.record/messages(11730):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
@intermediatech22
Copy link

Having same issue,

@llfbandit
Copy link
Owner

Fixed in 96240e3

@llfbandit llfbandit added bug Something isn't working Android labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants