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

bug: Capacitor 3.x sync command stopped running on vagrant (or any other virtualization platform) #5069

Closed
mic345 opened this issue Sep 22, 2021 · 1 comment · Fixed by #5144

Comments

@mic345
Copy link

mic345 commented Sep 22, 2021

Bug Report

Use case

In our company we prefer to develop using vagrant which is a box virtualization platform. This allows us all to develop on the exact same environment as production, in addition to dropping and starting boxes at will.

Specifically, we develop our ionic app on vagrant as well, making sure we all use the same ionic configuration (node, ionic, capacitor, etc.) Since virtualizing macOS is more complex, we use amazon linux as the vagrant guest OS and install the missing pod command. Otherwise everything is working smooth using Capacitor 2.x.

Bug

Starting on Capacitor 3.x npx cap sync issues the below error and does not install the iOS pods.
[warn] Skipping pod install on unsupported OS

Capacitor Version

$ npx cap doctor
💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 3.2.3
  @capacitor/core: 3.2.3
  @capacitor/android: 3.2.3
  @capacitor/ios: 3.2.3

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/cli: 3.2.3
  @capacitor/core: 3.2.3
  @capacitor/ios: 3.2.3

[error] Xcode is not installed

Platform(s)

Guest box:

$ uname -a
Linux test.test.app 4.14.243-185.433.amzn2.x86_64 #1 SMP Mon Aug 9 05:55:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Current Behavior

  1. Within the guest box run npx cap sync
  2. Bug: pod installation is skipped even if the command pod is installed.
  3. Cause: the function shouldPodInstall checks the OS instead of checking the command pod existence.

Expected Behavior

Continue with the operation and complete the pods installations, allowing to run xcode from the host.

Code Reproduction

  1. Install vagrant (or any other virtualization platform).
  2. Start an amazon linux box.
  3. On the guest update ruby and install cocoapods
sudo amazon-linux-extras enable -y ruby2.6
sudo yum clean metadata
sudo yum install git ruby ruby-devel ruby-doc gcc gcc-c++ redhat-rpm-config
sudo gem install cocoapods --version 1.11.2
  1. Start a sample ionic project and add ios support
cd /vagrant    # a folder shared both on the host and the guest
project_id="app.test.test"
project_name="Test"
ionic start "$project_name" "sidemenu" --type="angular" --project-id="$project_id" --package-id="$project_id" --capacitor --no-interactive
cd $project_id
ionic cap add "ios"
  1. Install the pods
cd /vagrant/ios/App; pod repo update; pod install
  1. Run npx cap sync

Other Technical Details

$ npm --version
6.14.13

$ node --version
v14.17.0

$ pod --version
1.11.2
@mic345 mic345 changed the title bug: Capacitor 3.x stopped running on vagrant (or any other virtualization platform) bug: Capacitor 3.x sync command stopped running on vagrant (or any other virtualization platform) Sep 22, 2021
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 10, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant