-
Notifications
You must be signed in to change notification settings - Fork 209
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
Generating files on github actions yields Null check operator used on a null value error (works locally) #3125
Comments
You probably don't have your |
Hi thanks for the reply. I never checked in my |
That is what I am saying. That can lead to CI using newer dependencies than you are using locally. |
Thank you. I'm able to reproduce it locally. This is quite strange because my pubspec.yaml use an exact versioning. For example Do you know what caused the error? Thanks |
No, one of the transitive dependencies causes this since they are not locked. You should diff you |
Okay then. Thanks for the tip. But I think I'll still keep this issue opened because the error is happened on build_runner. |
@kuhnroyal it looks like you are hitting an unexpected variant somehow where a package exists as a dependency (maybe of one of your transitive deps), but it does not appear in your I would need more information to know exactly how this is happening... |
If you could try debugging your build script that might help, you can use these instructions https://github.com/dart-lang/build/blob/master/docs/builder_author_faq.md#how-can-i-debug-my-builder. Specifically it would be helpful to know exactly what package it is trying to look up when this fails - you can configure your debugger to stop on caught and uncaught exceptions and then see what the value of
|
The problem is, on fresh install (either on CI or running flutter pub upgrade locally) removes connectivity dependency. This problem only surfaces on flutter 2.2.0. I didn't find this bug on flutter 2.0.6. So the solution is by adding Now, both locally and in github CI, |
Well, then one of your dependencies that you recently updated probably doesn't have |
My flutter app doesn't use connectivity at all. And the error only happens when generating / running build_runner. It run fine on debug run. And the only thing I changed to break it is by upgrading from flutter 2.0.6 to 2.2.0. Reverting back to 2.0.6 works immediately. |
I am not sure how to proceed here, but just for a bit more information on my end looking at the code, it appears that what must be happening is that some package has a dependency which exists as a dependency in its If I could have the full logs from the github actions run that might help - specifically from the |
Closing this as stale for now |
Script which yields the error
Confusingly the error only happened on github action CI and not local, even though I use the exact same script on both local and remote.
Error Log
Log
Github action
Github action.yaml
To give some perspective, here's my folder structure:
Folder structure
My pubspec.yaml
pubspec.yaml
The text was updated successfully, but these errors were encountered: