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

Null check operator used on a null value. Error thrown null. #305

Closed
alex-sandri opened this issue Nov 19, 2022 · 6 comments
Closed

Null check operator used on a null value. Error thrown null. #305

alex-sandri opened this issue Nov 19, 2022 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@alex-sandri
Copy link

Describe the bug
A null check operator error is thrown and I am not able to understand how this can be reproduced.

To Reproduce
I could not reproduce this issue.

Smartphone (please complete the following information):

  • Device: OnePlus6T
  • OS: Android 11

Additional context
Crashlytics report:

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown null.
       at State.context(framework.dart:942)
       at _OverlayBuilderState.addToOverlay(layout_overlays.dart:172)
       at _OverlayBuilderState.showOverlay(layout_overlays.dart:164)
       at _OverlayBuilderState.initState.<fn>(layout_overlays.dart:129)
       at SchedulerBinding._invokeFrameCallback(binding.dart:1175)
       at SchedulerBinding.handleDrawFrame(binding.dart:1113)
       at SchedulerBinding._handleDrawFrame(binding.dart:1015)
@ujas-m-simformsolutions
Copy link
Contributor

ujas-m-simformsolutions commented Dec 1, 2022

@alex-sandri Can this screen be directly opened from something like notification or a deep link?

@alex-sandri
Copy link
Author

@ujas-m-simformsolutions Yes, this screen can be opened from a notification but I don't think this was the case as that would have caused another navigation event in the app that I don't see from the Firebase Analytics logs.

@ujas-m-simformsolutions ujas-m-simformsolutions added help wanted Extra attention is needed and removed Waiting for Reply labels Dec 1, 2022
@ujas-m-simformsolutions
Copy link
Contributor

From looks of it, I think you are starting the showcase in the initState where it is not guaranteed to have access to the context. If this is case then use addPostFrameCallback function to skip a frame so that you have access to the context

@alex-sandri
Copy link
Author

@ujas-m-simformsolutions Unfortunately this is not the case as all startShowCase() calls happen well after the app has initialized and all the UI has been rendered. If it may help you I can put together a minimal app sample using the same logic but with unnecessary stuff removed.

@ujas-m-simformsolutions
Copy link
Contributor

@alex-sandri Yes please share minimal reproducible code.

@alex-sandri
Copy link
Author

@ujas-m-simformsolutions I'm so sorry it took so long for me to get back to you but I've been busy and so I couldn't put together a minimal app sample for you to test with. I just noticed a new issue (#313) and that seems to be related to this one and it already has a fix. So I'm closing this for now and will reopen in the future if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants