Skip to content

ionic cordova build iOS hangs only when iphone attached to Mac #4156

Closed

Description

@rolinger

Description:
Using cli 5.2.6, running Ionic v1 app - running ionic cordova build iOS hangs the app after this file is compiled ONLY if an iPhone is attached to the Mac. Disconnect the iPhone and it compiles just fine. Running cordova build iOS builds just fine even with an iPhone connected to the Mac.

platforms/ios/build/sharedpch/SharedPrecompiledHeaders/6268428044778614059/MyApp-Prefix.pch.dia

I suspect it "might" be related to Cordova-plugin-firebasex - this is happening with firebasex plugin versions 6x and higher. I brought this to the attention of the plugin owner/developer (Dave Allen) and he believes its a ionic cordova build wrapper issue as the issue doesn't happen when just doing cordova build iOS.

My Environment:

Ionic:

   Ionic CLI         : 5.2.6 (/usr/local/lib/node_modules/ionic)
   Ionic Framework   : ionic1 1.0.0
   @ionic/v1-toolkit : 1.0.22

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, (and 32 other plugins)

Utility:

   cordova-res : 0.6.0 
   native-run  : 0.2.8 

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.2
   NodeJS     : v10.16.3 (/usr/local/bin/node)
   npm        : 6.11.2
   OS         : macOS High Sierra
   Xcode      : Xcode 10.1 Build version 10B61

Plugins:

cl.rmd.cordova.dialoggps 0.0.2 "DialogGPS"
com.lampa.startapp 6.1.6 "startApp"
com.ludei.webview.plus 2.3.0 "Webview+"
com.peerio.cordova.plugin.carrier 1.0.1 "Carrier"
com.phonegap.plugins.nativesettingsopener 1.0.1 "Native settings"
cordova-admobsdk 7.37.0 "Google Mobile Ads SDK for Cordova"
cordova-custom-config 5.1.0 "cordova-custom-config"
cordova-instagram-plugin 0.5.8 "Instagram"
cordova-launch-review 3.1.1 "Launch Review"
cordova-plugin-admobpro 2.37.2 "AdMob Plugin Pro"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-appinfo 2.1.2 "AppInfo Plugin"
cordova-plugin-customurlscheme 4.4.0 "Custom URL scheme"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-device-motion 2.0.1 "Device Motion"
cordova-plugin-device-orientation 2.0.1 "Device Orientation"
cordova-plugin-deviceinformation 2.0.2 "DeviceInformation"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-email 1.2.7 "EmailComposer"
cordova-plugin-extension 1.5.4 "Cordova Plugin Extension"
cordova-plugin-facebook4 6.0.0 "Facebook Connect"
cordova-plugin-fastrde-checkgps 0.9.9 "checkGPS"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-firebasex 6.1.0 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-inappbrowser 3.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-queries-schemes 0.1.1 "App Queries Strings"
cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy"
cordova-plugin-screensize 1.3.1 "screensize"
cordova-plugin-sim 1.3.3 "SIM"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-vibration 3.1.1 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sms-plugin 1.0.0 "Cordova SMS Plugin"
cordova-universal-clipboard 0.1.0 "Clipboard"
cordova.plugins.diagnostic 5.0.0 "Diagnostic"
twitter-connect-plugin 0.6.0 "Twitter Connect"

Activity

  1. theopavan commented on Sep 13, 2019

    @theopavan

    This errors occurs with 'ionic cordova build ios --device' in Ionic 4 too ...
    it's OK with the command 'ionic cordova prepare ios --prod && cordova build ios --device'
    see dpa99c/cordova-plugin-firebasex#5 (comment)

  2. nstokoe commented on Sep 18, 2019

    @nstokoe

    Any updates on this? I'm having the same issue also using the firebasex plugin

  3. rolinger commented on Sep 18, 2019

    @rolinger
    Author

    I upgraded firebasex to v6.1.0 and issue is still happening. The work around still works, but ultimately this needs to be resolved. If I remove the firebasex plugin ionic cordova build ios completes properly, but with the plugin installed in the project it hangs at that same spot every time - it also hangs running ionic cordova run ios too. Because it builds fine with just cordova build ios I suspect the issue must lie with Ionic.

  4. imhoffd commented on Sep 18, 2019

    @imhoffd
    Contributor

    Looks like something in the build process is hanging unless it gets full access to the parent process's stdio streams. I pushed a commit in the Ionic CLI that should fix this.

  5. imhoffd commented on Sep 18, 2019

    @imhoffd
    Contributor

    CLI 5.3.0 is out and should fix this!

  6. nstokoe commented on Sep 19, 2019

    @nstokoe

    I just upgraded to CLI 5.3.0 and it still hangs...

  7. brownoxford commented on Sep 20, 2019

    @brownoxford
    Contributor

    I am also still encountering this problem, and believe that I've narrowed it down to the handoff between ionic cordova compile and cordova compile.

    This works:

    cordova compile ios --debug --device \
      --packageType=development \
      --developmentTeam=MYTEAMID

    This does not, and hangs on ProcessPCH:

    ionic cordova prepare ios --no-interactive --debug --device -- \
      --packageType=development \
      --developmentTeam=MYTEAMID
    $ ionic info
    
    Ionic:
    
       Ionic CLI          : 5.3.0 (/Users/cabernet/.nvm/versions/node/v10.16.3/lib/node_modules/ionic)
       Ionic Framework    : ionic-angular 3.9.8
       @ionic/app-scripts : 3.2.4
    
    Cordova:
    
       Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
       Cordova Platforms : android 8.1.0, ios 5.0.1
       Cordova Plugins   : cordova-plugin-ionic 5.4.4, cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.1, (and 12 other plugins)
    
    Utility:
    
       cordova-res : not installed
       native-run  : 0.2.8 
    
    System:
    
       ios-deploy : 1.9.4
       ios-sim    : 8.0.2
       NodeJS     : v10.16.3 (/Users/cabernet/.nvm/versions/node/v10.16.3/bin/node)
       npm        : 6.11.3
       OS         : macOS Mojave
       Xcode      : Xcode 10.3 Build version 10G8
    
    $ cordova plugin list
    
    cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
    cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
    cordova-plugin-camera 4.1.0 "Camera"
    cordova-plugin-customurlscheme 4.4.0 "Custom URL scheme"
    cordova-plugin-device 2.0.3 "Device"
    cordova-plugin-firebasex 6.1.0 "Google Firebase Plugin"
    cordova-plugin-geolocation 4.0.2 "Geolocation"
    cordova-plugin-headercolor 1.0 "HeaderColor"
    cordova-plugin-ionic 5.4.4 "cordova-plugin-ionic"
    cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
    cordova-plugin-ionic-webview 4.1.1 "cordova-plugin-ionic-webview"
    cordova-plugin-safariviewcontroller 1.6.0 "SafariViewController"
    cordova-plugin-splashscreen 5.0.3 "Splashscreen"
    cordova-plugin-statusbar 2.4.3 "StatusBar"
    cordova-plugin-whitelist 1.3.4 "Whitelist"
    cordova-sqlite-storage 3.3.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
    sentry-cordova 0.16.0 "Sentry"
    

    I've also dumped the process and subprocess objects from Shell.run() in ionic/lib for the failed job, and have attached the output
    as a zip file.

    debug(`proc: ${JSON.stringify(proc)}`);
    debug(`sub: ${JSON.stringify(promise.p)}`);
  8. imhoffd commented on Sep 20, 2019

    @imhoffd
    Contributor

    Thanks @brownoxford. I believe I just forgot to switch on stdio inheritance for prepare and compile.

  9. imhoffd commented on Sep 20, 2019

    @imhoffd
    Contributor

    Ionic CLI 5.4.1 has this fix. Thanks again

  10. brownoxford commented on Sep 20, 2019

    @brownoxford
    Contributor

    Fix confirmed, both in my test case documented on dpa99c/cordova-plugin-firebasex#5 and in my main project fastlane build.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions