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

Configure offline persistence #11

Open
sparkmobi opened this issue Apr 8, 2020 · 5 comments
Open

Configure offline persistence #11

sparkmobi opened this issue Apr 8, 2020 · 5 comments

Comments

@sparkmobi
Copy link

Hello,

i have tried to use the app without internet and it crashed while by using cloud firestore the app should run without any problem link it is connected?

@bizz84
Copy link
Owner

bizz84 commented Apr 11, 2020

Can you post a stack trace of the error? It would help to see where the error happens and how to fix it.

@sparkmobi
Copy link
Author

sparkmobi commented Apr 11, 2020

@bizz84 you need to use the app while you are offline (after logged in)

E/flutter (17962): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. E/flutter (17962): At this point the state of the widget's element tree is no longer stable. E/flutter (17962): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method. E/flutter (17962): #0 Element._debugCheckStateIsActiveForAncestorLookup.<anonymous closure> (package:flutter/src/widgets/framework.dart:3508:9) E/flutter (17962): #1 Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:3522:6) E/flutter (17962): #2 Element.findAncestorStateOfType (package:flutter/src/widgets/framework.dart:3641:12) E/flutter (17962): #3 Navigator.of (package:flutter/src/widgets/navigator.dart:1492:19) E/flutter (17962): #4 _EntryPageState._setEntryAndDismiss (package:starter_architecture_flutter_firebase/app/home/job_entries/entry_page.dart:71:17) E/flutter (17962): <asynchronous suspension> E/flutter (17962): #5 _EntryPageState.build.<anonymous closure> (package:starter_architecture_flutter_firebase/app/home/job_entries/entry_page.dart:92:30) E/flutter (17962): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) E/flutter (17962): #7 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:789:36) E/flutter (17962): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (17962): #9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) E/flutter (17962): #10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) E/flutter (17962): #11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) E/flutter (17962): #12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) E/flutter (17962): #13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) E/flutter (17962): #14 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:117:9) E/flutter (17962): #15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) E/flutter (17962): #16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) E/flutter (17962): #17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) E/flutter (17962): #18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) E/flutter (17962): #19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter (17962): #20 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter (17962): #21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter (17962): #22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter (17962): #23 _rootRunUnary (dart:async/zone.dart:1138:13) E/flutter (17962): #24 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (17962): #25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) E/flutter (17962): #26 _invoke1 (dart:ui/hooks.dart:273:10) E/flutter (17962): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5) E/flutter (17962): E/flutter (17962): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. E/flutter (17962): At this point the state of the widget's element tree is no longer stable. E/flutter (17962): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method. E/flutter (17962): #0 Element._debugCheckStateIsActiveForAncestorLookup.<anonymous closure> (package:flutter/src/widgets/framework.dart:3508:9) E/flutter (17962): #1 Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:3522:6) E/flutter (17962): #2 Element.findAncestorStateOfType (package:flutter/src/widgets/framework.dart:3641:12) E/flutter (17962): #3 Navigator.of (package:flutter/src/widgets/navigator.dart:1492:19) E/flutter (17962): #4 _EntryPageState._setEntryAndDismiss (package:starter_architecture_flutter_firebase/app/home/job_entries/entry_page.dart:71:17) E/flutter (17962): <asynchronous suspension> E/flutter (17962): #5 _EntryPageState.build.<anonymous closure> (package:starter_architecture_flutter_firebase/app/home/job_entries/entry_page.dart:92:30) E/flutter (17962): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) E/flutter (17962): #7 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:789:36) E/flutter (17962): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (17962): #9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) E/flutter (17962): #10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) E/flutter (17962): #11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) E/flutter (17962): #12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) E/flutter (17962): #13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) E/flutter (17962): #14 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:117:9) E/flutter (17962): #15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) E/flutter (17962): #16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) E/flutter (17962): #17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) E/flutter (17962): #18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) E/flutter (17962): #19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter (17962): #20 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter (17962): #21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter (17962): #22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter (17962): #23 _rootRunUnary (dart:async/zone.dart:1138:13) E/flutter (17962): #24 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (17962): #25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) E/flutter (17962): #26 _invoke1 (dart:ui/hooks.dart:273:10) E/flutter (17962): #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5) E/flutter (17962):

@bizz84
Copy link
Owner

bizz84 commented Apr 13, 2020

@sparkmobi I need to spend a bit more time testing the app in offline mode. I'll report back here once I've done that.

@sparkmobi
Copy link
Author

@bizz84 take your time, please update your udemy course with this update once you finish it.

@bgervan
Copy link

bgervan commented Mar 25, 2021

@bizz84 Is there any update? Have you checked the offline persistence?

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

3 participants