riverpod icon indicating copy to clipboard operation
riverpod copied to clipboard

stackoverflow example throws an exception on web

Open 1l0 opened this issue 1 year ago • 0 comments

Describe the bug

When I take a look at the stackoverflow example to run it for the web Flutter throws the error. Am I missing something? I did flutter pub get and dart run build_runner build. flutter run -d macos seems to be working expectedly. Screenshot 2022-09-15 at 18 14 12

% flutter --version
Flutter 3.3.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ffccd96b62 (2 weeks ago) • 2022-08-29 17:28:57 -0700
Engine • revision 5e9e0e0aa8
Tools • Dart 2.18.0 • DevTools 2.15.0
% pwd
/Users/rs/Code/src/github.com/rrousselGit/riverpod/examples/stackoverflow
% flutter run -d chrome    
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...             10.1s
This app is linked to the debug service: ws://127.0.0.1:62668/4V8_NE_Rrwg=/ws
Debug service listening on ws://127.0.0.1:62668/4V8_NE_Rrwg=/ws

💪 Running with sound null safety 💪

🔥  To hot restart changes while running, press "r" or "R".
For a more detailed help message, press "h". To quit, press "q".

An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:62668/4V8_NE_Rrwg=
Flutter Web Bootstrap: Programmatic
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following JSRangeError was thrown building HookConsumer(dirty, dependencies:
[UncontrolledProviderScope], state: _ConsumerState#38570):
Invalid argument: Maximum call stack size exceeded

The relevant error-causing widget was:
  HookConsumer
  HookConsumer:file:///Users/rs/Code/src/github.com/rrousselGit/riverpod/examples/stackoverflow/lib/home.dart:17:13

When the exception was thrown, this was the stack:
packages/riverpod/src/framework/auto_dispose.dart 7:24                     <computed>
packages/riverpod/src/provider/base.dart 259:27                            __
...
omitted lines due to GitHub complained that it's too long
...
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19    internalCallback

════════════════════════════════════════════════════════════════════════════════════════════════════


To Reproduce

clone https://github.com/rrousselGit/riverpod
cd riverpod/examples/stackoverflow
flutter pub get
dart run build_runner build
flutter run -d chrome

Expected behavior

No errors.

1l0 avatar Sep 15 '22 09:09 1l0