Closed wjmetcalfiiii closed 10 months ago
I upgraded to Flutter version 3.13.9 on channel stable and still have the same problem.
Just tried to reproduce the issue and it seems it reproduces on 3.16.0 and 3.13.x versions, while everything is Ok on 3.10.x versions. But what is interesting is that despite errors in console I see that example app works Ok and shows values from sensors anyway.
I will work on a fix for this issue and in the meantime can suggest to those struggling with this problem to use older Flutter version.
In fact I see that thanks for this line in of open PRs the issue is resolved thanks to a contributor taking care of threading requirements.
Closed via #2248
Will be released as sensors_plus 4.0.1
in the following days after documentation for the package is also updated.
Platform
iOS 17.0.3
Plugin
sensors_plus
Version
3.1.0
Flutter SDK
3.16.0-0.3.pre
Steps to reproduce
The sensors_plus 3.1.0 example located at https://pub.dev/packages/sensors_plus/example
produces the same error seen in https://github.com/fluttercommunity/plus_plugins/issues/2315
though this time all of the sensors are throwing this error instead of just two in #2315
Syncing files to device William’s iPhone... [ERROR:flutter/shell/common/shell.cc(1015)] The 'dev.fluttercommunity.plus/sensors/user_accel' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel. See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1015)] The 'dev.fluttercommunity.plus/sensors/accelerometer' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel. See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1015)] The 'dev.fluttercommunity.plus/sensors/gyroscope' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel. See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1015)] The 'dev.fluttercommunity.plus/sensors/magnetometer' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel. See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean