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_analytics] Crashing iOS app on startup #1900

Closed
trqalothman opened this issue Jan 29, 2020 · 3 comments
Closed

[firebase_analytics] Crashing iOS app on startup #1900

trqalothman opened this issue Jan 29, 2020 · 3 comments
Labels
type: bug Something isn't working

Comments

@trqalothman
Copy link

Describe the bug
When I add the firebase_analytics: ^5.0.10 to my pubspec.yaml file iOS app will not run in debug mode, android runs fine. If I remove it and add "pod 'Firebase/Analytics' " to my pod file, everything works fine, both android and iOS.

All instructions specify that adding to pubspec should be enough for both OS.

To Reproduce
pubspec:

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  provider: ^3.2.0
  intl: ^0.16.0
  admob_flutter: ^0.3.4
  geolocator: ^5.1.5
  url_launcher: ^5.4.1
  http: ^0.12.0+2
  flutter_sticky_header: ^0.4.0
  share: ^0.6.3+5
  sqflite: ^1.2.0
  path_provider: ^1.5.1
  firebase_core: ^0.4.3+2
  # firebase_analytics: ^5.0.10

podfile:

platform :ios, '10.0'

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  pod 'Firebase/Core'
  # pod 'Firebase/AdMob'
  # pod 'Firebase/Analytics'
  pod 'Google-Mobile-Ads-SDK'
  pod 'GoogleMobileAdsMediationAppLovin'
  pod 'GoogleMobileAdsMediationUnity'

Additional context
Debug console:

Configuring the default Firebase app...
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001131ec6fb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x0000000112790ac5 objc_exception_throw + 48
	2   CoreFoundation                      0x00000001131ec555 +[NSException raise:format:] + 197
	3   Runner                              0x000000010acf7b8c +[FIRApp addAppToAppDictionary:] + 284
	4   Runner                              0x000000010acf6d50 +[FIRApp configureWithName:options:] + 1312
	5   Runner                              0x000000010acf66ef +[FIRApp configureWithOptions:] + 143
	6   Runner                              0x000000010acf6645 +[FIRApp configure] + 165
	7   Runner                              0x000000010af376e6 -[FLTFirebaseAnalyticsPlugin init] + 214
	8   Runner            <…>

Please help me overcoming this problem. Thanks.

@trqalothman trqalothman added the type: bug Something isn't working label Jan 29, 2020
@iapicca
Copy link

iapicca commented Jan 30, 2020

Hi @trqalothman
can you please provide your flutter doctor -v
and your flutter run --verbose
Thank you

@iapicca iapicca added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Jan 30, 2020
@trqalothman
Copy link
Author

trqalothman commented Jan 30, 2020

Hello @iapicca
Thank you for your response

I removed pod 'Firebase/Core' from the pod file, and I am running this without FirebaseApp.configure()in theAppDelegate.swift`

Hope this will help, thanks for your time and efforts.

flutter doctor -v:

    • Flutter version 1.14.6-pre.51 at /Users/Tareq/flutter
    • Framework revision bc5ea0a05a (2 days ago), 2020-01-27 23:56:41 -0800
    • Engine revision c4229bfbba
    • Dart version 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/Tareq/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2, Build version 10E125
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.41.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.7.1

[✓] Connected device (2 available)
    • AOSP on IA Emulator • emulator-5554                        • android-x86 • Android 9 (API 28) (emulator)
    • iPhone Xʀ           • 1D5B2C13-1E4B-4F00-A305-6CDB2E60343F • ios         • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

• No issues found!```

==========================================

**`flutter run --verbose`:**

```[  +31 ms] executing: [/Users/Tareq/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +44 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] bc5ea0a05af5af67489a04cf580e4658a8214982
[        ] executing: [/Users/Tareq/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +30 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.14.5-51-gbc5ea0a05
[  +11 ms] executing: [/Users/Tareq/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +12 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [/Users/Tareq/flutter/] git ls-remote --get-url origin
[  +12 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +57 ms] executing: [/Users/Tareq/flutter/] git rev-parse --abbrev-ref HEAD
[  +13 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[   +5 ms] executing: sw_vers -productName
[  +15 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +16 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15.2
[        ] executing: sw_vers -buildVersion
[  +14 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19C57
[  +28 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +33 ms] executing: /Users/Tareq/Library/Android/sdk/platform-tools/adb devices -l
[   +9 ms] Exit code 0 from: /Users/Tareq/Library/Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
           emulator-5554          device product:sdk_gphone_x86_arm model:AOSP_on_IA_Emulator device:generic_x86_arm transport_id:3
[  +24 ms] executing: /Users/Tareq/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[  +60 ms] executing: /usr/bin/xcode-select --print-path
[   +7 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +1 ms] executing: /usr/bin/xcodebuild -version
[ +110 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[   +1 ms] Xcode 10.2
           Build version 10E125
[   +4 ms] /usr/bin/xcrun simctl list --json devices
[ +295 ms] /Users/Tareq/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop
[  +40 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +68 ms] More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
[   +3 ms] ro.hardware = ranchu
[   +4 ms] AOSP on IA Emulator • emulator-5554                        • android-x86 • Android 9 (API 28) (emulator)
[   +1 ms] iPhone Xʀ           • 1D5B2C13-1E4B-4F00-A305-6CDB2E60343F • ios         • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
[  +13 ms] "flutter run" took 783ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:27:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:325:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:619:11)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:537:33)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#5      _rootRun (dart:async/zone.dart:1126:13)
#6      _CustomZone.run (dart:async/zone.dart:1023:19)
#7      _runZoned (dart:async/zone.dart:1518:10)
#8      runZoned (dart:async/zone.dart:1465:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:527:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:338:21)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#14     _rootRun (dart:async/zone.dart:1126:13)
#15     _CustomZone.run (dart:async/zone.dart:1023:19)
#16     _runZoned (dart:async/zone.dart:1518:10)
#17     runZoned (dart:async/zone.dart:1465:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:288:19)
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:112:14)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:231:18)
#24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:22)
#25     _rootRun (dart:async/zone.dart:1126:13)
#26     _CustomZone.run (dart:async/zone.dart:1023:19)
#27     _runZoned (dart:async/zone.dart:1518:10)
#28     runZoned (dart:async/zone.dart:1502:12)
#29     run.<anonymous closure> (package:flutter_tools/runner.dart:62:18)
<asynchronous suspension>
#30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#31     _rootRun (dart:async/zone.dart:1126:13)
#32     _CustomZone.run (dart:async/zone.dart:1023:19)
#33     _runZoned (dart:async/zone.dart:1518:10)
#34     runZoned (dart:async/zone.dart:1465:12)
#35     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#36     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#37     run (package:flutter_tools/runner.dart:51:10)
#38     main (package:flutter_tools/executable.dart:65:9)
#39     main (file:///Users/Tareq/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)```

@trqalothman
Copy link
Author

I apologize, it was my mistake, accidentally, i used an old GoogleService-Info.plist
It is working fine now, thanks!

@iapicca iapicca removed the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Feb 12, 2020
@firebase firebase locked and limited conversation to collaborators Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants