EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 445 forks source link

Crashlytics: Stack level too deep when building a release build on iOS #837

Open FranciZ opened 6 years ago

FranciZ commented 6 years ago

Can't get release build to work on iOS with Crashalytics enabled. It always fails with the below log. Does the same if I try to run $ pod install inside platforms/ios.

### Podfile

```ruby
use_frameworks!

target "realstashnsapp2" do
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-bottombar/platforms/ios/Podfile 
 use_frameworks!
pod 'MiniTabBar', :git => 'https://github.com/rhanb/MiniTabBar.git'
def post_install1 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end 
 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-facebook/platforms/ios/Podfile 
 pod 'FBSDKCoreKit', '~> 4.7'
pod 'FBSDKLoginKit', '~> 4.7' 
 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-google-maps-sdk/platforms/ios/Podfile 
 source 'https://github.com/CocoaPods/Specs.git'

pod 'GoogleMaps' 
 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-iqkeyboardmanager/platforms/ios/Podfile 
 pod 'IQKeyboardManager', '~> 5.0.0'

 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-loading-indicator/platforms/ios/Podfile 
 pod 'MBProgressHUD'

 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-socket.io/platforms/ios/Podfile 
 pod 'Socket.IO-Client-Swift', '~> 11.0'

 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile 
 pod 'Firebase/Core', '~> 5.1.0' 
pod 'Firebase/Auth'

# Realtime DB
#pod 'Firebase/Database'

# Cloud Firestore
#pod 'Firebase/Firestore'

# Remote Config
#pod 'Firebase/RemoteConfig'

# Crash Reporting
#pod 'Firebase/Crash'

# Crashlytics
pod 'Fabric'
pod 'Crashlytics'

# Crashlytics works best without bitcode
def post_install2 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = "NO"
            config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = "YES"
        end
    end
end

# Firebase Cloud Messaging (FCM)
pod 'Firebase/Messaging'

# Firebase Storage
#pod 'Firebase/Storage'

# AdMob
#pod 'Firebase/AdMob'

# Invites / Dynamic Links
#pod 'Firebase/Invites'

# ML Kit
#pod 'Firebase/MLVision'
#pod 'Firebase/MLVisionTextModel'
#pod 'Firebase/MLVisionBarcodeModel'
#pod 'Firebase/MLVisionFaceModel'
#pod 'Firebase/MLVisionLabelModel'
#pod 'Firebase/MLModelInterpreter'

# Facebook Authentication
#pod 'FBSDKCoreKit'
#pod 'FBSDKLoginKit'

# Google Authentication
#pod 'GoogleSignIn' 
 # End Podfile 

end
def post_install1 (installer)
  post_install1 installer
  post_install2 installer# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-bottombar/platforms/ios/Podfile 
 use_frameworks!
pod 'MiniTabBar', :git => 'https://github.com/rhanb/MiniTabBar.git'
def post_install2 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end 
 # End Podfile 
# Begin Podfile - /Users/francizidar/projects/realstash/realstash-ns-app-2/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile 
 pod 'Firebase/Core', '~> 5.1.0' 
pod 'Firebase/Auth'

# Realtime DB
#pod 'Firebase/Database'

# Cloud Firestore
#pod 'Firebase/Firestore'

# Remote Config
#pod 'Firebase/RemoteConfig'

# Crash Reporting
#pod 'Firebase/Crash'

# Crashlytics
pod 'Fabric'
pod 'Crashlytics'

# Crashlytics works best without bitcode
def post_install3 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = "NO"
            config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = "YES"
        end
    end
end

# Firebase Cloud Messaging (FCM)
pod 'Firebase/Messaging'

# Firebase Storage
#pod 'Firebase/Storage'

# AdMob
#pod 'Firebase/AdMob'

# Invites / Dynamic Links
#pod 'Firebase/Invites'

# ML Kit
#pod 'Firebase/MLVision'
#pod 'Firebase/MLVisionTextModel'
#pod 'Firebase/MLVisionBarcodeModel'
#pod 'Firebase/MLVisionFaceModel'
#pod 'Firebase/MLVisionLabelModel'
#pod 'Firebase/MLModelInterpreter'

# Facebook Authentication
#pod 'FBSDKCoreKit'
#pod 'FBSDKLoginKit'

# Google Authentication
#pod 'GoogleSignIn' 
 # End Podfile 

end
post_install do |installer|
  post_install1 installer
  post_install2 installer
  post_install3 installer
end

### Error

SystemStackError - stack level too deep
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'
/Users/francizidar/projects/realstash/realstash-ns-app-2/platforms/ios/Podfile:96:in `post_install1'

...this repeats for a couple 100 if not thousand lines
DickSmith commented 6 years ago

This is an issue with tns itself that started in 4.0, but should be resolved in 4.2.