Is there an existing issue for this?
Which plugins are affected?
Database
Which platforms are affected?
iOS
Description
Hello! This was fixed in #11628. I opened that 2 years ago but It appeared again.
While using firebase_database on iOS 26 (Xcode26) on runTransaction on real time database I'm getting this warning in console:
[VERBOSE-2:shell.cc(1004)] The 'plugins.flutter.io/firebase_database' 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.
Reproducing the issue
Steps to reproduce the behaviour:
Add the latest pub firebase_database
firebase_database: ^12.1.1
Run a simple transaction request to the firebase database
final dbRef = FirebaseDatabase.instance.ref();
updateAnalytics() {
dbRef
.child("analytics")
.child("number")
.runTransaction((Object? oldValue) {
if (oldValue == null) {
return Transaction.success(1);
}
int _newValue = (oldValue as int? ?? 0) + 1;
return Transaction.success(_newValue);
});
}
Firebase Core version
^4.3.0
Flutter Version
3.38.5
Relevant Log Output
[ERROR:flutter/shell/common/shell.cc(1178)] The 'dev.flutter.pigeon.firebase_database_platform_interface.FirebaseDatabaseFlutterApi.callTransactionHandler' 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.
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
Hello! This was fixed in #11628. I opened that 2 years ago but It appeared again.