Skip to content
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

[Firebase_Database]: <Error: Exception: Unknown event type: DatabaseEventType.value> #12759

Open
1 task done
fahrezahaydar opened this issue May 9, 2024 · 4 comments
Open
1 task done
Assignees
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. platform: web Issues / PRs which are specifically for web. plugin: database Stale Issue with no recent activity type: bug Something isn't working

Comments

@fahrezahaydar
Copy link

Is there an existing issue for this?

  • 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

@fahrezahaydar fahrezahaydar added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels May 9, 2024
@TarekkMA TarekkMA added plugin: database platform: web Issues / PRs which are specifically for web. and removed Needs Attention This issue needs maintainer attention. labels May 9, 2024
@TarekkMA
Copy link
Contributor

TarekkMA commented May 9, 2024

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.

@TarekkMA TarekkMA added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label May 9, 2024
@fahrezahaydar
Copy link
Author

fahrezahaydar commented May 9, 2024

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

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels May 9, 2024
@TarekkMA
Copy link
Contributor

TarekkMA commented May 9, 2024

Can you provide some steps along with the code that causes the issue?

Example for steps to provide:

  1. Click on the "Set" button.
  2. Cause a breakpoint to pause the application by clicking the "X" button.
  3. Click on the "Set" button again.
  4. The issue occurs.

@TarekkMA TarekkMA added blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. and removed Needs Attention This issue needs maintainer attention. labels May 9, 2024
@TarekkMA TarekkMA self-assigned this May 10, 2024
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label May 20, 2024
@google-oss-bot
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. Needs Attention This issue needs maintainer attention. platform: web Issues / PRs which are specifically for web. plugin: database Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants