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

When using fluro, No StoreProvider<AppState> found. #41

Closed
etby opened this Issue Apr 27, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@etby
Copy link

etby commented Apr 27, 2018

Error creating widget with fluro:

I/flutter ( 6397): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 6397): The following StoreProviderError was thrown building StoreConnector<AppState,
I/flutter ( 6397): BangumiListState>(dirty):
I/flutter ( 6397): Error: No StoreProvider found. To fix, please try:
I/flutter ( 6397):
I/flutter ( 6397): * Using Dart 2 (required) by using the --preview-dart-2 flag
I/flutter ( 6397): * Wrapping your MaterialApp with the StoreProvider, rather than an individual Route
I/flutter ( 6397): * Providing full type information to your Store, StoreProvider and
I/flutter ( 6397): StoreConnector<State, ViewModel>
I/flutter ( 6397):
I/flutter ( 6397): If none of these solutions work, please file a bug at:
I/flutter ( 6397): https://github.com/brianegan/flutter_redux/issues/new
I/flutter ( 6397):
I/flutter ( 6397): When the exception was thrown, this was the stack:
I/flutter ( 6397): #0 StoreProvider.of (package:flutter_redux/flutter_redux.dart:29:27)
I/flutter ( 6397): #1 StoreConnector.build (package:flutter_redux/flutter_redux.dart:184:28)
I/flutter ( 6397): #2 StatelessElement.build (package:flutter/src/widgets/framework.dart:3687:28)
I/flutter ( 6397): #3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3634:15)
I/flutter ( 6397): #4 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #5 StatelessElement.update (package:flutter/src/widgets/framework.dart:3694:5)
I/flutter ( 6397): #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #8 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #9 StatelessElement.update (package:flutter/src/widgets/framework.dart:3694:5)
I/flutter ( 6397): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #13 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #14 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #15 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4371:32)
I/flutter ( 6397): #16 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4761:17)
I/flutter ( 6397): #17 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #18 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #19 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #20 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #21 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #22 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #23 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #24 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #25 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #26 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4371:32)
I/flutter ( 6397): #27 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4761:17)
I/flutter ( 6397): #28 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #29 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #30 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #31 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #32 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #33 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #34 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #35 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #36 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #37 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #38 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #39 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #40 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #41 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #42 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #43 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #44 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #45 StatelessElement.update (package:flutter/src/widgets/framework.dart:3694:5)
I/flutter ( 6397): #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #47 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #48 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #49 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #50 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #51 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #52 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #53 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #54 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #55 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #56 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #57 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #58 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #59 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #60 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #62 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #63 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #64 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #66 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #67 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #68 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #69 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #70 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #71 StatelessElement.update (package:flutter/src/widgets/framework.dart:3694:5)
I/flutter ( 6397): #72 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #73 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #74 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #75 StatelessElement.update (package:flutter/src/widgets/framework.dart:3694:5)
I/flutter ( 6397): #76 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #77 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #78 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #79 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #81 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #82 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #83 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #84 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #85 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #86 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #88 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #89 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #90 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #91 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #92 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #93 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #94 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #95 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #96 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #97 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #98 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #99 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #100 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #101 StatefulElement.update (package:flutter/src/widgets/framework.dart:3791:5)
I/flutter ( 6397): #102 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #103 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #104 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #105 StatelessElement.update (package:flutter/src/widgets/framework.dart:3694:5)
I/flutter ( 6397): #106 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #107 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:14)
I/flutter ( 6397): #108 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #109 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #110 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #111 ProxyElement.update (package:flutter/src/widgets/framework.dart:3901:5)
I/flutter ( 6397): #112 Element.updateChild (package:flutter/src/widgets/framework.dart:2691:15)
I/flutter ( 6397): #113 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3645:16)
I/flutter ( 6397): #114 Element.rebuild (package:flutter/src/widgets/framework.dart:3487:5)
I/flutter ( 6397): #115 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2234:33)
I/flutter ( 6397): #116 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:626:20)
I/flutter ( 6397): #117 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 6397): #118 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 6397): #119 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 6397): #120 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:751:7)
I/flutter ( 6397): #122 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
I/flutter ( 6397): #123 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
I/flutter ( 6397): #124 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
I/flutter ( 6397): (elided one frame from package dart:async)
I/flutter ( 6397): ════════════════════════════════════════════════════════════════════════════════════════════════════

class MyApp extends StatelessWidget {
  final Store<AppState> _store = new Store<AppState>(appReducer);

  @override
  Widget build(BuildContext context) {
    return new StoreProvider<AppState>(
      store: _store,
      child: new MaterialApp(
        theme: new ThemeData(
          primarySwatch: Colors.blue,
          scaffoldBackgroundColor: Colors.white,
        ),
        onGenerateRoute: initRouterGenerator(),
      ),
    );
  }
}

image

@brianegan

This comment has been minimized.

Copy link
Owner

brianegan commented Apr 27, 2018

Thanks for the report! A couple questions:

  1. Does the StoreConnector work when you aren't working with Fluro? Fluro shouldn't be doing anything special, but I'll have to double-check
  2. Do you have a bit more code you can show or a perhaps a small test case?
@etby

This comment has been minimized.

Copy link
Author

etby commented May 2, 2018

Not used fluro is same mistake.

The Code is
https://github.com/etby/BangumiList/tree/flutter_redux_error

@brianegan

This comment has been minimized.

Copy link
Owner

brianegan commented May 2, 2018

Thanks for providing that sample! I've pushed up a fix to the problem with a short explanation here: https://github.com/etby/BangumiList/pulls

Please let me know if I can be of further help!

@brianegan brianegan closed this May 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment