flutterfire
flutterfire copied to clipboard
[Firebase_Database]: <Error: Exception: Unknown event type: DatabaseEventType.value>
Is there an existing issue for this?
- [X] I have searched the existing issues.
Which plugins are affected?
Database
Which platforms are affected?
Web
Description
Just Simple Update with button like this :
FilledButton(
onPressed: () {
FirebaseDatabase.instance.ref().child("Connection/Test").set(false);
},
child: const Text("Check"),
),
Will execute perfectly firstly but make after couple tries will return error like this. I try using async, change set to update but still give this error
Error: Exception: Unknown event type: DatabaseEventType.value
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3 throw_
packages/firebase_database_platform_interface/src/platform_interface/platform_interface_database_event.dart 51:5 eventTypeToString
packages/firebase_database_web/src/database_event_web.dart 15:24 new
packages/firebase_database_web/src/utils/snapshot_utils.dart 13:10 webEventToPlatformEvent
packages/firebase_database_web/src/query_web.dart 130:46 <fn>
dart-sdk/lib/async/stream_pipe.dart 213:31 [_handleData]
dart-sdk/lib/async/stream_pipe.dart 153:5 [_handleData]
dart-sdk/lib/async/zone.dart 1594:9 runUnaryGuarded
dart-sdk/lib/async/stream_impl.dart 339:5 [_sendData]
dart-sdk/lib/async/stream_impl.dart 515:13 perform
dart-sdk/lib/async/stream_impl.dart 620:10 handleNext
dart-sdk/lib/async/stream_impl.dart 591:7 callback
dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7
Reproducing the issue
FilledButton(
onPressed: () {
FirebaseDatabase.instance.ref().child("Connection/Test").set(false);
},
child: const Text("Check"),
),
Firebase Core version
^2.31.0
Flutter Version
3.19.5
Relevant Log Output
No response
Flutter dependencies
Expand Flutter dependencies snippet
dependencies:
animated_check: ^1.0.5
cloud_firestore: ^4.17.3
cupertino_icons: ^1.0.2
dartx: ^1.2.0
dartz: ^0.10.1
firebase_auth: ^4.19.5
firebase_core: ^2.31.0
firebase_database: ^10.5.5
flutter:
sdk: flutter
flutter_speed_dial: ^7.0.0
flutter_web_plugins:
sdk: flutter
flutter_widget_from_html_core: ^0.14.11
freezed_annotation: ^2.4.1
get: ^4.6.6
google_fonts: ^6.1.0
http: ^1.1.0
internet_connection_checker_plus: ^2.3.0
intl: ^0.19.0
json_annotation: ^4.9.0
qr_flutter: ^4.1.0
dev_dependencies:
build_runner: ^2.4.9
flutter_lints: ^3.0.2
flutter_test:
sdk: flutter
freezed: ^2.5.2
json_serializable: ^6.8.0
Additional context and comments
No response
Hello @fahrezahaydar, I've tested your code in my environment, and it didn't cause any issues:
Future<void> _set() async {
await FirebaseDatabase.instance.ref().child('nested/check').set(false);
}
Please share a complete example where this error is occurring, so we can analyze and determine where it might be happening.
I tried run few time. Yeah its worked, but I notice that this error will occur again every i make mistake on other code that pause debug. After solve other code and hot reload/restart, this error will occur in every set/update in my code. I dont know its flutter_web problem or the package. Its suck i must relaunch debug every i make mistake
Can you provide some steps along with the code that causes the issue?
Example for steps to provide:
- Click on the "Set" button.
- Cause a breakpoint to pause the application by clicking the "X" button.
- Click on the "Set" button again.
- The issue occurs.
Hey @fahrezahaydar. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@fahrezahaydar if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.