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

Getting the following error with 1.2 when trying to build on Docker #120

Closed
adamgins opened this issue Sep 28, 2015 · 21 comments
Closed

Getting the following error with 1.2 when trying to build on Docker #120

adamgins opened this issue Sep 28, 2015 · 21 comments

Comments

@adamgins
Copy link
Collaborator

Hi, it's been a while... which is good, I guess :-)

Busy looking at upgrading to Meteor 1.2 and initial version seems to be OK on local machine. I am trying to do a build on a linux machine and I am getting the following error:

   While adding plugin
   https://github.com/raix/PushPlugin.git#c4e3aa69c66bde45472e81ac303a9e39020c9cc7
   to Cordova project:
   Cordova error: Failed to fetch plugin https://github.com/raix/PushPlugin.git
   via git.
   Either there is a connection problems, or plugin spec is incorrect:
   Error: "git" command line tool is not installed: make sure it is accessible
   on your PATH.
   (If the error message contains suggestions for a fix, note that this may not
   apply to the Meteor integration. You can try running again with the
   --verbose option to help diagnose the issue.)
INFO[0307] The command [/bin/sh -c bash $METEORD_DIR/on_build.sh] returned a non-zero code: 1

Any ideas, pls?

@verdavaine
Copy link

There is a bug. Directly adding a Cordova plugin (meteor add) with a Git URL doesn't work
Just remove the offending plugins with the bad git urls and then re-add them with the old style urls.
Be cautious , the old style url works up to the 1.2 meteor version. Doesn't work with version 1.2.0.1!

More explanations here :https://forums.meteor.com/t/error-adding-cordova-plugin-from-git-repo/10135/3

@harryward
Copy link
Collaborator

Yea i've been running into these issues myself.

Quick Workaround
if you build it with 'sudo' it allows you to add that cordova plugin. That is the only solutions i've found so far.

sudo meteor build ~/blah/myApp --server http://yourserver.ishere.com

@raix
Copy link
Collaborator

raix commented Sep 30, 2015

Please try raix:push@3.0.0-rc.2

@adamgins
Copy link
Collaborator Author

adamgins commented Oct 1, 2015

@raix thanks.. I tried with the rc.2 and got:

> Errors executing Cordova commands:
   While adding plugin
   https://github.com/meteor/com.meteor.cordova-update.git#16c53f53e438fc8b1b9c768de36f0a8974e38b49
   to Cordova project:
   Cordova error: Failed to fetch plugin
   https://github.com/meteor/com.meteor.cordova-update.git via git.
   Either there is a connection problems, or plugin spec is incorrect:
   Error: "git" command line tool is not installed: make sure it is accessible
   on your PATH.
   (If the error message contains suggestions for a fix, note that this may not
   apply to the Meteor integration. You can try running again with the
   --verbose option to help diagnose the issue.)

@verdavaine
Copy link

When using raix:push@3.0.0-rc2 with meteor run android-device command,
I get the error:
A problem occurred configuring root project 'android'.

Could not resolve all dependencies for configuration ':_debugCompile'.
Could not find any version that matches com.android.support:support-v13:23+.

@raix
Copy link
Collaborator

raix commented Oct 1, 2015

the v3 requires meteor 1.2+

@verdavaine
Copy link

I am using meteor version 1.2.0.2

@adamgins
Copy link
Collaborator Author

adamgins commented Oct 1, 2015

Me too

Adam Ginsburg
adam.ginsburg@buzzy.buzz
tel: +61 411 151 732
http://buzzy.buzz

On 1 Oct 2015, at 10:43 pm, verdavaine notifications@github.com wrote:

I am using meteor version 1.2.0.2


Reply to this email directly or view it on GitHub.

@martijnwalraven
Copy link

The bug with adding plugins through a Git URL mentioned above was fixed in 1.2.0.2, so that shouldn't be the issue here.

I'm not sure if everyone is having the same problem here, but the error message seems to suggest git is not installed:

Error: "git" command line tool is not installed: make sure it is accessible
   on your PATH.

Can you check whether this might indeed be the case?

@martijnwalraven
Copy link

@verdavaine Your issue does not seem related. You may have to install the Android Support Library.

@verdavaine
Copy link

Thank u for your advice but Android Support Library is installed
I have also installed:
Android 6.0 (API23) : SDK Platform
Android SDK Tools Rev 24.4
Android SDK Build-Tools version 23.0.1
Android SDK Platform-tools version 23.1 rc1

2015-10-01 16:13 GMT+02:00 Martijn Walraven notifications@github.com:

@verdavaine https://github.com/verdavaine Your issue does not seem
related. You may have to install the Android Support Library
https://developer.android.com/tools/support-library/setup.html.


Reply to this email directly or view it on GitHub
#120 (comment).

@verdavaine
Copy link

It works now.
Inside plugin.xml from phonegap-plugin-push,
I had to replace framework src="com.android.support:support-v13:23+"
with : framework src="com.android.support:support-v13:23.0.1"

23.0.1 being the version of my Android Support Library

@raix
Copy link
Collaborator

raix commented Oct 1, 2015

3.0.0 is out and working fine on 1.2.0.2
Dont edit the cordova plugin stuff, install Android level 22 (i think the meteor wiki say)
Also...
Meteor reset
Meteor remove-platform ios
Meteor remove-platform android
Add the platforms again....

@adamgins
Copy link
Collaborator Author

adamgins commented Oct 2, 2015

@raix thanks I can build the system on my mac. However on my nitrous.com server I get the error:


   While building Cordova app for platform Android:
   Error: /home/nitrous/buzzy7/.meteor/local/cordova-build/platforms/android/cordova/build: Command failed with exit code 2 Error output:
   [Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
   Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.]
   at ChildProcess.whenDone
   (/home/nitrous/.meteor/packages/meteor-tool/.1.1.9.1j8ejnc++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
   at ChildProcess.emit (events.js:98:17)
   at maybeClose (child_process.js:766:16)
   at Process.ChildProcess._handle.onexit (child_process.js:833:5)

If I remove ios and android platforms it works. I am not sure if this is OK, ie do the server based deployments need this or is this only needed for building the apps?

@martijnwalraven thanks. git is installed on that machine. Looks like @raix fixed that issue... and now I have the new issue above.

as I am using @arunoda meteord looks like this issue is the same: meteorhacks/meteord#51 so I guess I need to wait for that fix or make those changes myself to the docker scripts.

@raix
Copy link
Collaborator

raix commented Oct 2, 2015

@adamgins I haven't fixed this issue specific - I think it might be fixed in meteor or by doing meteor reset + the remove/add platform trick.

The PATH Error you got - it seems link it's expecting the path to the android sdk?

@raix
Copy link
Collaborator

raix commented Oct 2, 2015

(The last part of the Meteor cordova wiki / guide say that it's a good idea to the env vars like $ANDROID_HOME and add it to PATH)

@adamgins
Copy link
Collaborator Author

adamgins commented Oct 2, 2015

Thanks @raix.

Yep, I had that setup on my local machine but was not sure if/how it had to be setup on nitrous( which is Linux with command line / no Desktop?

Adam Ginsburg
adam.ginsburg@buzzy.buzz
tel: +61 411 151 732
http://buzzy.buzz

On 2 Oct 2015, at 9:22 pm, Morten N.O. Nørgaard Henriksen notifications@github.com wrote:

(The last part of the Meteor cordova wiki / guide say that it's a good idea to the env vars like $ANDROID_HOME and add it to PATH)


Reply to this email directly or view it on GitHub.

@adamgins
Copy link
Collaborator Author

adamgins commented Oct 2, 2015

@raix @martijnwalraven thanks for the help. I am going to close the issue here as it's unrelated to push. I still have the issue but I can successfully build my mac and on vanilla meteor install on nitrous without ios and android platforms installed. If I try with the packages I have issues.. but that's related to a separate issue of getting nitrous to install the Android SDK, I think. I have raised this with Nitrous separate.

Separate to that I am trying to build a meteord docker image and the problem still exist there so I have moved it to here meteorhacks/meteord#51

thanks again for your help

@adamgins adamgins closed this as completed Oct 2, 2015
@MichaelJCole
Copy link

@raix Other than removing the collection "_raix_push_notifications" is there really a need for meteor reset?

Here's the Meteor Wiki page describing how to setup for Mobile Dev on Android

I was having this problem while building with mup. Here's what worked for me:

  1. uninstall/reinstall meteor (it didn't delete it's copy of the SDK)
rm -rf ~/.meteor
unset ANDROID_HOME
unset ANDROID_SDK_HOME
sudo rm -rf /usr/local/android-sdk-linux
curl https://install.meteor.com/ | sh
  1. Clean the buil with rm -rf [project]/.meteor/local

  2. meteor remove-platform android ; meteor add-platform android

  3. Reboot

  4. Followed the directions in the wiki above

@andrewbiller
Copy link

I didn't find the answer here, so I'm adding what it worked for my case (meteor with MacOS El Captain). The problem was with my git throwing at command line:

$git
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

git was not working in El Captain mac OS, so I referred to:

http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/

then tried to do it again:

sudo meteor reset
meteor run android

and completed fine.

@Marinofull
Copy link

In my case, the git was installed, and git clone works, so:
this worked in my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants