-
Notifications
You must be signed in to change notification settings - Fork 458
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
This widget has been unmounted, so the State no longer has a context #313
Comments
Hello, i'm having the same issue, when hot reloading a page with a showcase widget. not even calling the postframecallback yet. This widget has been unmounted, so the State no longer has a context (and should be considered defunct). is there any work-around? thank you. |
showcaseview:
git:
url: https://github.com/kirill-21/flutter_showcaseview
ref: master Just use this version of package until fix is merged into this repo |
Hi @kirill-21, Thanks for pointing out the issue. Can you please share the reproducible code as I am not able to reproduce it? |
You can just approve this #333 pull request, i already fixed this problem there |
@kirill-21 Unfortunately, we can not merge PR until we can reproduce it. Please share the reproducible code so we can check the root cause. |
@kirill-21 Could you please use the latest version of showcaseview? I guess it will fix your concern. Thank you!! |
My issue can only be fixed after this changes: https://github.com/kirill-21/flutter_showcaseview/commit/152c484318f29b3ea890b65af6fa6157fe857c19, official branch works with errors |
Okay, so could you please share the code snippet which produces these errors? It would be helpful for us to find the root cause. |
No, this issue is being automatically reported to apps server as an unhandled exception, many users face this error, but I have no idea how to reproduce it, so I fixed it on my own branch and am using it right now to avoid errors, fix is simple and does not do anything bad, you can implement it within a minute |
I think the error suggest that somehow Showcase is trying to show tooltip and at same time that screen is closed so |
I am not even using a Showcase widget. I come back from an async task that writes to a secured storage. After the |
Are we still waiting to reproduce this bug - or have you found a way to reproduce it ? I have a piece of code that may bring up the error. |
This invalid-context bug can be reproduced by introducing a deliberate flaw in our workflow: We have a button handler that calls an async method; but it pops the context without waiting for the method to return:
Note 1: If the context is invalid, we are not able to perform the check |
Hey @kirill-21, due to not being able to reproduce this issue, I am closing it along with your PR for the same. If you face this issue again then please feel free to re open along with reproducible code. |
Lol, i LITERALLY made pull request with a fix for that.... 2 times... Why can't you just merge it? I showed you the place and fixed it
|
We totally appreciate your contribution, but we have to know the underlying issue and how to reproduce it before merging a fix for it. If you can provide a reproducible code then we would be happy to check and accept your contribution. |
I guess you just never used this package before because issue is reproducible within a few seconds after just testing this inside a real project |
Could you try my suggestion above please?
|
[DartError] This widget has been unmounted, so the State no longer has a context (and should be considered defunct).Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active.;
#0 State.context. (package:flutter/src/widgets/framework.dart:935:9)
#1 State.context (package:flutter/src/widgets/framework.dart:941:6)
#2 _OverlayBuilderState.addToOverlay (package:showcaseview/src/layout_overlays.dart:172:47)
#3 _OverlayBuilderState.showOverlay (package:showcaseview/src/layout_overlays.dart:164:7)
#4 _OverlayBuilderState.syncWidgetAndOverlay (package:showcaseview/src/layout_overlays.dart:195:7)
#5 _OverlayBuilderState.reassemble. (package:showcaseview/src/layout_overlays.dart:144:39)
#6 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1175:15)
#7 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:9)
#8 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:881:7)
#9 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
#10 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#11 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
Happens when you try switching between screens very fast and ShowCaseWidget.of(context).startShowCase doesn't have time to start showing the showcase
The text was updated successfully, but these errors were encountered: