firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.63k stars 3.95k forks source link

crashlytics - error: cannot find symbol FirebaseCrashlytics.getInstance().core.logFatalException(throwable); #8697

Closed nemr0 closed 2 years ago

nemr0 commented 2 years ago

Bug report

Describe the bug Cannot compile on android duo to a problem with firebase crashlytics

Screen Shot 2022-05-17 at 4 23 05 PM

Run Error

/Users/_/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-2.8.0/android/src/main/java/com/google/firebase/crashlytics/FlutterFirebaseCrashlyticsInternal.java:14: error: cannot find symbol
    FirebaseCrashlytics.getInstance().core.logFatalException(throwable);
                                          ^
  symbol:   method logFatalException(Throwable)
  location: variable core of type CrashlyticsCore
Note: /Users/_/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-2.8.0/android/src/main/java/io/flutter/plugins/firebase/crashlytics/FlutterFirebaseCrashlyticsPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':firebase_crashlytics:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
Exception: Gradle task assembleDebug failed with exit code 1

Flutter doctor

Click To Expand ``` [✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale en-EG) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc5) [✓] Xcode - develop for iOS and macOS (Xcode 13.3.1) [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.67.0) [✓] Connected device (1 available) ! Error: nemr’s iphone is not connected. Xcode will continue when nemr’s iphone is connected. (code -13) ! Error: nemr’s iphone is not connected. Xcode will continue when nemr’s iphone is connected. (code -13) ! Error: neemmrr is not connected. Xcode will continue when neemmrr is connected. (code -13) [✓] HTTP Host Availability```

Flutter dependencies

Click To Expand ``` Dart SDK 2.17.0 Flutter SDK 3.0.0 authenticated 1.1.001 dependencies: - anitex 2.0.0 [flutter] - cloud_firestore 3.1.15 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - device_info_plus 3.2.3 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows] - firebase_app_check 0.0.6+12 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 3.3.18 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 1.17.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_countdown_timer 4.1.0 [flutter] - flutter_native_splash 2.2.0+1 [args flutter flutter_web_plugins image js lint meta path universal_io xml yaml] - flutter_riverpod 1.0.4 [collection flutter meta riverpod state_notifier] - geolocator 8.2.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - google_fonts 2.3.2 [flutter http path_provider crypto] - http 0.13.4 [async http_parser meta path] - intl_phone_field 3.1.0 [flutter] - local_auth 2.0.2 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface] - mocktail 0.3.0 [collection matcher test] - ntp 2.0.0 - pie_chart 5.3.0 [flutter] - pin_code_fields 7.4.0 [flutter] - rounded_loading_button 2.1.0 [flutter rxdart] - shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - skeletons 0.0.3 [flutter] - sliding_up_panel 2.0.0+1 [flutter] - stop_watch_timer 1.4.0 [flutter rxdart] dev dependencies: - 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 charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters charcode clock collection crypto fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver] transitive dependencies: - _fe_analyzer_shared 40.0.0 [meta] - analyzer 4.1.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.1.11 [crypto path] - args 2.3.1 - async 2.8.2 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - characters 1.2.0 - charcode 1.3.1 - clock 1.1.0 - cloud_firestore_platform_interface 5.5.6 [collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 2.6.15 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - collection 1.16.0 - convert 3.0.1 [typed_data] - coverage 1.2.0 [args logging package_config path source_maps stack_trace vm_service] - crypto 3.0.1 [collection typed_data] - device_info_plus_linux 2.1.1 [device_info_plus_platform_interface file flutter meta] - device_info_plus_macos 2.2.3 [device_info_plus_platform_interface flutter] - device_info_plus_platform_interface 2.3.0+1 [flutter meta plugin_platform_interface] - device_info_plus_web 2.1.0 [device_info_plus_platform_interface flutter_web_plugins flutter] - device_info_plus_windows 2.1.1 [device_info_plus_platform_interface ffi flutter win32] - fake_async 1.3.0 [clock collection] - ffi 1.2.1 - file 6.1.2 [meta path] - firebase_app_check_platform_interface 0.0.4+6 [firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.0.5+12 [firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_auth_platform_interface 6.2.6 [firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 3.3.15 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta] - firebase_core_platform_interface 4.4.0 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.6.4 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.6 [collection firebase_core flutter meta plugin_platform_interface] - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters charcode clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_plugin_android_lifecycle 2.0.6 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 2.1.3 [async path] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - geolocator_android 3.1.8 [flutter geolocator_platform_interface] - geolocator_apple 2.1.3 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.5 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.5 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - glob 2.0.2 [async collection file path string_scanner] - http_multi_server 3.2.0 [async] - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data] - image 3.1.3 [archive meta xml] - intl 0.17.0 [clock path] - io 1.0.3 [meta path string_scanner] - js 0.6.4 - lint 1.8.2 - lints 2.0.0 - local_auth_android 1.0.4 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface] - local_auth_ios 1.0.6 [flutter intl local_auth_platform_interface] - local_auth_platform_interface 1.0.3 [flutter intl plugin_platform_interface] - logging 1.0.2 - matcher 0.12.11 [stack_trace] - material_color_utilities 0.1.4 - meta 1.7.0 - mime 1.0.2 - node_preamble 2.0.1 - package_config 2.0.2 [path] - path 1.8.1 - path_provider 2.0.10 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - path_provider_android 2.0.14 [flutter path_provider_platform_interface] - path_provider_ios 2.0.9 [flutter path_provider_platform_interface] - path_provider_linux 2.1.6 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.0.6 [ffi flutter path path_provider_platform_interface win32] - petitparser 5.0.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - pool 1.5.0 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.1 [collection meta] - riverpod 1.0.3 [collection meta state_notifier] - rxdart 0.27.3 - shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.3.0 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.0 [path shelf shelf_static] - shelf_static 1.1.0 [convert http_parser mime path shelf] - shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_map_stack_trace 2.1.0 [path stack_trace source_maps] - source_maps 0.10.10 [source_span] - source_span 1.8.2 [collection path term_glyph] - stack_trace 1.10.0 [path] - state_notifier 0.7.2+1 [meta] - stream_channel 2.1.0 [async] - string_scanner 1.1.0 [charcode source_span] - sync_http 0.3.0 - term_glyph 1.2.0 - test 1.21.1 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] - test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.4.13 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - typed_data 1.3.0 [collection] - universal_io 2.0.4 [collection crypto meta typed_data] - vector_math 2.1.2 - vm_service 8.2.2 - watcher 1.0.1 [async path] - web_socket_channel 2.2.0 [async crypto stream_channel] - webdriver 3.0.0 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 1.0.1 [logging] - win32 2.6.1 [ffi] - xdg_directories 0.2.0+1 [meta path process] - xml 5.4.1 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

ernest0vm commented 2 years ago

I have same problem 😔

ManhVu99 commented 2 years ago

Have anyone solved this problem ?

vietstone-ng commented 2 years ago

There're some conflicts between dependencies. I fixed this after trying these commands:

flutter pub upgrade
flutter pub outdated
flutter pub upgrade --major-versions
flutter clean
flutter pub get

Hope this help.

ernest0vm commented 2 years ago

Have anyone solved this problem ?

I downgrade flutter to v2.10.5 and flutter_crashlytics: 2.7.2, this work for me, while a bugfix is published

nemr0 commented 2 years ago

There're some conflicts between dependencies. I fixed this after trying these commands:

flutter pub upgrade
flutter pub outdated
flutter pub upgrade --major-versions
flutter clean
flutter pub get

Hope this help.

it didn't work, I already did it so no dependencies changed this time

vietstone-ng commented 2 years ago

There're some conflicts between dependencies. I fixed this after trying these commands:

flutter pub upgrade
flutter pub outdated
flutter pub upgrade --major-versions
flutter clean
flutter pub get

Hope this help.

it didn't work, I already did it so no dependencies changed this time

So your problem is that some packages constraint to low version. They prevent other dependencies to upgrade. You should wait for the package update, or try some pull requests.

Lucky for me that my packages have update, so I can upgrade my packages.

darshankawar commented 2 years ago

It seems there's a new file added which has the said method:

https://github.com/firebase/flutterfire/pull/8540/files#diff-1dac17c2c0f9a9ae5277bf04809c41b54d3b0ca29976583173397af903bd010d

@nemr0 can you try by pulling master branch on FlutterFire project and see if you still get same error ?

  1. clone FF repo.
  2. Install melos
  3. run melos boostrap from root of project which ensures you're using Crashlytics master branch code as dependencies.
  4. Go to Crashlytics example app directory on command line and run flutter run --no-pub.
darshankawar commented 2 years ago

Or another solution is to try this and see if it helps.

russellwheatley commented 2 years ago

Hey @nemr0, I've just ran the Crashlytics example as per this comment and it compiles without any problems. Could you provide a minimal, reproducible code sample/repo, please? 🙏

ciceromsjr commented 2 years ago

I had the same problem, but it worked after upgrading all firebase libraries (core and messaging in my case).

https://pub.dev/packages/firebase_core https://pub.dev/packages/firebase_messaging

Run flutter clean andflutter pub get after upgrading these libraries.

For iOS, run on the iOS project folder:

pod deintegrate
pod install --repo-update
MichalDanielDobrzanski commented 2 years ago

This has helped. I have basically iterated over every firebase_* dependency and upgraded it to the latest version. As for the iOS - I had to remove Podfile.lock before regenerating the Pod config.

vargascarlitos commented 2 years ago

I have downgraded the firebase crashlytics package to 2.7.0 but my flutter still references the package in version 2.8.0 when I do flutter run. wtf :(

SmilingFarood commented 2 years ago

Have anyone solved this problem ?

I downgrade flutter to v2.10.5 and flutter_crashlytics: 2.7.2, this work for me, while a bugfix is published

This worked for me👍🏼

mockturtl commented 2 years ago

My pubspec.lock was stuck on firebase_core: 1.14.1. Upgrading to 1.17.0 fixed it.

bhumkong commented 2 years ago

Seems like firebase_crashlytics actually depends on higher version of firebase_core than specified in its pubspec.yaml.

I got the error after downgrading firebase_core to 1.13.1 because of #8444. Had to also downgrade firebase_crashlytics to avoid this error.

firebase_core dependency of the crashlytics plugin should be upgraded.

EdGaz commented 2 years ago

not sure if can help, but i fixed by:

  1. flutter upgrade (from 2.10.4 to 3.0.1)
  2. flutter clean
  3. flutter pub upgrade
  4. pub get
  5. flutterfire configure

In addition, i noticed some differences between my app/build.gradle and firebase_crashlytics-2.8.1/example/android/app/build.gradle

in particular i removed:

rootProject.ext {
    set('FlutterFire', [
            FirebaseSDKVersion: '29.0.0'
    ])
}

and i put:

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

at the end of the file..

not sure what of those steps made the difference, but now it works! i wasted too much time on this..hope to save it to someone else

google-oss-bot commented 2 years ago

Hey @nemr0. 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!

nemr0 commented 2 years ago

FirebaseSDKVersion: '29.0.0'

this happens in IOS builds didn't test android ones I updated all firebase dependencies in pubspec.yaml file and updated dartSDK version to 2.17.3 then used the following commands: flutter clean flutter pub get flutterfire configure

and it gave me this error

Xcode build done.                                           73.4s
Failed to build iOS app
Error output from Xcode build:
↳
    2022-06-08 15:48:33.690 xcodebuild[27810:283714] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-06-08 15:48:33.690 xcodebuild[27810:283714] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-06-08 15:48:52.386 xcodebuild[27810:285908]  DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x6000010e6d00:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.4/DeveloperDiskImage.dmg'>', error=-402652958: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003246cd0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652958 "The device is locked." UserInfo={MobileDeviceErrorCode=(0xE80000E2), com.apple.dtdevicekit.stacktrace=(
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    ), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is locked.}}, NSLocalizedRecoverySuggestion=Please unlock and reconnect the device., NSLocalizedFailure=The device is locked., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
    2022-06-08 15:48:52.387 xcodebuild[27810:285908]  iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x600003246cd0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652958 "The device is locked." UserInfo={MobileDeviceErrorCode=(0xE80000E2), com.apple.dtdevicekit.stacktrace=(
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    ), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is locked.}}, NSLocalizedRecoverySuggestion=Please unlock and reconnect the device., NSLocalizedFailure=The device is locked., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}) {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedDescription = "Failed to prepare device for development.";
        NSLocalizedFailure = "The device is locked.";
        NSLocalizedRecoverySuggestion = "Please unlock and reconnect the device.";
        NSUnderlyingError = "Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652958 \"The device is locked.\" UserInfo={MobileDeviceErrorCode=(0xE80000E2), com.apple.dtdevicekit.stacktrace=(\n\t0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272\n\t1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768\n\t2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572\n\t3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20\n\t4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56\n\t5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168\n\t6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148\n\t7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16\n\t8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364\n\t9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32\n\t10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20\n\t11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652\n\t12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584\n\t13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396\n\t14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164\n\t15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228\n\t16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8\n), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is locked.}";
    }
    2022-06-08 15:48:52.387 xcodebuild[27810:283714] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> -- An error occurred whilst preparing device for development -- Failed to prepare device for development.
    Domain: com.apple.dtdevicekit
    Code: 806
    Recovery Suggestion: Please unlock and reconnect the device.
    User Info: {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedFailure = "The device is locked.";
    }
    --
    The device is locked.
    Domain: com.apple.dt.MobileDeviceErrorDomain
    Code: -402652958
    User Info: {
        DVTRadarComponentKey = 261622;
        MobileDeviceErrorCode = "(0xE80000E2)";
        "com.apple.dtdevicekit.stacktrace" = (
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    );
    }
    --
    2022-06-08 15:48:52.387 xcodebuild[27810:283714] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> == Underlying device preparation errors ==
    2022-06-08 15:48:52.387 xcodebuild[27810:283714] [MT] iPhoneConnect: Failed to prepare device for development.
    Domain: com.apple.dtdevicekit
    Code: 806
    Recovery Suggestion: Please unlock and reconnect the device.
    User Info: {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedFailure = "The device is locked.";
    }
    --
    The device is locked.
    Domain: com.apple.dt.MobileDeviceErrorDomain
    Code: -402652958
    User Info: {
        DVTRadarComponentKey = 261622;
        MobileDeviceErrorCode = "(0xE80000E2)";
        "com.apple.dtdevicekit.stacktrace" = (
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    );
    }
    --
    2022-06-08 15:48:52.387 xcodebuild[27810:283714] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> == END: Underlying device preparation errors ==
    2022-06-08 15:48:54.055 xcodebuild[27810:285909]  DTDeviceKit: Failed to mount DDI from '<DVTFilePath:0x6000010e6d00:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.4/DeveloperDiskImage.dmg'>', error=-402652958: Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x6000031a7f30 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652958 "The device is locked." UserInfo={MobileDeviceErrorCode=(0xE80000E2), com.apple.dtdevicekit.stacktrace=(
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    ), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is locked.}}, NSLocalizedRecoverySuggestion=Please unlock and reconnect the device., NSLocalizedFailure=The device is locked., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}
    2022-06-08 15:48:54.055 xcodebuild[27810:285909]  iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=806 "Failed to prepare device for development." UserInfo={AssociatedMobileDeviceFunction=AMDeviceMountImage, NSUnderlyingError=0x6000031a7f30 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652958 "The device is locked." UserInfo={MobileDeviceErrorCode=(0xE80000E2), com.apple.dtdevicekit.stacktrace=(
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    ), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is locked.}}, NSLocalizedRecoverySuggestion=Please unlock and reconnect the device., NSLocalizedFailure=The device is locked., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare device for development.}) {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedDescription = "Failed to prepare device for development.";
        NSLocalizedFailure = "The device is locked.";
        NSLocalizedRecoverySuggestion = "Please unlock and reconnect the device.";
        NSUnderlyingError = "Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402652958 \"The device is locked.\" UserInfo={MobileDeviceErrorCode=(0xE80000E2), com.apple.dtdevicekit.stacktrace=(\n\t0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272\n\t1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768\n\t2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572\n\t3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20\n\t4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56\n\t5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168\n\t6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148\n\t7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16\n\t8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364\n\t9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32\n\t10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20\n\t11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652\n\t12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584\n\t13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396\n\t14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164\n\t15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228\n\t16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8\n), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is locked.}";
    }
    2022-06-08 15:48:54.056 xcodebuild[27810:283714] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> -- An error occurred whilst preparing device for development -- Failed to prepare device for development.
    Domain: com.apple.dtdevicekit
    Code: 806
    Recovery Suggestion: Please unlock and reconnect the device.
    User Info: {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedFailure = "The device is locked.";
    }
    --
    The device is locked.
    Domain: com.apple.dt.MobileDeviceErrorDomain
    Code: -402652958
    User Info: {
        DVTRadarComponentKey = 261622;
        MobileDeviceErrorCode = "(0xE80000E2)";
        "com.apple.dtdevicekit.stacktrace" = (
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    );
    }
    --
    2022-06-08 15:48:54.056 xcodebuild[27810:283714] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> == Underlying device preparation errors ==
    2022-06-08 15:48:54.056 xcodebuild[27810:283714] [MT] iPhoneConnect: Failed to prepare device for development.
    Domain: com.apple.dtdevicekit
    Code: 806
    Recovery Suggestion: Please unlock and reconnect the device.
    User Info: {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedFailure = "The device is locked.";
    }
    --
    The device is locked.
    Domain: com.apple.dt.MobileDeviceErrorDomain
    Code: -402652958
    User Info: {
        DVTRadarComponentKey = 261622;
        MobileDeviceErrorCode = "(0xE80000E2)";
        "com.apple.dtdevicekit.stacktrace" = (
        0   DTDeviceKitBase                     0x0000000113709614 DTDKCreateNSErrorFromAMDErrorCode + 272
        1   DTDeviceKitBase                     0x0000000113740bf0 -[DTDKMobileDeviceToken _mountDeveloperDiskImage:withError:] + 768
        2   DTDeviceKitBase                     0x00000001137416c4 __58-[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:]_block_invoke + 572
        3   libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        4   libdispatch.dylib                   0x0000000184f1f414 _dispatch_lane_barrier_sync_invoke_and_complete + 56
        5   DTDeviceKitBase                     0x000000011374142c -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 168
        6   IDEiOSSupportCore                   0x00000001212c0e7c __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 148
        7   DVTFoundation                       0x0000000106544f50 __DVT_CALLING_CLIENT_BLOCK__ + 16
        8   DVTFoundation                       0x000000010654734c __DVTDispatchGroupAsync_block_invoke + 364
        9   libdispatch.dylib                   0x0000000184f0e5f0 _dispatch_call_block_and_release + 32
        10  libdispatch.dylib                   0x0000000184f101b4 _dispatch_client_callout + 20
        11  libdispatch.dylib                   0x0000000184f13708 _dispatch_continuation_pop + 652
        12  libdispatch.dylib                   0x0000000184f12cdc _dispatch_async_redirect_invoke + 584
        13  libdispatch.dylib                   0x0000000184f218e8 _dispatch_root_queue_drain + 396
        14  libdispatch.dylib                   0x0000000184f22104 _dispatch_worker_thread2 + 164
        15  libsystem_pthread.dylib             0x00000001850d0324 _pthread_wqthread + 228
        16  libsystem_pthread.dylib             0x00000001850cf080 start_wqthread + 8
    );
    }
    --
    2022-06-08 15:48:54.056 xcodebuild[27810:283714] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x136e2e4f0), nemr’s iphone, iPhone, 15.4.1 (19E258), 00008101-000E0916118B001E> == END: Underlying device preparation errors ==
    ** BUILD FAILED **

Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/lw/17kwyl0d2yd706_0dnpxtvbm0000gn/T/flutter_tools.cG4HIq/flutter_ios_build_temp_dirNdj1nu/temporary_xcresult_bundle

    /Users/omarelnemr/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_apple-2.1.4/ios/Classes/GeolocatorPlugin.m:179:21: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
                        openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
                        ^~~~~~~
                        openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/omarelnemr/Documents/GitHub/authenticated/ios/Pods/Target Support Files/geolocator_apple/geolocator_apple-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:124:1: note: 'openURL:' has been explicitly marked deprecated here
    - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    1 warning generated.
    /Users/omarelnemr/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_apple-2.1.4/ios/Classes/GeolocatorPlugin.m:179:21: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
                        openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
                        ^~~~~~~
                        openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/omarelnemr/Documents/GitHub/authenticated/ios/Pods/Target Support Files/geolocator_apple/geolocator_apple-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:124:1: note: 'openURL:' has been explicitly marked deprecated here
    - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) NS_EXTENSION_UNAVAILABLE_IOS("");
    ^
    1 warning generated.
    error: No Google App ID or Google Services file provided
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/lw/17kwyl0d2yd706_0dnpxtvbm0000gn/T/flutter_tools.cG4HIq/flutter_ios_build_temp_dirNdj1nu/temporary_xcresult_bundle

This is my flutter doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale
    en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version
    31.0.0-rc5)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (1 available)
    ! Error: nemr’s iphone is not connected. Xcode will continue when nemr’s
      iphone is connected. (code -13)
    ! Error: neemmrr is not connected. Xcode will continue when neemmrr is
      connected. (code -13)
    ! Error: nemr’s iphone is not connected. Xcode will continue when nemr’s
      iphone is connected. (code -13)
[✓] HTTP Host Availability

• No issues found!

and my pubspec.yaml for this project:

name: authenticated
description: A new Flutter project.

publish_to: 'none'

version: 1.1.002+1

environment:
  sdk: ">=2.13.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  geolocator: ^8.0.0
  flutter_riverpod: ^1.0.2
  rounded_loading_button: ^2.0.9
  firebase_core: ^1.17.1
  firebase_auth: ^3.3.19
  cloud_firestore: ^3.1.17
  device_info_plus: ^3.1.1
  google_fonts: ^3.0.1
  sliding_up_panel: ^2.0.0+1
  pie_chart: ^5.1.0
  skeletons: ^0.0.3
  flutter_native_splash: ^2.1.1
  anitex: ^3.0.0
  http: ^0.13.4
  firebase_app_check: ^0.0.6+13
  shared_preferences: ^2.0.13
  mocktail: ^0.3.0
  pin_code_fields: ^7.4.0
  local_auth: ^2.1.0
  intl_phone_field: ^3.1.0
  ntp: ^2.0.0
  stop_watch_timer: ^1.4.0
  flutter_countdown_timer: ^4.1.0
  pull_down_button: ^0.1.0-beta.2
  cupertino_icons: ^1.0.4
  firebase_crashlytics: ^2.8.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  integration_test:
    sdk: flutter

  flutter_lints: ^2.0.0

flutter:

  uses-material-design: true
  assets:
    - assets/

I only used crashlytics on app launch in the main function as shown right here:

/// Main (ENTRY POINT)
Future<void> main() async {
  /// Intializing binding before run App
  WidgetsFlutterBinding.ensureInitialized();

  ///Intializing Firebase App
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );

  /// Activate Firebase App Check
  await FirebaseAppCheck.instance
      .activate()
      .onError((error, stackTrace) => print);

  /// Setting Token Auto Refresh to true
  await FirebaseAppCheck.instance.setTokenAutoRefreshEnabled(true);

  /// Uncaught flutter exceptions to firebase
  FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;

  /// Setting Status & Navigation bars to dark color
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);
  SystemChrome.setPreferredOrientations(
      [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);

  /// Running The App
  runApp(

      /// Provider Scope Widget to Ensure Riverpod state shared

      /// across the widget tree..

      const ProviderScope(
          child:

              /// Holds The Material App Widget to specify App Preferences
              MyApp()));
}
darshankawar commented 2 years ago

@nemr0 From the log you shared above, it show different errors and warnings that you'll need to fix as indicated in it.

Recovery Suggestion: Please unlock and reconnect the device.
    User Info: {
        AssociatedMobileDeviceFunction = AMDeviceMountImage;
        DVTRadarComponentKey = 487927;
        NSLocalizedFailure = "The device is locked.";
    }
    --
    The device is locked.

Please keep your device unlocked while running the build.

geolocator_apple-2.1.4/ios/Classes/GeolocatorPlugin.m:179:21: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0

Also, error: No Google App ID or Google Services file provided which probably means you'll need to explicitly provide the file if you are not using dart only initialization.

Also please check earlier comments which seemed to have worked / fixed the issue for others.

google-oss-bot commented 2 years ago

Hey @nemr0. 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!

google-oss-bot commented 2 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@nemr0 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.

pawan20 commented 2 years ago

There're some conflicts between dependencies. I fixed this after trying these commands:

flutter pub upgrade
flutter pub outdated
flutter pub upgrade --major-versions
flutter clean
flutter pub get

Hope this help.

This worked for me...make sure you also do "Flutter upgrade" after

abdel-ships-it commented 2 years ago

I know this comment doesn't answer your question, but why does every flutter firebase plugin upgrade break something? I just upgraded firebase_crashlytics from 2.5.0 to 2.8.4 and now I have to spend hours and hours fixing build issues.

benfgit commented 2 years ago

Upgrading firebase_crashlytics to 2.8.4 gave the same compile error for me as well. Upgrading firebase_core version solved my issue.