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_auth] NSInvalidArgumentException - One of IDToken, accessToken, pendingToken, or requestURI must be supplied. #10636

Open
Tom3652 opened this issue Mar 22, 2023 · 17 comments
Labels
Needs Attention This issue needs maintainer attention. platform: all Issues / PRs which are for all platforms. plugin: auth type: bug Something isn't working type: crash A compile error or crash

Comments

@Tom3652
Copy link

Tom3652 commented Mar 22, 2023

Bug report

Describe the bug

I have received this report twice yesterday in my crashlytics dashboard.
I am not sure if this is a firebase_crashlytics issue or not but it says Crashed: com.google.firebase.crashlytics.ios.exception

Here is the trace :

Click To Expand
# Crashlytics - Stack trace
# Application: com.myapp.ios
# Platform: apple
# Version: 0.0.1 (1)
# Issue: 074e8621440bffd4f4d95ee65507b3c9
# Session: 9d3b3073345e412e97794c417da6c4ed_DNE_0_v2
# Date: Tue Mar 21 2023 16:24:40 GMT+0100 (heure normale d’Europe centrale)

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x9e38 __exceptionPreprocess
1  libobjc.A.dylib                0x178d8 objc_exception_throw
2  CoreFoundation                 0xf9c28 __CFDictionaryCreateGeneric
3  FirebaseAuth                   0x34f4c (Missing UUID 2186b6c7bf3235c2820f6d1cd8acc12c)
4  FirebaseAuth                   0x13d88 (Missing UUID 2186b6c7bf3235c2820f6d1cd8acc12c)
5  FirebaseAuth                   0x1282c (Missing UUID 2186b6c7bf3235c2820f6d1cd8acc12c)
6  FirebaseAuth                   0x117c8 (Missing UUID 2186b6c7bf3235c2820f6d1cd8acc12c)
7  FirebaseAuth                   0x9fb4 (Missing UUID 2186b6c7bf3235c2820f6d1cd8acc12c)
8  FirebaseAuth                   0x9be0 (Missing UUID 2186b6c7bf3235c2820f6d1cd8acc12c)
9  libdispatch.dylib              0x2460 _dispatch_call_block_and_release
10 libdispatch.dylib              0x3f88 _dispatch_client_callout
11 libdispatch.dylib              0xb640 _dispatch_lane_serial_drain
12 libdispatch.dylib              0xc18c _dispatch_lane_invoke
13 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread
14 libsystem_pthread.dylib        0xdf8 _pthread_wqthread
15 libsystem_pthread.dylib        0xb98 start_wqthread

com.apple.main-thread
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  GraphicsServices               0x1368 GSEventRunModal + 164
8  UIKitCore                      0x3a1668 -[UIApplication _run] + 888
9  UIKitCore                      0x3a12cc UIApplicationMain + 340
10 Runner                         0x60ac main + 5 (AppDelegate.swift:5)
11 ???                            0x1bed08960 (Missing)

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Crashed: com.google.firebase.crashlytics.ios.exception
0  FirebaseCrashlytics            0x1e3dc FIRCLSProcessRecordAllThreads + 184
1  FirebaseCrashlytics            0x1e7bc FIRCLSProcessRecordAllThreads + 1176
2  FirebaseCrashlytics            0x1592c FIRCLSHandler + 48
3  FirebaseCrashlytics            0x10600 __FIRCLSExceptionRecord_block_invoke + 92
4  libdispatch.dylib              0x3f88 _dispatch_client_callout + 20
5  libdispatch.dylib              0x13574 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6  FirebaseCrashlytics            0xf60c FIRCLSExceptionRecord + 204
7  FirebaseCrashlytics            0x10120 FIRCLSExceptionRecordNSException + 452
8  FirebaseCrashlytics            0xf264 FIRCLSTerminateHandler() + 404
9  libc++abi.dylib                0x10f28 std::__terminate(void (*)()) + 20
10 libc++abi.dylib                0x10ec4 std::terminate() + 56
11 libobjc.A.dylib                0x33bec objc_terminate + 16
12 libdispatch.dylib              0x3f9c _dispatch_client_callout + 40
13 libdispatch.dylib              0xb640 _dispatch_lane_serial_drain + 672
14 libdispatch.dylib              0xc18c _dispatch_lane_invoke + 384
15 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
16 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
17 libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  Foundation                     0x42054 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  Foundation                     0x41f3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9  UIKitCore                      0x4d66a4 -[UIEventFetcher threadMain] + 436
10 Foundation                     0x5b518 __NSThread__start__ + 716
11 libsystem_pthread.dylib        0x16cc _pthread_start + 148
12 libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_pthread.dylib        0xb90 start_wqthread + 254

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

io.flutter.1.ui
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  Flutter                        0x2d9f6c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
8  Flutter                        0x2d9a5c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
9  libsystem_pthread.dylib        0x16cc _pthread_start + 148
10 libsystem_pthread.dylib        0xba4 thread_start + 8

io.flutter.1.raster
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  Flutter                        0x2d9f6c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
8  Flutter                        0x2d9a5c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
9  libsystem_pthread.dylib        0x16cc _pthread_start + 148
10 libsystem_pthread.dylib        0xba4 thread_start + 8

io.flutter.1.io
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  Flutter                        0x2d9f6c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
8  Flutter                        0x2d9a5c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
9  libsystem_pthread.dylib        0x16cc _pthread_start + 148
10 libsystem_pthread.dylib        0xba4 thread_start + 8

io.worker.1
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x2d4174 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  libsystem_pthread.dylib        0x16cc _pthread_start + 148
5  libsystem_pthread.dylib        0xba4 thread_start + 8

io.worker.2
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x2d4174 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  libsystem_pthread.dylib        0x16cc _pthread_start + 148
5  libsystem_pthread.dylib        0xba4 thread_start + 8

io.worker.3
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x2d4174 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  libsystem_pthread.dylib        0x16cc _pthread_start + 148
5  libsystem_pthread.dylib        0xba4 thread_start + 8

io.worker.4
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x2d4174 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  libsystem_pthread.dylib        0x16cc _pthread_start + 148
5  libsystem_pthread.dylib        0xba4 thread_start + 8

io.worker.5
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x2d4174 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  libsystem_pthread.dylib        0x16cc _pthread_start + 148
5  libsystem_pthread.dylib        0xba4 thread_start + 8

io.worker.6
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x2d4174 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  libsystem_pthread.dylib        0x16cc _pthread_start + 148
5  libsystem_pthread.dylib        0xba4 thread_start + 8

dart:io EventHandler
0  libsystem_kernel.dylib         0x26e0 kevent + 8
1  Flutter                        0x4c3e50 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
2  Flutter                        0x4f4108 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  libsystem_pthread.dylib        0x16cc _pthread_start + 148
4  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

com.google.firebase.crashlytics.MachExceptionServer
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  FirebaseCrashlytics            0x17f44 FIRCLSMachExceptionServer + 108
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

JavaScriptCore libpas scavenger
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  JavaScriptCore                 0xf7104 scavenger_thread_main + 1364
3  libsystem_pthread.dylib        0x16cc _pthread_start + 148
4  libsystem_pthread.dylib        0xba4 thread_start + 8

DartWorker
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8098 _pthread_cond_wait + 1276
2  Flutter                        0x63b82c (Missing UUID 4c4c44e655553144a165b4c4c8109699)
3  Flutter                        0x679370 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
4  Flutter                        0x63b1f8 (Missing UUID 4c4c44e655553144a165b4c4c8109699)
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  CFNetwork                      0x257ff0 _CFURLStorageSessionDisableCache + 61088
8  Foundation                     0x5b518 __NSThread__start__ + 716
9  libsystem_pthread.dylib        0x16cc _pthread_start + 148
10 libsystem_pthread.dylib        0xba4 thread_start + 8

Steps to reproduce

I have no idea how to reproduce it, my app is in beta test mode in TestFlight currently and it's another user that got this crash on iOS 16+ on iPhone 13 :

Capture d’écran 2023-03-22 à 12 08 36

Expected behavior

The app should not crash

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.7, on macOS 13.2.1 22D68 darwin-x64, locale fr-FR)                                                                                                                                                    Checking Android licenses is taking an unexpectedly long time...
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.76.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!


Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 2.19.4
Flutter SDK 3.7.7
myappname 0.0.1+1

dependencies:
- audio_session 0.1.13 [flutter flutter_web_plugins rxdart meta]
- audio_waveforms 1.0.1 [flutter]
- audioplayers 3.0.1 [audioplayers_android audioplayers_darwin audioplayers_linux audioplayers_platform_interface audioplayers_web audioplayers_windows flutter http path_provider uuid]
- auto_size_text 3.0.0 [flutter]
- cached_network_image 3.2.3 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- collection 1.17.0
- connectivity_plus 3.0.3 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm]
- crypto 3.0.2 [typed_data]
- cupertino_icons 1.0.5
- desktop_drop 0.4.1 [flutter flutter_web_plugins cross_file]
- dio 5.0.3 [http_parser meta path]
- extended_image 7.0.2 [extended_image_library flutter meta]
- file_selector 0.9.2+4 [file_selector_ios file_selector_linux file_selector_macos file_selector_platform_interface file_selector_web file_selector_windows flutter]
- firebase_analytics 10.1.6 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_app_check 0.1.1+14 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 4.3.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 2.8.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 3.0.17 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_messaging 14.3.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- firebase_performance 0.9.0+16 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine]
- flutter_calendar_carousel 2.4.2 [intl flutter]
- flutter_image_compress 1.1.3 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection js material_color_utilities meta path vector_math]
- flutter_native_splash 2.2.19 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml]
- flutter_secure_storage 8.0.0 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta]
- flutter_staggered_grid_view 0.6.2 [flutter]
- gallery_saver 2.3.2 [flutter path_provider http path]
- google_sign_in 6.0.2 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- hive_flutter 1.1.0 [flutter hive path_provider path]
- http 0.13.5 [async http_parser meta path]
- image_editor 1.3.0 [flutter image_editor_platform_interface image_editor_common]
- image_picker 0.8.7 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- in_app_review 2.0.6 [flutter in_app_review_platform_interface]
- linkify 4.1.0
- local_auth 2.1.6 [flutter local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows]
- maps_launcher 2.2.0 [flutter flutter_web_plugins url_launcher]
- path_provider 2.0.13 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- permission_handler 10.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- provider 6.0.5 [collection flutter nested]
- pull_to_refresh_flutter3 2.0.1 [flutter]
- purchases_flutter 4.11.0 [flutter freezed_annotation json_annotation]
- record 4.4.4 [flutter record_platform_interface record_web record_windows record_macos record_linux]
- rive 0.10.3 [collection flutter flutter_web_plugins http meta plugin_platform_interface rive_common]
- share_plus 6.3.1 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32]
- sign_in_with_apple 4.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- url_launcher 6.1.10 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.7 [crypto]

dev dependencies:
- build_runner 2.3.3 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_lints 2.0.1 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection js matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- hive_generator 2.0.0 [build source_gen hive analyzer source_helper]

transitive dependencies:
- _fe_analyzer_shared 56.0.0 [meta]
- _flutterfire_internals 1.0.18 [collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 5.8.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- archive 3.3.6 [crypto path pointycastle]
- args 2.4.0
- async 2.10.0 [collection meta]
- audioplayers_android 2.0.0 [audioplayers_platform_interface flutter]
- audioplayers_darwin 3.0.1 [audioplayers_platform_interface flutter]
- audioplayers_linux 1.0.4 [audioplayers_platform_interface flutter]
- audioplayers_platform_interface 4.0.0 [flutter plugin_platform_interface]
- audioplayers_web 2.2.0 [audioplayers_platform_interface flutter flutter_web_plugins js]
- audioplayers_windows 1.1.3 [audioplayers_platform_interface flutter]
- boolean_selector 2.1.1 [source_span string_scanner]
- build 2.3.1 [analyzer async convert crypto glob logging meta path]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 3.1.1 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.2.0 [analyzer async build collection crypto graphs logging path package_config pool pub_semver stream_transform yaml]
- build_runner_core 7.2.7 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.4.4 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 2.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.0.2 [flutter flutter_cache_manager cached_network_image_platform_interface]
- characters 1.2.1
- checked_yaml 2.0.2 [json_annotation source_span yaml]
- clock 1.1.1
- code_builder 4.4.0 [built_collection built_value collection matcher meta]
- connectivity_plus_platform_interface 1.2.4 [flutter meta plugin_platform_interface]
- convert 3.1.1 [typed_data]
- cross_file 0.3.3+4 [js meta]
- csslib 0.17.2 [source_span]
- dart_style 2.3.0 [analyzer args path pub_semver source_span]
- dbus 0.7.8 [args ffi meta xml]
- extended_image_library 3.4.1 [crypto flutter http_client_helper path path_provider]
- fake_async 1.3.1 [clock collection]
- ffi 2.0.1
- file 6.1.4 [meta path]
- file_selector_ios 0.5.1+1 [file_selector_platform_interface flutter]
- file_selector_linux 0.9.1+2 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.0+6 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.4.1 [cross_file flutter http plugin_platform_interface]
- file_selector_web 0.9.0+4 [file_selector_platform_interface flutter flutter_web_plugins]
- file_selector_windows 0.9.1+6 [cross_file file_selector_platform_interface flutter]
- firebase_analytics_platform_interface 3.3.23 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.5.1+14 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_app_check_platform_interface 0.0.5+17 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.0.7+17 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_auth_platform_interface 6.12.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.2.10 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.5.3 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.2.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.3.17 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.2.16 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.2.17 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- firebase_performance_platform_interface 0.1.1+35 [_flutterfire_internals firebase_core flutter plugin_platform_interface]
- firebase_performance_web 0.1.1+24 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js]
- fixnum 1.1.0
- flutter_blurhash 0.7.0 [flutter]
- flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_plugin_android_lifecycle 2.0.9 [flutter]
- flutter_secure_storage_linux 1.1.3 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 3.0.0 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.0.1 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.1.1 [flutter flutter_secure_storage_platform_interface flutter_web_plugins js]
- flutter_secure_storage_windows 2.0.0 [flutter flutter_secure_storage_platform_interface]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- freezed_annotation 2.2.0 [collection json_annotation meta]
- frontend_server_client 3.2.0 [async path]
- glob 2.1.1 [async collection file path string_scanner]
- google_identity_services_web 0.2.0 [js meta]
- google_sign_in_android 6.1.8 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.6.1 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.3.1 [flutter plugin_platform_interface quiver]
- google_sign_in_web 0.11.0+2 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http js]
- graphs 2.2.0 [collection]
- hive 2.2.3 [meta crypto]
- html 0.15.2 [csslib source_span]
- http_client_helper 2.0.3 [http]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image 4.0.15 [archive meta xml]
- image_editor_common 1.0.1 [flutter image_editor_platform_interface]
- image_editor_platform_interface 1.0.1 [flutter platform plugin_platform_interface]
- image_picker_android 0.8.6+5 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.12 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.7+1 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.6.3 [cross_file flutter http plugin_platform_interface]
- in_app_review_platform_interface 2.0.4 [flutter url_launcher plugin_platform_interface platform]
- intl 0.17.0 [clock path]
- io 1.0.4 [meta path string_scanner]
- js 0.6.5 [meta]
- json_annotation 4.8.0 [meta]
- lints 2.0.1
- local_auth_android 1.0.21 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_ios 1.1.1 [flutter intl local_auth_platform_interface]
- local_auth_platform_interface 1.0.7 [flutter plugin_platform_interface]
- local_auth_windows 1.0.7 [flutter local_auth_platform_interface]
- logging 1.1.1
- matcher 0.12.13 [meta stack_trace]
- material_color_utilities 0.2.0
- meta 1.8.0
- mime 1.0.4
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- octo_image 1.0.2 [flutter flutter_blurhash]
- package_config 2.1.0 [path]
- path 1.8.2
- path_provider_android 2.0.24 [flutter path_provider_platform_interface]
- path_provider_foundation 2.2.0 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.10 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.0.6 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.5 [ffi flutter path path_provider_platform_interface win32]
- pedantic 1.11.1
- permission_handler_android 10.2.0 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.0.7 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.9.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.2 [flutter permission_handler_platform_interface]
- petitparser 5.1.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.4 [meta]
- pointycastle 3.7.0 [collection convert js]
- pool 1.5.1 [async stack_trace]
- process 4.2.4 [file path platform]
- pub_semver 2.1.3 [collection meta]
- pubspec_parse 1.2.2 [checked_yaml collection json_annotation pub_semver yaml]
- quiver 3.2.1 [matcher]
- record_linux 0.4.1 [flutter record_platform_interface path]
- record_macos 0.2.2 [flutter record_platform_interface]
- record_platform_interface 0.5.0 [flutter plugin_platform_interface]
- record_web 0.5.0 [flutter flutter_web_plugins record_platform_interface]
- record_windows 0.7.1 [flutter record_platform_interface path]
- rive_common 0.0.3 [flutter flutter_web_plugins collection ffi graphs http meta plugin_platform_interface]
- rxdart 0.27.7
- share_plus_platform_interface 3.2.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shelf 1.4.0 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 1.0.3 [shelf stream_channel web_socket_channel]
- sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta]
- sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js]
- sky_engine 0.0.99
- source_gen 1.2.7 [analyzer async build dart_style glob path source_span yaml]
- source_helper 1.3.3 [analyzer collection source_gen]
- source_span 1.9.1 [collection path term_glyph]
- sqflite 2.2.6 [flutter sqflite_common path]
- sqflite_common 2.4.3 [synchronized path meta]
- stack_trace 1.11.0 [path]
- stream_channel 2.1.1 [async]
- stream_transform 2.1.0
- string_scanner 1.2.0 [source_span]
- synchronized 3.0.1
- term_glyph 1.2.1
- test_api 0.4.16 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timing 1.0.1 [json_annotation]
- typed_data 1.3.1 [collection]
- universal_io 2.2.0 [collection meta typed_data]
- url_launcher_android 6.0.25 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.1.3 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.4 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.4 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.2 [flutter plugin_platform_interface]
- url_launcher_web 2.0.16 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.5 [flutter url_launcher_platform_interface]
- vector_math 2.1.4
- watcher 1.0.2 [async path]
- web_socket_channel 2.3.0 [async crypto stream_channel]
- win32 3.1.3 [ffi]
- xdg_directories 1.0.0 [meta path process]
- xml 6.2.2 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]


@Tom3652 Tom3652 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Mar 22, 2023
@danagbemava-nc danagbemava-nc added the triage Issue is currently being triaged. label Mar 22, 2023
@danagbemava-nc
Copy link

Hi @Tom3652, can you share the crash log in properly formatted text? I think this might not be an issue with firebase_crashlytics but rather google_sign_in. See flutter/flutter#85785

@danagbemava-nc danagbemava-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Mar 22, 2023
@Tom3652
Copy link
Author

Tom3652 commented Mar 22, 2023

hi @danagbemava-nc thanks for the quick reply.
I have already attached the whole trace in formatted text inside the first "click to expand", do you need something else ?

I am aware of this issue with google_sign_in but i can assure that this is not the case here, i have came across the google_sign_in cancellation error multiple times even in debug, it's easy to reproduce and doesn't crash even on iOS.

This is a crash here and the stack trace doesn't mention google_sign_in despite the crash reason is talking about IDToken, accessToken.

The relevant block for me is when firebase_crashlytics is trying to process a record :

Crashed: com.google.firebase.crashlytics.ios.exception
0  FirebaseCrashlytics            0x1e3dc FIRCLSProcessRecordAllThreads + 184
1  FirebaseCrashlytics            0x1e7bc FIRCLSProcessRecordAllThreads + 1176
2  FirebaseCrashlytics            0x1592c FIRCLSHandler + 48
3  FirebaseCrashlytics            0x10600 __FIRCLSExceptionRecord_block_invoke + 92
4  libdispatch.dylib              0x3f88 _dispatch_client_callout + 20
5  libdispatch.dylib              0x13574 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6  FirebaseCrashlytics            0xf60c FIRCLSExceptionRecord + 204
7  FirebaseCrashlytics            0x10120 FIRCLSExceptionRecordNSException + 452
8  FirebaseCrashlytics            0xf264 FIRCLSTerminateHandler() + 404
9  libc++abi.dylib                0x10f28 std::__terminate(void (*)()) + 20
10 libc++abi.dylib                0x10ec4 std::terminate() + 56
11 libobjc.A.dylib                0x33bec objc_terminate + 16
12 libdispatch.dylib              0x3f9c _dispatch_client_callout + 40
13 libdispatch.dylib              0xb640 _dispatch_lane_serial_drain + 672
14 libdispatch.dylib              0xc18c _dispatch_lane_invoke + 384
15 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
16 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
17 libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thanks for your understanding

@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 Mar 22, 2023
@danagbemava-nc
Copy link

danagbemava-nc commented Mar 23, 2023

Hi @Tom3652, sorry, I somehow missed that part in the initial report.

I believe the issue is expected because the app terminates before the message can be sent. I believe the actual issue is the Fatal Exception: NSInvalidArgumentException which is caused by FirebaseAuth.

Is your google sign in feature linked through FirebaseAuth?

Also, can you deobfuscate the crash logs so we can see what the missing sections are? https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=flutter

PS: that error can cause an app termination. See #9615

@danagbemava-nc danagbemava-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Mar 23, 2023
@Tom3652
Copy link
Author

Tom3652 commented Mar 23, 2023

No problem !

Is your google sign in feature linked through FirebaseAuth?

it is linked but i am passing the UserCredential from Google sign in, i am not using GoogleAuthProvider() and i am not using linkWithProvider as i saw in the mentioned issue.

I am simply using : UserCredential finalCredentials = await FirebaseAuth.instance.signInWithCredential(credential);

Also, can you deobfuscate the crash logs so we can see what the missing sections are? https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=flutter

I have already done these steps before releasing my app, it seems it's not working...

Capture d’écran 2023-03-23 à 11 21 19

Capture d’écran 2023-03-23 à 11 21 43

@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 Mar 23, 2023
@danagbemava-nc
Copy link

Thanks for the update.

Have you tried using the ios specific settings to see if it helps? You can find that here https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=ios

@danagbemava-nc danagbemava-nc added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Mar 23, 2023
@Tom3652
Copy link
Author

Tom3652 commented Mar 23, 2023

Yes i have done it even if the dashboard doesn't tell me there are missing DSYM files.
It happened on another project (that there were missing DSYM files) so i am used to do this, but it's the first project where i obfuscate the code for a released app...

What else can i do if there is anything ?

@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 Mar 23, 2023
@danagbemava-nc danagbemava-nc changed the title 🐛 [firebase_crashlytics] NSInvalidArgumentException - One of IDToken, accessToken, pendingToken, or requestURI must be supplied. Mar 24, 2023
@danagbemava-nc
Copy link

What else can i do if there is anything ?

I'm not too sure.

Labeling for further insight from the team since this is a production crash with no steps to reproduce.

/cc @Lyokone

@danagbemava-nc danagbemava-nc added plugin: auth type: crash A compile error or crash and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Mar 24, 2023
@Tom3652
Copy link
Author

Tom3652 commented Mar 25, 2023

I have reached out firebase support to know more about de-obfuscation, will update here if i manage to get the readable trace.

@Tom3652
Copy link
Author

Tom3652 commented Mar 30, 2023

@danagbemava-nc Firebase support answered :

Thank you for your patience and for the information provided. After discussing further with my colleagues, it was confirmed that for iOS using --obfuscate is supported but not out of the box.

The current workaround is to:

  • Make sure FlutterFire plugin has the latest dependencies if the Crashlytics SDK, which is 10.7.0
  • The dSYMs have to be uploaded to Crashlytics using the drag and drop feature in the Crashlytics dashboard.
    Give it a try and let me know if you have questions.

But my app was released with 10.6.0 using the latest firebase_crashlytics version which was updated 14 days ago, in my Podfile i see 10.6.0 so i think that's why deobfuscation doesn't work

@Lyokone
Copy link
Contributor

Lyokone commented Mar 31, 2023

The latest version of firebase_core 2.9.0 contains 10.7.0. Let us know if it helps.

@Lyokone Lyokone added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Mar 31, 2023
@Tom3652
Copy link
Author

Tom3652 commented Mar 31, 2023

Hi @Lyokone, thanks you are right it actually contains, my pub upgrade somehow didn't work the first time.
I do see 10.7.0 now, but i am not sure this will be relevant to this crash as it was retrieved with 10.6.0 ?

I will be releasing a new version today with 10.7.0

@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 Mar 31, 2023
@Tom3652
Copy link
Author

Tom3652 commented Apr 7, 2023

Hey @Lyokone i have got the crash again and the deobfuscation seems to be working with 10.7.0 :

Click To Expand
Crashlytics - Stack trace
Application: com.myapp.ios
Platform: apple
Version: 1.0.2 (2)
Issue: d69d45f1d78f1e432b9df63ef76eaaaf
Session: 2788a73b959d48759bd38a8aa4858d08_DNE_0_v2
Date: Thu Apr 06 2023 18:34:28 GMT+0200 (heure d’été d’Europe centrale)

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x9d94 __exceptionPreprocess
1  libobjc.A.dylib                0x183d0 objc_exception_throw
2  CoreFoundation                 0xf7300 __CFDictionaryCreateGeneric
3  FirebaseAuth                   0x34c10 -[FIRVerifyAssertionRequest unencodedHTTPRequestBodyWithError:] + 165 (FIRVerifyAssertionRequest.m:165)
4  FirebaseAuth                   0x13880 -[FIRAuthBackendRPCImplementation postWithRequest:response:callback:] + 1025 (FIRAuthBackend.m:1025)
5  FirebaseAuth                   0x12324 -[FIRAuthBackendRPCImplementation verifyAssertion:callback:] + 789 (FIRAuthBackend.m:789)
6  FirebaseAuth                   0x112c0 +[FIRAuthBackend verifyAssertion:callback:] + 550 (FIRAuthBackend.m:550)
7  FirebaseAuth                   0x9aac -[FIRAuth internalSignInAndRetrieveDataWithCredential:isReauthentication:callback:] + 1092 (FIRAuth.m:1092)
8  FirebaseAuth                   0x96d8 __43-[FIRAuth signInWithCredential:completion:]_block_invoke + 915 (FIRAuth.m:915)
9  libdispatch.dylib              0x2320 _dispatch_call_block_and_release
10 libdispatch.dylib              0x3eac _dispatch_client_callout
11 libdispatch.dylib              0xb534 _dispatch_lane_serial_drain
12 libdispatch.dylib              0xc0a4 _dispatch_lane_invoke
13 libdispatch.dylib              0x16cdc _dispatch_workloop_worker_thread
14 libsystem_pthread.dylib        0xddc _pthread_wqthread
15 libsystem_pthread.dylib        0xb7c start_wqthread

com.apple.main-thread
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  GraphicsServices               0x135c GSEventRunModal + 164
8  UIKitCore                      0x39d37c -[UIApplication _run] + 888
9  UIKitCore                      0x39cfe0 UIApplicationMain + 340
10 Runner                         0x6034 main + 5 (AppDelegate.swift:5)
11 ???                            0x1dbeacdec (Missing)

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  Foundation                     0x420c4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  Foundation                     0x41fac -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9  UIKitCore                      0x4cfdac -[UIEventFetcher threadMain] + 416
10 Foundation                     0x5b634 __NSThread__start__ + 716
11 libsystem_pthread.dylib        0x16b8 _pthread_start + 148
12 libsystem_pthread.dylib        0xb88 thread_start + 8

io.flutter.1.ui
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  Flutter                        0x2d9f6c (Missing UUID 4c4c443255553144a12105aa4b06a34f)
8  Flutter                        0x2d9a5c (Missing UUID 4c4c443255553144a12105aa4b06a34f)
9  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
10 libsystem_pthread.dylib        0xb88 thread_start + 8

io.flutter.1.raster
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  Flutter                        0x2d9f6c (Missing UUID 4c4c443255553144a12105aa4b06a34f)
8  Flutter                        0x2d9a5c (Missing UUID 4c4c443255553144a12105aa4b06a34f)
9  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
10 libsystem_pthread.dylib        0xb88 thread_start + 8

io.flutter.1.io
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  Flutter                        0x2d9f6c (Missing UUID 4c4c443255553144a12105aa4b06a34f)
8  Flutter                        0x2d9a5c (Missing UUID 4c4c443255553144a12105aa4b06a34f)
9  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
10 libsystem_pthread.dylib        0xb88 thread_start + 8

io.worker.1
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x2d4174 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

io.worker.2
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x2d4174 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

io.worker.3
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x2d4174 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

io.worker.4
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x2d4174 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

io.worker.5
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x2d4174 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

io.worker.6
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8078 _pthread_cond_wait + 1232
2  Flutter                        0x48574 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x2d4174 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
5  libsystem_pthread.dylib        0xb88 thread_start + 8

dart:io EventHandler
0  libsystem_kernel.dylib         0x25bc kevent + 8
1  Flutter                        0x4c3e50 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
2  Flutter                        0x4f4108 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
4  libsystem_pthread.dylib        0xb88 thread_start + 8

com.google.firebase.crashlytics.MachExceptionServer
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  FirebaseCrashlytics            0x17f44 FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192)
5  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
6  libsystem_pthread.dylib        0xb88 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0xc84 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13b54 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13e2c mach_msg_overwrite + 540
3  libsystem_kernel.dylib         0x11c8 mach_msg + 24
4  CoreFoundation                 0x79114 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7a340 __CFRunLoopRun + 1208
6  CoreFoundation                 0x7f4dc CFRunLoopRunSpecific + 612
7  CFNetwork                      0x2587e0 _CFURLStorageSessionDisableCache + 60900
8  Foundation                     0x5b634 __NSThread__start__ + 716
9  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
10 libsystem_pthread.dylib        0xb88 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x118c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe28 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb7c start_wqthread + 8

DartWorker
0  libsystem_kernel.dylib         0x1558 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x80a4 _pthread_cond_wait + 1276
2  Flutter                        0x63b914 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
3  Flutter                        0x679458 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
4  Flutter                        0x63b2e0 (Missing UUID 4c4c443255553144a12105aa4b06a34f)
5  libsystem_pthread.dylib        0x16b8 _pthread_start + 148
6  libsystem_pthread.dylib        0xb88 thread_start + 8

Thread
0  libsystem_pthread.dylib        0xb74 start_wqthread + 254

Thread
0  libsystem_pthread.dylib        0xb74 start_wqthread + 254

Crashed: com.google.firebase.crashlytics.ios.exception
0  FirebaseCrashlytics            0x1e3dc FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393)
1  FirebaseCrashlytics            0x1e7bc FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424)
2  FirebaseCrashlytics            0x1592c FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3  FirebaseCrashlytics            0x10600 __FIRCLSExceptionRecord_block_invoke + 232 (FIRCLSException.mm:232)
4  libdispatch.dylib              0x3eac _dispatch_client_callout + 20
5  libdispatch.dylib              0x13428 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6  FirebaseCrashlytics            0xf60c FIRCLSExceptionRecord + 234 (FIRCLSException.mm:234)
7  FirebaseCrashlytics            0x10120 FIRCLSExceptionRecordNSException + 126 (FIRCLSException.mm:126)
8  FirebaseCrashlytics            0xf264 FIRCLSTerminateHandler() + 398 (FIRCLSException.mm:398)
9  libc++abi.dylib                0x10fbc std::__terminate(void (*)()) + 16
10 libc++abi.dylib                0x10f60 std::terminate() + 56
11 libobjc.A.dylib                0x33d04 objc_terminate + 16
12 libdispatch.dylib              0x3ec0 _dispatch_client_callout + 40
13 libdispatch.dylib              0xb534 _dispatch_lane_serial_drain + 668
14 libdispatch.dylib              0xc0a4 _dispatch_lane_invoke + 384
15 libdispatch.dylib              0x16cdc _dispatch_workloop_worker_thread + 648
16 libsystem_pthread.dylib        0xddc _pthread_wqthread + 288
17 libsystem_pthread.dylib        0xb7c start_wqthread + 8

You are right it's with firebase_auth somehow.

And here is the code i am calling :

  Future<void> _dealWithCredentials(OAuthCredential? credential) async {
    if (credential != null) {
      try {
        UserCredential finalCredentials = await FirebaseAuth.instance.signInWithCredential(credential);
      } on FirebaseAuthException catch (error) {
        debugPrint("Error code : ${error.code}");
        debugPrint("Error message :  ${error.message}");
        switch (error.code) {
          case "user-not-found":
            errorText =
                Localization.instance.getText("wrong_email_or_password");
            break;
          case "user-disabled":
            errorText =
                "${Localization.instance.getText("account_disabled")}";
            break;
          case "account-exists-with-different-credential":
            debugPrint("Already existing credentials : ${error.message}");
            break;
        }
      }
   }
}
@Lyokone
Copy link
Contributor

Lyokone commented Apr 7, 2023

Thanks for the info. Unfortunately, it's not enough to reproduce the crash on my end.
I see that this error has already been reported on iOS: firebase/firebase-ios-sdk#2748 and is tied to having the user logged off. Maybe you are logging off your user during the signInWithCredential process?

@Tom3652
Copy link
Author

Tom3652 commented Apr 7, 2023

@Lyokone i am able to reproduce it locally at 100% in profile mode and this is not reproductible in debug mode :

*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘One of IDToken, accessToken, pendingToken, or requestURI must be supplied.’
*** First throw call stack:
(0x1a827425c 0x1bc009480 0x1a8175ba0 0x10281cc34 0x1027fb974 0x1027fa448 0x1027f9400 0x1027f1bdc 0x1027f1808 0x1a7eab2b0 0x1a7eac298 0x1a7e54a40 0x1a7e55518 0x1a7e5efac 0x1f07a95bc 0x1f07ac86c)
libc++abi: terminating with uncaught exception of type NSException
* thread #25, queue = ‘com.google.firebase.auth.globalWorkQueue’, stop reason = signal SIGABRT
    frame #0: 0x00000001d40da7b0 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1d40da7b0 <+8>:  b.lo   0x1d40da7cc               ; <+36>
    0x1d40da7b4 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1d40da7b8 <+16>: mov    x29, sp
    0x1d40da7bc <+20>: bl     0x1d40b71fc               ; cerror_nocancel

I have understood the issue and the crash :

  • What is crashing is this code because accessToken or idToken is null:
// Create a new credential
final credential = GoogleAuthProvider.credential(
  accessToken: googleAuth?.accessToken,
  idToken: googleAuth?.idToken,
);

And i am able to reproduce it by clicking on cancel button of Google Sign in pop up on iOS.

Here is the full code :

final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn();

debugPrint("Google user : ${googleUser?.email}");
// Obtain the auth details from the request
final GoogleSignInAuthentication? googleAuth =
    await googleUser?.authentication;

debugPrint("Google auth : ${googleAuth?.accessToken}");  // This one is actually null when canceling

// Create a new credential
final credential = GoogleAuthProvider.credential(
  accessToken: googleAuth?.accessToken,
  idToken: googleAuth?.idToken,
);

// This method is shown in another comment above but not relevant anymore
_dealWithCredentials(credential);

So to fix it on my side it's simple, i simply need to do :

if (googleAuth == null) {
  return;
}

Before calling GoogleAuthProvider.
So what should be more clear and / or not allowed would be that GoogleAuthProvider should not be able to take nullable accessToken or idToken because it crashes the app.

I will make a new release of my app to fix this.

@devsigofficial
Copy link

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0xed5e0 __exceptionPreprocess
1 libobjc.A.dylib 0x2bc00 objc_exception_throw
2 CoreFoundation 0x1723a4 -[NSException initWithCoder:]
3 FirebaseAuth 0x379c8 (Missing UUID e6bae3d02a20358da10459d832a1e40a)
4 FirebaseAuth 0x12c8c (Missing UUID e6bae3d02a20358da10459d832a1e40a)
5 FirebaseAuth 0x11320 (Missing UUID e6bae3d02a20358da10459d832a1e40a)
6 FirebaseAuth 0xff80 (Missing UUID e6bae3d02a20358da10459d832a1e40a)
7 FirebaseAuth 0x79ac (Missing UUID e6bae3d02a20358da10459d832a1e40a)
8 FirebaseAuth 0x75d8 (Missing UUID e6bae3d02a20358da10459d832a1e40a)
9 libdispatch.dylib 0x26a8 _dispatch_call_block_and_release
10 libdispatch.dylib 0x4300 _dispatch_client_callout
11 libdispatch.dylib 0xb894 _dispatch_lane_serial_drain
12 libdispatch.dylib 0xc3c4 _dispatch_lane_invoke
13 libdispatch.dylib 0x17004 _dispatch_root_queue_drain_deferred_wlh
14 libdispatch.dylib 0x16878 _dispatch_workloop_worker_thread
15 libsystem_pthread.dylib 0x1964 _pthread_wqthread
16 libsystem_pthread.dylib 0x1a04 start_wqthread

@chadpav
Copy link

chadpav commented Dec 2, 2023

I had this exact issue and thought it was a bug in the google_sign_in or firebase_auth package so I came to searching the issue tracker. The solution form @Tom3652 is 100% correct and I'm happy I was able to resolve the crasher with a simple change to my code.

However, I also 100% agree that the library needs to do better. First, to have it crash a production app is bad enough but the fact that it works fine in debug mode and only crashes in release mode is really frustrating.

Just my two cents, I appreciate you guys and whoever is maintaining these libraries.

NOTE: I'm using Firebase_Auth 14.4.1, and Google_Sign_In 6.1.6 , and in iOS using Firebase 10.18.0. All were latest at this time.

FWIW, when I get a null googleAuth object I'm returning a FirebaseAuthException with the 'canceled' code (with 1 "L") from my auth manager. This gave me similar behavior with the Apple provider from the same package if the user cancels apple sign in.

Also, I have all of this wrapped in a try/catch but that was not catching. The app crasher assertion is down in the native code.

...
final GoogleSignInAccount? googleUser = await GoogleSignIn(scopes: ['email']).signIn();

// Obtain the auth details from the request
final GoogleSignInAuthentication? googleAuth = await googleUser?.authentication;

// Check if the user canceled the sign in
if (googleAuth == null) {
    return Result.error(FirebaseAuthException(code: 'canceled', message: 'User canceled sign in'));
}

 // Create a new credential
 final credential = GoogleAuthProvider.credential(
    accessToken: googleAuth.accessToken,
    idToken: googleAuth.idToken,
 );
...
@RajDonga09
Copy link

We are encountering the same issue when cancelling Google Sign-In. Currently, the Google Sign-In package does not handle the exception at that time. However, we can handle this crash from our side. Please refer to the code below. Thank you for your patience as we address this issue.

  static Future<UserCredential> signInWithGoogleTemp() async {
    try {
      final GoogleSignIn googleSignIn = GoogleSignIn();

      final GoogleSignInAccount? googleSignInAccount = await googleSignIn.signIn();

      // This line fixes the crash
      if (googleSignInAccount == null) throw Exception("googleSignIn Cancel");

      final GoogleSignInAuthentication googleSignInAuthentication = await googleSignInAccount.authentication;

      final AuthCredential credential = GoogleAuthProvider.credential(
        accessToken: googleSignInAuthentication.accessToken,
        idToken: googleSignInAuthentication.idToken,
      );

      final UserCredential userCredential = await auth.signInWithCredential(credential);
      return userCredential;
    } catch (e, st) {
      print("signInWithGoogle Error: $e $st");
      // handle Exception here
      rethrow;
    }
  }

@Lyokone Lyokone added the platform: all Issues / PRs which are for all platforms. label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: all Issues / PRs which are for all platforms. plugin: auth type: bug Something isn't working type: crash A compile error or crash
7 participants