await _auth.createUserWithEmailAndPassword(email: email, password: password);catch part looks like:catch (e) {
_analytics.logEvent(name: 'signup_error', parameters: {'message': e.toString()});
print(e.toString());
}
Assertion failed: file:///Users/tomas/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.18.0+1/lib/ instead of what my console gives me which I show in the Expected behaviorAssertion failed: file:///Users/tomas/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.18.0+1/lib/src/firebase_auth.dart:184:12
password != null
is not true
Run flutter doctor -v and paste the output below:
Click To Expand
[✓] Flutter (Channel master, 1.22.0-10.0.pre.380, on Mac OS X 10.15.6 19G73 x86_64, locale es-ES)
• Flutter version 1.22.0-10.0.pre.380 at /Users/tomas/Development/flutter
• Framework revision ec40df9576 (3 days ago), 2020-09-25 21:27:22 -0700
• Engine revision 3a73d073c8
• Dart version 2.11.0 (build 2.11.0-161.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/tomas/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.49.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (2 available)
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.121
• No issues found!
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 2.11.0-161.0.dev
Flutter SDK 1.22.0-10.0.pre.380
chefmenu2 1.0.0+1
dependencies:
- cloud_firestore 0.14.0+2 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web]
- cupertino_icons 0.1.3
- firebase_analytics 6.0.0 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface]
- firebase_auth 0.18.0+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter]
- flushbar 1.10.4 [flutter]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_svg 0.18.0 [path_drawing xml vector_math meta flutter]
- google_fonts 1.1.0 [flutter http path_provider crypto pedantic]
- image 2.1.14 [archive xml]
- provider 4.3.1 [flutter nested collection]
- universal_io 0.4.0 [ip meta zone_local]
dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]
transitive dependencies:
- archive 2.0.13 [crypto args path]
- args 1.6.0
- async 2.5.0-nullsafety.1 [collection]
- boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
- characters 1.1.0-nullsafety.3
- charcode 1.2.0-nullsafety.1
- clock 1.1.0-nullsafety.1
- cloud_firestore_platform_interface 2.0.1 [flutter meta collection firebase_core plugin_platform_interface]
- cloud_firestore_web 0.2.0+1 [flutter flutter_web_plugins firebase http_parser meta firebase_core cloud_firestore_platform_interface js]
- collection 1.15.0-nullsafety.3
- convert 2.1.1 [charcode typed_data]
- crypto 2.1.5 [collection convert typed_data]
- fake_async 1.2.0-nullsafety.1 [clock collection]
- file 5.2.1 [intl meta path]
- firebase 7.3.0 [http http_parser js]
- firebase_analytics_platform_interface 1.0.3 [flutter meta]
- firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta]
- firebase_auth_platform_interface 2.0.1 [flutter meta firebase_core plugin_platform_interface]
- firebase_auth_web 0.3.0+1 [flutter flutter_web_plugins firebase meta http_parser intl firebase_core firebase_auth_platform_interface js]
- firebase_core 0.5.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
- firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver]
- firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js]
- fixnum 0.10.11
- flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
- http 0.12.2 [http_parser path pedantic]
- http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
- intl 0.16.1 [path]
- ip 0.1.1 [meta raw]
- js 0.6.2
- matcher 0.12.10-nullsafety.1 [stack_trace]
- meta 1.3.0-nullsafety.3
- nested 0.0.4 [flutter]
- path 1.8.0-nullsafety.1
- path_drawing 0.4.1 [vector_math meta path_parsing flutter]
- path_parsing 0.1.4 [vector_math meta]
- path_provider 1.6.14 [flutter path_provider_platform_interface path_provider_macos path_provider_linux]
- path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 0.0.4+3 [flutter]
- path_provider_platform_interface 1.0.3 [flutter meta platform plugin_platform_interface]
- pedantic 1.9.2 [meta]
- petitparser 3.0.4 [meta]
- platform 2.2.1
- plugin_platform_interface 1.0.2 [meta]
- process 3.0.13 [file intl meta path platform]
- quiver 2.1.3 [matcher meta]
- raw 0.2.0 [collection fixnum matcher meta]
- sky_engine 0.0.99
- source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
- stack_trace 1.10.0-nullsafety.1 [path]
- stream_channel 2.1.0-nullsafety.1 [async]
- string_scanner 1.1.0-nullsafety.1 [charcode source_span]
- term_glyph 1.2.0-nullsafety.1
- test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0-nullsafety.3 [collection]
- vector_math 2.1.0-nullsafety.3
- xdg_directories 0.1.2 [meta path process]
- xml 4.2.0 [collection convert meta petitparser]
- zone_local 0.1.2
Just thinking out loud. Is there a limit to a String?
Yes:
String parameters cannot be longer than 100 characters.
thanks @ghost23 Is there a workaround? Or how am I supposed to get the error message in the analytics that is bigger than 100 characters?
As far as I know, there is no workaround, because firebase is limiting this on their server-end.
Since you want to log error messages, perhaps using crashlytics for that instead might be the way to go.
Thanks @ghost23 I was thinking of crashlytics but this is not an app error rather it's what errors users make in my case. So, rather than tracking app errors I want to track user experience errors which doesn't sound like Crashlytics would be a good way to do it IMO.
I see. Well, I told you everything I know, so ... good luck 😁
Hi @tomasbaran
Looks like this is not supproted from Firebase itself so flutterfire can't do anything about this limit. TYSM @ghost23
Closing, as this isn't an issue with flutterfire itself. If you disagree, please write in the comments and I will reopen it.
Thank you