Несколько ошибок при запуске проекта Flutter на симуляторе iOS - PullRequest
0 голосов
/ 17 апреля 2019

Я разрабатываю проект Flutter, и он работал нормально до двух недель назад, когда я поднял версии пакетов для совместимости с androidX.С тех пор у меня было несколько ошибок, которые я исправил, но со вчерашнего дня я застрял на той же самой ошибке, которую, похоже, не могу устранить.

Теперь, когда я пытаюсь запустить проект на iOS, проект собирается, но когда он собирается запустить симулятор, он зависает, и я получаю следующее сообщение об ошибке:

2019-04-17 13:56:20.283677+0200 Runner[21883:6267368]  - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2019-04-17 13:56:20.294070+0200 Runner[21883:6266945] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-04-17 13:56:20.425242+0200 Runner[21883:6266945] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
2019-04-17 13:56:20.425387+0200 Runner[21883:6266945] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2019-04-17 13:56:20.426345+0200 Runner[21883:6266945] Configuring the default Firebase app...
2019-04-17 13:56:20.426395+0200 Runner[21883:6267384] 5.20.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
2019-04-17 13:56:20.477082+0200 Runner[21883:6267383] 5.20.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50801000 started
2019-04-17 13:56:20.479725+0200 Runner[21883:6267383] 5.20.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see *url*)
2019-04-17 13:56:20.484815+0200 Runner[21883:6266945] Configured the default Firebase app __FIRAPP_DEFAULT.
2019-04-17 13:56:20.530844+0200 Runner[21883:6267409] flutter: Observatory listening on http://127.0.0.1:54881/
2019-04-17 13:56:21.026177+0200 Runner[21883:6267427] 5.20.0 - [Firebase/Core][I-COR000004] App with name (null) does not exist.
2019-04-17 13:56:21.027251+0200 Runner[21883:6267382] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fcd6740e330] get output frames failed, state 8196
2019-04-17 13:56:21.027450+0200 Runner[21883:6267382] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fcd6740e330] get output frames failed, state 8196
2019-04-17 13:56:21.028091+0200 Runner[21883:6267382] TIC Read Status [1:0x0]: 1:57
2019-04-17 13:56:21.028235+0200 Runner[21883:6267382] TIC Read Status [1:0x0]: 1:57
2019-04-17 13:56:21.073087+0200 Runner[21883:6266945] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: 0)'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001151ed1bb __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x000000011478b735 objc_exception_throw + 48
    2   CoreFoundation                      0x00000001151394ec _CFThrowFormattedException + 194
    3   CoreFoundation                      0x000000011525f396 -[__NSDictionaryM setObject:forKey:] + 1046
    4   Runner                              0x00000001101ceb34 -[FLTFirebaseAuthPlugin handleMethodCall:result:] + 15636
    5   Flutter                             0x00000001118ac7ba __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 115
    6   Flutter                             0x00000001118c94ac _ZNK5shell21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrIN5blink15PlatformMessageEEE + 166
    7   Flutter                             0x00000001118ccff0 _ZN5shell15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrIN5blink15PlatformMessageEEE + 38
    8   Flutter                             0x000000011191fca7 _ZNSt3__110__function6__funcIZN5shell5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrIN5blink15PlatformMessageEEEE4$_27NS_9allocatorIS9_EEFvvEEclEv + 57
    9   Flutter                             0x00000001118d8e0e _ZN3fml15MessageLoopImpl15RunExpiredTasksEv + 522
    10  Flutter                             0x00000001118dc18c _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26
    11  CoreFoundation                      0x0000000115152f34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
    12  CoreFoundation                      0x0000000115152b32 __CFRunLoopDoTimer + 1026
    13  CoreFoundation                      0x000000011515239a __CFRunLoopDoTimers + 266
    14  CoreFoundation                      0x000000011514ca1c __CFRunLoopRun + 2252
    15  CoreFoundation                      0x000000011514be11 CFRunLoopRunSpecific + 625
    16  GraphicsServices                    0x00000001196931dd GSEventRunModal + 62
    17  UIKitCore                           0x000000011dcf981d UIApplicationMain + 140
    18  Runner                              0x000000010fcd7c04 main + 68
    19  libdyld.dylib                       0x0000000116a2a575 start + 1
    20  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Это выглядит какЕсть несколько ошибок, но я не знаю, являются ли некоторые из них просто предупреждениями или фактическими ошибками.Я думаю, что проблема / проблемы связаны с firebase_auth, firebase_core или другим плагином.

pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  cloud_firestore: ^0.9.0
  firebase_analytics: ^2.0.0
  rxdart: ^0.19.0
  cached_network_image: ^0.5.1
  firebase_auth: ^0.8.0
  intl: ^0.15.7               
  http: ^0.12.0
  shared_preferences: ^0.4.3
  share: ^0.5.3
  flutter_webview_plugin: ^0.3.1
  mailer: ^2.1.2
  flutter_launcher_icons: ^0.7.0
  package_info: ^0.4.0
  flutter_circular_chart: ^0.1.0
  dots_indicator: ^0.0.4
  url_launcher: 4.2.0+1
  webview_flutter: ^0.3.4
  connectivity: ^0.4.2
  vibrate: ^0.0.4
  devicelocale: ^0.1.1
  firebase_core: ^0.3.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

Ответы [ 2 ]

0 голосов
/ 23 апреля 2019

Решено путем создания нового проекта флаттера и копирования всех файлов туда.

Я так и не понял, в чем проблема.

0 голосов
/ 17 апреля 2019

У вас там ответ:

2019-04-17 13: 56: 21.073087 + 0200 Бегун [21883: 6266945] * Завершение работы приложения из-за необработанного исключения «NSInvalidArgumentException», причина: '* - [__ NSDictionaryM setObject: forKey:]: объект не может быть nil (ключ: 0)'

Вы пытаетесь вставить nil в словарь, и вызов поступает из [FLTFirebaseAuthPlugin handleMethodCall:result:]

Похоже, он не может найти учетные данные Firebase.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...