Go router v7 적용후 에러
해결됨
[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
안녕하세요 코드팩토리님 Authentication 마무리하기 강의를 듣는도중 실행해보니 크게 2가지 에러가 발생했습니다ㅠFlutterError.demangleStackTrace 관련 오류와 DioException [bad response]: The request returned an invalid status code of 401: 아래는 에러 전문입니다. await storage.deleteAll을 해볼까 싶다가도 어디에 삽입해야 작동이될지 몰라서 한번 여쭤보겠습니다! Performing hot restart... Syncing files to device iPhone 14 Pro... Restarted application in 467ms. flutter: [REQ] [GET] http://127.0.0.1:3000/user/me/ ======== Exception caught by widgets library ======================================================= The following assertion was thrown building UncontrolledProviderScope: Got a stack frame from package:stack_trace, where a vm or web frame was expected. This can happen if FlutterError.demangleStackTrace was not set in an environment that propagates non-standard stack traces to the framework, such as during tests. 'package:flutter/src/foundation/stack_frame.dart': Failed assertion: line 180 pos 7: 'line != '===== asynchronous gap ==========================='' The relevant error-causing widget was: UncontrolledProviderScope UncontrolledProviderScope:file:///Users/idohyeong/.pub-cache/hosted/pub.dev/flutter_riverpod-2.3.6/lib/src/framework.dart:250:12 When the exception was thrown, this was the stack: #2 StackFrame.fromStackTraceLine (package:flutter/src/foundation/stack_frame.dart:180:7) #3 MappedIterator.moveNext (dart:_internal/iterable.dart:393:20) #4 WhereTypeIterator.moveNext (dart:_internal/iterable.dart:871:20) #5 new GrowableList. ofOther (dart:core-patch/growable_array.dart:202:26) #6 new GrowableList.of (dart:core-patch/growable array.dart:152:26) #7 new List.of (dart:core-patch/array_patch.dart:47:28) #8 Iterable.toList (dart:core/iterable.dart:497:7) #9 StackFrame.fromStackString (package:flutter/src/foundation/stack_frame.dart:82:10) #10 StackFrame.fromStackTrace (package:flutter/src/foundation/stack_frame.dart:68:12) #11 FlutterErrorDetails.debugFillProperties (package:flutter/src/foundation/assertions.dart:714:57) #12 DiagnosticableNode.builder.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:2891:17) #13 DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2894:8) #14 _FlutterErrorDetailsNode.builder (package:flutter/src/foundation/assertions.dart:1290:56) #15 DiagnosticableNode.emptyBodyDescription (package:flutter/src/foundation/diagnostics.dart:2905:77) #16 DiagnosticsNode.toJsonMap.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:1621:13) #17 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1650:6) #18 WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1714:18) #19 WidgetInspectorService._reportStructuredError (package:flutter/src/widgets/widget_inspector.dart:967:44) #20 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1185:14) #21 _reportException (package:flutter/src/widgets/framework.dart:6807:16) #22 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5385:9) #23 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5541:11) #24 Element.rebuild (package:flutter/src/widgets/framework.dart:5092:7) #25 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5358:5) #26 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5532:11) #27 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5352:5) ... Normal element mounting (7 frames) #34 UncontrolledProviderScopeElement.mount (package:flutter riverpod/src/framework.dart:309:11) ... Normal element mounting (35 frames) #69 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4231:16) #70 Element.updateChild (package:flutter/src/widgets/framework.dart:3742:18) #71 RawViewElement. updateChild (package:flutter/src/widgets/view.dart:289:16) #72 _RawViewElement.mount (package:flutter/src/widgets/view.dart:312:5) ... Normal element mounting (7 frames) #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4231:16) #80 Element.updateChild (package:flutter/src/widgets/framework.dart:3742:18) #81 RootElement._rebuild (package:flutter/src/widgets/binding.dart:1299:16) #82 RootElement.mount (package:flutter/src/widgets/binding.dart:1268:5) #83 RootWidget.attach.<anonymous closure> (package:flutter/src/widgets/binding.dart:1221:18) #84 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2733:19) #85 RootWidget.attach (package:flutter/src/widgets/binding.dart:1220:13) #86 WidgetsBinding.attachToBuildOwner (package:flutter/src/widgets/binding.dart:1065:27) #87 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1047:5) #88 WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:1033:7) #92 RawReceivePort. handleMessage (dart:isolate-patch/isolate_patch.dart:184:12) (elided 5 frames from class AssertionError, class Timer, and dart:async-patch) ==================================================================================================== flutter: [ERR] [GET] http://127.0.0.1:3000/user/me/ [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: DioException [bad response]: The request returned an invalid status code of 401. #0 DioMixin.fetch.<anonymous closure> (package:dio/src/dio_mixin.dart:533:7) #1 FutureListener.handleError (dart:async/future impl.dart:177:22) #2 Future._propagateToListeners.handleError (dart:async/future_impl.dart:855:47) #3 Future._propagateToListeners (dart:async/future_impl.dart:876:13) #4 Future._completeError (dart:async/future_impl.dart:652:5) #5 SyncCompleter. completeError (dart:async/future_impl.dart:63:12) #6 Completer.completeError (dart:async/future impl.dart:27:5) #7 Future.any.onError (dart:async/future.dart:618:45) #8 _RootZone.runBinary (dart:async/zone.dart:1666:54) #9 FutureListener.handleError (dart:async/future impl.dart:174:22) #10 Future._propagateToListeners.handleError (dart:async/future_impl.dart:855:47) #11 Future._propagateToListeners (dart:async/future_impl.dart:876:13) <…> ======== Exception caught by widgets library ======================================================= The following assertion was thrown building UncontrolledProviderScope: Got a stack frame from package:stack_trace, where a vm or web frame was expected. This can happen if FlutterError.demangleStackTrace was not set in an environment that propagates non-standard stack traces to the framework, such as during tests. 'package:flutter/src/foundation/stack_frame.dart': Failed assertion: line 180 pos 7: 'line != '===== asynchronous gap ==========================='' The relevant error-causing widget was: ProviderScope ProviderScope:file:///Users/idohyeong/Desktop/authentication_practice/lib/main.dart:11:5 When the exception was thrown, this was the stack: #2 StackFrame.fromStackTraceLine (package:flutter/src/foundation/stack_frame.dart:180:7) #3 MappedIterator.moveNext (dart:_internal/iterable.dart:393:20) #4 WhereTypeIterator.moveNext (dart:_internal/iterable.dart:871:20) #5 new GrowableList. ofOther (dart:core-patch/growable_array.dart:202:26) #6 new GrowableList.of (dart:core-patch/growable array.dart:152:26) #7 new List.of (dart:core-patch/array_patch.dart:47:28) #8 Iterable.toList (dart:core/iterable.dart:497:7) #9 StackFrame.fromStackString (package:flutter/src/foundation/stack_frame.dart:82:10) #10 StackFrame.fromStackTrace (package:flutter/src/foundation/stack_frame.dart:68:12) #11 FlutterErrorDetails.debugFillProperties (package:flutter/src/foundation/assertions.dart:714:57) #12 DiagnosticableNode.builder.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:2891:17) #13 DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2894:8) #14 _FlutterErrorDetailsNode.builder (package:flutter/src/foundation/assertions.dart:1290:56) #15 DiagnosticableNode.emptyBodyDescription (package:flutter/src/foundation/diagnostics.dart:2905:77) #16 DiagnosticsNode.toJsonMap.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:1621:13) #17 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1650:6) #18 WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1714:18) #19 WidgetInspectorService._reportStructuredError (package:flutter/src/widgets/widget_inspector.dart:967:44) #20 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1185:14) #21 _reportException (package:flutter/src/widgets/framework.dart:6807:16) #22 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5385:9) #23 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5541:11) #24 Element.rebuild (package:flutter/src/widgets/framework.dart:5092:7) #25 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5358:5) #26 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5532:11) #27 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5352:5) #28 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4231:16) #29 Element.updateChild (package:flutter/src/widgets/framework.dart:3736:20) #30 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5401:16) #31 Element.rebuild (package:flutter/src/widgets/framework.dart:5092:7) #32 ProxyElement.update (package:flutter/src/widgets/framework.dart:5707:5) #33 Element.updateChild (package:flutter/src/widgets/framework.dart:3720:15) #34 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5401:16) #35 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5541:11) #36 Element.rebuild (package:flutter/src/widgets/framework.dart:5092:7) #37 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2793:19) #38 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:966:21) #39 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5) #40 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1301:15) #41 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1231:9) #42 SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:954:7) #46 RawReceivePort. handleMessage (dart:isolate-patch/isolate_patch.dart:184:12) (elided 5 frames from class AssertionError, class Timer, and dart:async-patch) ====================================================================================================
- flutter
- 하이브리드-앱





