-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Bug]: gyroscope/accelerometer "channel sent a message from native to Flutter on a non-platform thread" #2315
Comments
Here are a number of issues recently reported that appear to be related. Debugging -my- problem shows this to be pretty far down the stack and not in application code. Adding the recommended dispatch_asynch around all "eventSink{" calls results in 26 Dart appendages 12 js appendages. So, my question: are these issues related? Many people seem to be hitting it based on the comments. I really don't think this issue is at the application development layer, but I can always be educated if it is. TIA. firebase/flutterfire#11667 |
Thanks for reporting the issue with so many details. Appreciate it. For those seeing this issue check out #2342 for a discussion of the problem. |
Closing as was resolved with #2248 Will release 4.0.1 (4.0.0 was previously retracted from pub.dev, so to avoid conflicts will have to do 4.0.1 this time) version of |
The problem still exists on version 4.0.2 - iphone 13 Promax |
If you still have this problem you need to open a new issue and report it properly with all the required details. |
Platform
iOS 17.0.3
Plugin
sensors_plus
Version
3.1.0
Flutter SDK
3.16.0-0.3.pre
Steps to reproduce
The call to DeviceSensors() below to instantiate accelSub and gyroSub throws the channel error in the title.
"[VERBOSE-2:shell.cc(1004)] 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."
"[VERBOSE-2:shell.cc(1004)] 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."
accelSub = accelerometerEvents.listen(processAccel);
gyroSub = gyroscopeEvents.listen(processGyro);
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: