1.2 : Mobile build error : Error: ENOENT, no such file or directory

Hi,
since the Meteor 1.2 i fail all my build for android. Actualy i have the following Eror when i do “meteor add-platform android” or “meteor run android” or meteor :

/home/rebolon/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: ENOENT, no such file or directory
at process.chdir (/home/rebolon/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:18:9)
at process.chdir (/home/rebolon/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/graceful-fs/polyfills.js:14:9)
at CordovaProject.runCommands (/tools/cordova/project.js:617:15)
at CordovaProject.buildForPlatform (/tools/cordova/project.js:187:10)
at /tools/cli/commands.js:975:28
at /tools/utils/buildmessage.js:356:18
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:349:34
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:347:23
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at Object.enterJob (/tools/utils/buildmessage.js:321:26)
at /tools/cli/commands.js:970:22
at /tools/utils/buildmessage.js:268:13
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:261:29
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:259:18
at [object Object].
.extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at /tools/utils/buildmessage.js:250:23
at [object Object]..extend.withValue (/tools/utils/fiber-helpers.js:114:14)
at Object.capture (/tools/utils/buildmessage.js:249:19)
at Object.main.captureAndExit (/tools/cli/main.js:270:29)
at /tools/cli/commands.js:957:10
at buildCommand (/tools/cli/commands.js:1012:8)
at Command.main.registerCommand.
.extend.name [as func] (/tools/cli/commands.js:791:12)
at /tools/cli/main.js:1378:23

Here is a more detailed description of my hardware/software

  • My laptop is under Windows 10
  • I use VirtualBox 5.x and an Ubuntu Desktop 15.10 (64bits)

I’ve followed all the steps described in https://github.com/meteor/meteor/wiki/Mobile-Development-Install:-Android-on-Linux so i have installed :

  • Java 8
  • Android Studio (with this : https://paolorotolo.github.io/android-studio/)
  • Run Android Studio to finish installation of SDK
  • Added Android SDK api 22 using Sdk Manager
  • installed missing lib : apt-get install lib32z1 lib32ncurses5 lib32stdc++6
  • setup my env ANDROID_HOME and modified the PATH to add tools and platform-toolsBut it fails.

Any clue to help me (or i return on meteor 1.1) ?
Thanks

It gives me a huge headache :slight_smile: but i’m still on it.
I did a test project (https://github.com/rebolon/meteor-mercanet branch feature/mobile) and i test it on 2 VMs
The first VM is the one described above with meteor 1.2 installed on it and it fails. I moved on branch feature/mobile-1.1 , add the android platform and it still fails (whereas i was used to succeed my meteor 1.1 android build). The error is : Error ENOENT, readdir ‘/home/rebolon/workspace/meteor-mercanet/.meteor/local/cordova-build/platforms/android/ant-build’

The second VM is an ubuntu server with meteor 1.1 installed on it. I cloned the repo and moved on branch feature/mobile-1.1 and the build succeed.

So it seems that the first VM is the origin of the problem.

How to find and fix the problem ?

uname -a gave me :

  • 1fst VM : Linux rebolon-VirtualBox 4.2.0-18-generic #22-Ubuntu SMP Fri Nov 6 18:25:50 UTC 2015 x86_64 x86_64 x86_65 GNu/Linux
  • 2nd VM : Linux meteot 3.19.0-15-generic #15-Ubuntu SMP Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Both has ANDROID_HOME env.

What should i look for ? My aim is to understand and then be able to build the app with Meteor 1.2

Thanks for help

Could you try removing the Cordova build directory (rm -rf /home/rebolon/workspace/meteor-mercanet/.meteor/local/cordova-build)?

The same problem happens :

Error ENOENT, readdir ‘/home/rebolon/workspace/meteor-mercanet/.meteor/local/cordova-build/platforms/android/ant-build’

What are the contents of /home/rebolon/workspace/meteor-mercanet/.meteor/local/cordova-build?

I’m wondering if this could be a permissions problem. Any chance you ran meteor with sudo at one point?

Here is the content :

  • config.xml
  • cordova-tarball-plugins.json
  • hooks
  • local-plugins
  • platforms
  • plugins
  • resources
  • www

I installed meteor with my own user. I only used sudo when installing java/android-studio… with apt-get
But i’m like you, i thought at a permissions problem. I did a chown rebolon:rebolon inside the /home/rebolon/.meteor folder

Ok, so on 1.1 with the ubuntu Desktop VM it still fails,
But, on 1.2 i succeed to build an apk :

Now when i build it’s good.
So i will use one VM for 1.1 (until i move all projects into 1.2) and the other for 1.2

It’s still annoying to not be able to understand why it fails on 1.1