Skip to content

Exception thrown when logging out #19

@elmcrest

Description

@elmcrest

Hey,

first of all thx for this great Scaffold for a flutter app.

I've noticed an issue though, when using the App just after git cloning it... If I hit logout it get the following exception on the console:

flutter: no-action
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown while finalizing the widget tree:
flutter: setState() or markNeedsBuild() called when widget tree was locked.
flutter: This _ModalScope<dynamic> widget cannot be marked as needing to build because the framework is
flutter: locked.
flutter: The widget on which setState() or markNeedsBuild() was called was:
flutter:   _ModalScope<dynamic>-[LabeledGlobalKey<_ModalScopeState<dynamic>>#2de24](state:
flutter:   _ModalScopeState<dynamic>#e79f0)
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0      Element.markNeedsBuild.<anonymous closure> 
flutter: #1      Element.markNeedsBuild 
flutter: #2      State.setState 
flutter: #3      _ModalScopeState._routeSetState 
flutter: #4      ModalRoute.setState 
flutter: #5      ModalRoute.changedInternalState 
flutter: #6      _ModalRoute&TransitionRoute&LocalHistoryRoute.removeLocalHistoryEntry 
flutter: #7      LocalHistoryEntry.remove 
flutter: #8      DrawerControllerState.dispose 
flutter: #9      StatefulElement.unmount 
flutter: #10     _InactiveElements._unmount 
flutter: #11     _InactiveElements._unmount.<anonymous closure> 
flutter: #12     ComponentElement.visitChildren 
flutter: #13     _InactiveElements._unmount 
flutter: #14     _InactiveElements._unmount.<anonymous closure> 
flutter: #15     ComponentElement.visitChildren 
flutter: #16     _InactiveElements._unmount 
flutter: #17     _InactiveElements._unmount.<anonymous closure> 
flutter: #18     MultiChildRenderObjectElement.visitChildren 
flutter: #19     _InactiveElements._unmount 
flutter: #20     _InactiveElements._unmount.<anonymous closure> 
flutter: #21     ComponentElement.visitChildren 
flutter: #22     _InactiveElements._unmount 
flutter: #23     _InactiveElements._unmount.<anonymous closure> 
flutter: #24     ComponentElement.visitChildren 
flutter: #25     _InactiveElements._unmount 
flutter: #26     _InactiveElements._unmount.<anonymous closure> 
flutter: #27     ComponentElement.visitChildren 
flutter: #28     _InactiveElements._unmount 
flutter: #29     _InactiveElements._unmount.<anonymous closure> 
flutter: #30     SingleChildRenderObjectElement.visitChildren 
flutter: #31     _InactiveElements._unmount 
flutter: #32     _InactiveElements._unmount.<anonymous closure> 
flutter: #33     ComponentElement.visitChildren 
flutter: #34     _InactiveElements._unmount 
flutter: #35     _InactiveElements._unmount.<anonymous closure> 
flutter: #36     SingleChildRenderObjectElement.visitChildren 
flutter: #37     _InactiveElements._unmount 
flutter: #38     _InactiveElements._unmount.<anonymous closure> 
flutter: #39     ComponentElement.visitChildren 
flutter: #40     _InactiveElements._unmount 
flutter: #41     _InactiveElements._unmount.<anonymous closure> 
flutter: #42     ComponentElement.visitChildren 
flutter: #43     _InactiveElements._unmount 
flutter: #44     _InactiveElements._unmount.<anonymous closure> 
flutter: #45     ComponentElement.visitChildren 
flutter: #46     _InactiveElements._unmount 
flutter: #47     _InactiveElements._unmount.<anonymous closure> 
flutter: #48     ComponentElement.visitChildren 
flutter: #49     _InactiveElements._unmount 
flutter: #50     _InactiveElements._unmount.<anonymous closure> 
flutter: #51     ComponentElement.visitChildren 
flutter: #52     _InactiveElements._unmount 
flutter: #53     _InactiveElements._unmount.<anonymous closure> 
flutter: #54     ComponentElement.visitChildren 
flutter: #55     _InactiveElements._unmount 
flutter: #56     ListIterable.forEach (dart:_internal/iterable.dart:39:13)
flutter: #57     _InactiveElements._unmountAll 
flutter: #58     BuildOwner.finalizeTree.<anonymous closure> 
flutter: #59     BuildOwner.lockState 
flutter: #60     BuildOwner.finalizeTree 
flutter: #61     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame 
flutter: #62     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback 
flutter: #63     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback 
flutter: #64     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame 
flutter: #65     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame 
flutter: #69     _invoke (dart:ui/hooks.dart:209:10)
flutter: #70     _drawFrame (dart:ui/hooks.dart:168:3)
flutter: (elided 3 frames from package dart:async)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3485 pos 12: '_debugLifecycleState != _ElementLifecycle.defunct': is not true.
flutter: Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3485 pos 12: '_debugLifecycleState != _ElementLifecycle.defunct': is not true.

those last two lines repeat several more times.

Any Ideas?

From the UI perspective it seems that there isn't any issue at all.

let me know if I could further help tackling this...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions