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

Uncaught Web Exception #38

Open
corepuncher opened this issue Apr 2, 2024 · 1 comment
Open

Uncaught Web Exception #38

corepuncher opened this issue Apr 2, 2024 · 1 comment

Comments

@corepuncher
Copy link

corepuncher commented Apr 2, 2024

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);
  }
@diegotori
Copy link
Collaborator

@corepuncher please clean up the example code with the correct formatting.

Thanks.

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

No branches or pull requests

2 participants