Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Unhandled exception during toggle on Android #191

Closed
Karmalakas opened this issue Feb 8, 2023 · 1 comment
Closed

Unhandled exception during toggle on Android #191

Karmalakas opened this issue Feb 8, 2023 · 1 comment

Comments

@Karmalakas
Copy link

Just with the code sample from examples page, when trying to toggle, I get

E/flutter (23302): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
E/flutter (23302): #0      WakelockApi.toggle (package:wakelock_platform_interface/messages.dart:89:7)
E/flutter (23302): <asynchronous suspension>
E/flutter (23302): #1      MethodChannelWakelock.toggle (package:wakelock_platform_interface/method_channel_wakelock.dart:20:5)
E/flutter (23302): <asynchronous suspension>

Tried both Wakelock.disable() and Wakelock.toggle(on: false)

@Karmalakas
Copy link
Author

OK, so I noticed this happening with some other plugins and completely restarting the build solved issue. I gave another try for wakelock package and it also worked. Closing this issue

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

No branches or pull requests

1 participant