Repository navigation
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
… and iOS On Android the realtime listener called EventSink.error from the SDK's background executor. FlutterJNI throws off the main thread, so the error never reached Dart and the exception was swallowed by the SDK's task continuation. Post it to the main thread, as onUpdate already does. On iOS the error was only printed. Forward it to the stream as a FlutterError with the same code as Android, matching web, which already adds realtime errors to the stream.
…n with stable codes onConfigUpdated now reports realtime connection errors on Android and iOS; listen with onError. An error with no handler is reported as uncaught, which Crashlytics records as a fatal crash. The stream stays open after an error, and the SDKs keep retrying, so the same error can be reported again. Every platform now delivers these errors as FirebaseException(plugin: 'firebase_remote_config') with one of these codes: config-update-stream-error, config-update-message-invalid, config-update-not-fetched, config-update-unavailable or unknown. Before, Android and iOS sent a PlatformException with no details, which lost the native code, and web sent the raw JS FirebaseError. - Android and iOS put the code and message in the error details, and the method channel stream converts them with the package's existing convertPlatformException. - On iOS, the update error domain is checked first. Its codes overlap with RemoteConfigError (notFetched and throttled are both 8002). A failed fetch of an announced update keeps the codes fetch uses. - On web, onConfigUpdated goes through convertWebExceptions, which now maps the JS SDK's realtime codes to the same names. The onConfigUpdated dartdoc lists the codes. The docs snippet and the example now pass onError.
a836e4b to
89accf0
Compare
Description
Realtime errors never reached
onConfigUpdatedlisteners on Android or iOS. Now every platform delivers them as aFirebaseExceptionwith a stable code.FirebaseExceptions.Codes:
config-update-stream-error,config-update-message-invalid,config-update-not-fetched,config-update-unavailableandunknown. The stream stays open after an error.Tests
method_channel_firebase_remote_config_test.dart): the stream emits aFirebaseExceptionfor each code, stays open after an error, and reports an error without details asunknown.internals_test.dart): the JS SDK's realtime codes map to the codes above.FirebaseRemoteConfigPluginTest):onError_isForwardedToDartOnTheMainThreadfails onmain. Other tests check every code, the HTTP status in the message, and the listeneronListenregisters.Related Issues
May explain part of #17898.
Checklist
///).melos run analyze) does not report any problems on my PR.Breaking Change
Apps that listen without
onErrorwill now see realtime errors as uncaught errors on Android and iOS, as web already did. On web, these errors are nowFirebaseExceptions instead of raw JS objects.