wakelock_plus icon indicating copy to clipboard operation
wakelock_plus copied to clipboard

Uncaught Web Exception

Open corepuncher opened this issue 10 months ago • 1 comments

For web build (in debug) I encountered the following uncaught exception:

NotAllowedError, Failed to execute 'request' on 'WakeLock': The requesting page is not visible

In the stack, this code gets highlighted:

  @override
  Future<void> toggle({required bool enable}) async {
    // Make sure the JS library is loaded before calling it.
    await _jsLoaded;

    wakelock_plus_web.toggle(enable);
  }

corepuncher avatar Apr 02 '24 01:04 corepuncher