-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[device_info] null safety version crashes for apps that opt into null safety #76194
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
Comments
@MaikuB
Used plugin's official repo example. Can you provide more details / steps around how are you seeing the crash ? flutter doctor -v
|
@darshankawar the steps I mentioned were all that I did. Your error looks worse because device_info had already been migrated to null safety (see https://github.com/flutter/plugins/blob/master/packages/device_info/device_info/pubspec.yaml). The error you're seeing generally occurs when looks using a plugin that hasn't been migrated to null safety but the app using it has opted in. Are you sure your copy of the plugins repo is up to date? |
Also noticed you mentioned you updated the plugin's SDK constraints though the steps I mentioned were to update the example's SDK constraints. As the plugin itself has already been migrated to null safety, it doesn't need to have the SDK constraints updated. In my original post, I had posted a link to a fork that can reproduce the problem so that could be cloned and run to see the issue. For convenience, the link is https://github.com/MaikuB/plugins/tree/null_safety_device_info_crash/packages/device_info/device_info. As I'm writing this, it is only one commit ahead of master, where the only change is to update the SDK constraints of the example app for the |
Thanks @MaikuB for the details. I was able to see the crash using your fork above. Verified on Android 8.1.0 device using latest beta. flutter doctor -v
|
@cyanglaz We need to make sure the fix for this is landed/tested before the stable NNBD release. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
device_info
plugin to opt into null safety by changing the SDK constraintsNote: I have fork with these changes that can reproduce the issue at https://github.com/MaikuB/plugins/tree/null_safety_device_info_crash/packages/device_info/device_info. Another observation is that going to the directory of the example app to run the integration test by running the following command
does not indicate failure. In fact, all tests are reported to have passed.
Expected results:
Able to receive info on the device
Actual results:
App crashes, it looks like platform channel is receiving null values from the native side
Logs
The text was updated successfully, but these errors were encountered: