iOS KMP Command PhaseScriptExecution failed with a nonzero exit code - ios

I have a Kotlin multiplatform project, I can build Android app, but I cannot build iOS app. The full error message below.
Exception in thread "main" java.lang.Error: /var/folders/2d/bfr1v4wn0nd926jj62ztw0m80000gn/T/9075457888541413881.m:1:9: fatal error: module 'FirebaseFirestore' not found
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:68)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:14)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:515)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:266)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:76)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:38)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:60)
:shared:firebase:messaging:cinteropFirebaseMessagingIos (Thread[Execution worker for ':' Thread 4,5,main]) completed. Took 6.427 secs.
Please help me on this, thank you so much.

If you dive deeper into the stacktrace you can find that cinterop fails with: module FirebaseFirestore not found
Possible solutions:
Make sure you reference firebase pods properly with the cocoapods gradle plugin: FirebaseFirestore instead of Firebase/Firestore for ex.
Check out the following issues if 1) is not a problem https://youtrack.jetbrains.com/issue/KT-42038 and
https://youtrack.jetbrains.com/issue/KT-47935

Related

Error: The superclass, 'PictureProvider<AdvancedNetworkSvg>', has no unnamed constructor that takes no arguments. Flutter_advanced_networkimage

I have a project that was working fine, but after the flutter update,
i got many errors because of the outdated podfile, that i tried to solve with some
recommandations found on different blogs.
now i have this as the current last error i have to solve,
Has anybody faced this problem with a Flutter app please?
../../../Flutter/.pub-cache/git/flutter_advanced_networkimage-f0f599fb89c494d9158fb6f13d4870582f8ecfcb/lib/src/provider/flutter_advanced_networksvg.dart:17:9: Error: The superclass, 'PictureProvider<AdvancedNetworkSvg>', has no unnamed constructor that takes no arguments.
const AdvancedNetworkSvg(
^^^^^^^^^^^^^^^^^^
Command PhaseScriptExecution failed with a nonzero exit code
my pubspec.yaml looks like this fr this dependency
flutter_advanced_networkimage:
git:
url: https://github.com/mchome/flutter_advanced_networkimage
ref: master

Getting error while trying to run ionic cordova build ios . Found multiple specifications for `FirebaseAuth (6.5.3)`:

Installing "cordova-plugin-firebase-authentication" for ios
Running command: pod install --verbose
[!] Found multiple specifications for FirebaseAuth (6.5.3):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.2):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.1):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
Failed to install 'cordova-plugin-firebase-authentication': Error: pod: Command failed with exit code 1 Error output:
[!] Found multiple specifications for FirebaseAuth (6.5.3):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.3/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.2):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.2/FirebaseAuth.podspec.json
[!] Found multiple specifications for FirebaseAuth (6.5.1):
/Users/vs/.cocoapods/repos/cocoapods/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
/Users/vs/.cocoapods/repos/trunk/Specs/6/3/6/FirebaseAuth/6.5.1/FirebaseAuth.podspec.json
at ChildProcess.whenDone (/users/vs/documents/ionicprojects/tripper-app/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket. (internal/child_process.js:443:11)
at Socket.emit (events.js:315:20)
at Pipe. (net.js:674:12)
[ERROR] An error occurred while running subprocess cordova.
cordova platform add ios exited with exit code 1.
pod repo remove master
This will delete all your repo what is not working or broken.

cordova-plugin-facebook4 - iOS build fails with error code 65, probably because of missing native dependencies

phonegap build ios fails with the following error message:
The following build commands failed:
CompileC /Users/user/Library/Developer/Xcode/DerivedData/MyApp-dtsdztgswtsnnubosnumqjssdpaj/Build/Intermediates.noindex/MyApp\ App.build/Debug-iphonesimulator/MyApp\ App.build/Objects-normal/x86_64/FacebookConnectPlugin.o /Applications/MAMP/htdocs/MyApp/platforms/ios/MyApp\ App/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Command finished with error code 65: xcodebuild -workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Applications/MAMP/htdocs/MyApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/MAMP/htdocs/MyApp/platforms/ios/build/sharedpch
(node:3817) UnhandledPromiseRejectionWarning: Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/Applications/MAMP/htdocs/MyApp/node_modules/cordova-common/src/superspawn.js:135:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:3817) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3817) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
These are my plugin versions:
phonegap cli: 8.0.0
cordova-ios: 5.0.1
phonegap-plugin-facebook4: 6.2.0
Additional Context
I managed to solve the issue by manually editing my Podfile and adding the following lines to it, then running cd platforms/ios && pod install:
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
After that, phonegap build ios completed succesfully.
Could it be that somehow native dependencies aren't being added?
It would be ideal not having to add these back every time I remove and re-add the platform, and adding them in a build hook sounds veeeeeeery hacky.
In my case i have permission related issue so that's why i give permission to ($user)/.cocoapods but not working
then i have delete that folder and then pod install command fire in ($app_folder)/platform/ios and
it will install all the files of facebook 'FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit' in to the ios platform
might it will help you too.
This means that you have an error on
App/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m
if you go to xcode and check that file , you will see the missing classes. I think that you are using a SDK not supported by the plugin, so I recommend you to change to cordova-plugin-facebook-connect that support last facebook sdks (9.0.0)
https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#readme

Dart libsass compiles correctly but will not run

I've follow the instructions for dart libsass at:
https://github.com/oddrationale/dart_libsass
The compile step completes correctly. However - when i try and execute sassd.dart i get the following:
dart bin/sassd.dart ~/projects/web_apps_dart/lib/client/components/picker/picker.scss ~/Desktop/test.css
Cannot find extension library'package:libsass/libsass.dart': error: line 10 pos 1: library handler failed
import 'dart-ext:libsass/src/sass_extension';
^
Cannot find initialization function in extension'package:libsass/libsass.dart': error: line 10 pos 1: library handler failed
import 'dart-ext:sass_extension';
^
sass_extension.cc exists at ~/lib/src/sass_extension.cc
Question: How do we correctly import the sass_extions.cc file in recent builds of Dart?
I'm the author/maintainer of dart_libsass.
I got your bug report on GitHub and resolved the issue there. The issue was with the build script not the sass_extension.cc file itself. If you have any other issues, let's continue the discussion on the GitHub issues page. Thanks!

Swift compiler error on Xcode 6

I have problems with Swift Compiler:
I created new project for iOs on latest Xcode 6 and tried to build - recieved 2 errors with ViewController.swift and AppDelegate.swift.
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
<unknown>:0: error: unable to execute command: Bus error: 10
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
I can post a full logs if if it is necessary.
What should i do? Thanks.
I have faced a similar issue while working with a swift project. I found this on Apple Support Website. It says that this type of error occurs when you tried to access an non-existent/inaccessible memory address. To solve the issue you can quit unused applications or even restart the mac which will probably help you.

Resources