Ionic Package Build Android failed - dont understand error message - android

This is the error message:
Fetching plugin "cordova-plugin-device" via npm
shell.js: internal error
Error: ENOSPC, no space left on device '/home/package/workspace/apps-483d2a0c-2/cordova/plugins/cordova-plugin-device/src/blackberry10'
at Error (native)
at Object.fs.mkdirSync (fs.js:747:18)
at cpdirSyncRecursive (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:58:8)
at cpdirSyncRecursive (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:73:7)
at /usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:180:9
at Array.forEach (native)
at Object._cp (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:157:11)
at Object.cp (/usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/common.js:186:23)
at copyPlugin (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:289:15)
at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:159:27
working on cloud9. tried to package simple app.
Command was:
ionic package build android
can someone explain me what this error means?

The error means there is no space left on your disk (in cloud9).

Related

Unable to apply changes on device: DEVICE####. Error is: Cannot read property 'env' of undefined

I get this issue after my first android build; then, before that, the project run in development in the device and even in an emulator. Also the error happens in the emulator too.
I has been researching about that. Update to the current last versions of NativeScript tns-android: 5.4.0 tns-core-modules: 5.4.3 nativescript-vue: 2.2.2, also update the firebase plugin nativescript-plugin-firebase: 9.0.1. And this doesn’t allows me to continue the project. I am so frustrated in this moment about this issue.
Unable to apply changes on device: DEVICE####.
Error is: Cannot read property 'env' of undefined.
Using the --log trace this is shown
Will emit event liveSyncError with data { error:
{ Error: Command ./gradlew failed with exit code 1
at Errors.fail (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:126:28)
at Errors.failWithoutHelp (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:136:21)
at AndroidProjectService.<anonymous> (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:666:34)
at Generator.throw (<anonymous>)
at rejected (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:11:65)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
name: 'Exception',
message: 'Command ./gradlew failed with exit code 1',
stack: 'Error: Command ./gradlew failed with exit code 1\n at Errors.fail (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:126:28)\n at Errors.failWithoutHelp (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/common/errors.js:136:21)\n at AndroidProjectService.<anonymous> (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:666:34)\n at Generator.throw (<anonymous>)\n at rejected (/Users/user/.nvm/versions/node/v8.14.1/lib/node_modules/nativescript/lib/services/android-project-service.js:11:65)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:189:7)',
errorCode: 127,
suppressCommandHelp: true,
proxyAuthenticationRequired: false,
printOnStdout: undefined },
.
.
.
Thanks in advance for any help, this has totally block the development of the project.
this error is expected if you are trying to use nativescript-dev-webpack#next with latest official version of NativeScript CLI (5.4.2) as they are not compatible with one another (preparing for NativeScript 6.0 release).
If you would like to use nativescript-dev-webpack#next you will need to install nativescript#next as well.
Hope this helps!

bundling failed: Error and 404 when running React-Native project

I have a React-Native application which I'm running with npm start -- --reset-cache. Then I run react-native run-android.
However, I'm getting this issue in the console of the npm server:
Bundling `index.js` [development, non-minified] 0.0% (0/1), failed.
error: bundling failed: Error
at DependencyGraph._getAbsolutePath (/myProjectPath/node_modules/metro-bundler/src/node-haste/DependencyGraph.js:305:11)
at DependencyGraph.getDependencies (/myProjectPath/node_modules/metro-bundler/src/node-haste/DependencyGraph.js:283:4236)
at Resolver.getDependencies (/myProjectPath/node_modules/metro-bundler/src/Resolver/index.js:129:5)
at /myProjectPath/node_modules/metro-bundler/src/Bundler/index.js:642:39
at Generator.next (<anonymous>)
at step (/myProjectPath/node_modules/metro-bundler/src/Bundler/index.js:13:1336)
at /myProjectPath/node_modules/metro-bundler/src/Bundler/index.js:13:1496
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
And then, in the Android emulator, I'm getting:
The development server returned response error code: 404
URL: http//10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false
Body:
{"message": "Cannot find entry file index.js in any of the roots"
This confuses me. Why is it looking for index.js instead of index.android.js, since I am on an Android emulator?
Any idea about how I can fix this issue?
After version 0.49.1 index.android.js and index.ios.js files were merged into one file.
https://github.com/facebook/react-native/issues/16208
I understand that you will have to upgrade the applications in the old version.I guess this transition will be difficult.

Deploy Apps with Ionic Package

I figured i would try the 'new' CLI tool for Ionic, Package, but i am getting some weird errors that i haven't seen before.
When running the command :
ionic package build android --profile release
The error i am getting
undefined:0
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/io-config.js:179:28
at fs.js:271:14
at Object.oncomplete (fs.js:107:15)
After some research i found that this can happen when a command is run without sudo, but when running the command with sudo i am getting the dam error message.
Hopefully i am lucky and ill find an Ionic enthusiast who might help me with the matter. Couldn't find any Ionic related topics where this error was mentioned.
Any help appreciated!
I had to add [] to the .io-config.json file in the root directory of my ionic app.
Btw. dont forget to install ionic add ionic-platform-web-client
The solution for me was annoyingly simple. In the file mentioned, find the line where CONFIG_BACKUP is defined and change it. You should see that it is:
var CONFIG_BACKUP = './.io-config.json'
It should actually be:
var CONFIG_BACKUP = './io-config.json'
I was building for iOS but had the same error as you which disappeared after the above.
For me the error resulted from the config.xml file. I would open all ionic files to make sure there are no formatting errors. The rebuild

can't deploy my AppBuilder project on android device

I have to test my hybrid mobile application on my android device,I have selected "USB debugging" in my phone and I have selected the "Unknown sources" option,but when I try to deploy my application in my mobile I get this error:
Building package: [D:\WebMobile\test\backupsProjetWebMobile2\KendoUITabStrip1\obj\Debug\MyProjet.zip]
Project files uploaded to the cloud.
Sending build request for project MyProjet with parameters ProjectTypeGuids={070BCB52-5A75-4F8C-A973-144AF0EAFCC9}
Platform=Android
Configuration=Debug
LiveSyncToken=5uW/86s7080iMfWs0yNn+vJIKWo6n1qh4Lpa8kEnoUNFIaJOOQSDimQ9e0N6ELxXgt2bTOb/Xp6eRqCttuaoxQCzlLku533tlF1hvwrKPpxPeX/CfV/aGFN8Wr6MJl4D.
C:\Users\Client\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\zc3hmmck.xbh\Targets\Build.targets(189,3): error : Server build failed. Server output: Project "MyProjet.tmp.proj" (default targets):
android Build Tooling revision 2015.11.03.5r
Warning: Failed to install 'cordova-plugin-mapbox':Error: Variable(s) missing: ACCESS_TOKEN
at /home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/cordova-lib/cordova-lib/src/plugman/install.js:324:23
at _fulfilled (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:749:13)
at /home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:557:44
at flush (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Warning: Variable(s) missing: ACCESS_TOKEN
Warning: /home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189
Warning: throw Error("exit code: " + code);
^
Warning: Error: exit code: 1
at Error (<anonymous>)
at ChildProcess.<anonymous> (/home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189:14)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
Error: Build failed during execution
Error: 'Build failed with error code 8'
Done building project "MyProjet.tmp.proj" -- FAILED.
.
Done building project "MyProjet.iceproj" -- FAILED.
Build FAILED.
I work with Telerik-AppBuilder visual Studio 2015 extension(kendo-ui) my android phone is Samsung Galaxy Star Duos GT-S7262 version 4.1.2
any help please and thanks
update:
I have folloewed this link [https://github.com/Telerik-Verified-Plugins/Mapbox] but I get this error:1
C:\Users\Admin>cordova plugin add https://github.com/Telerik-Verified-Plugins/Mapbox --variable ACCESS_TOKEN=my.access.token
Current working directory is not a Cordova-based project.
I have installed the cordova-plugins with npm,but I still get the problem :(
So the question boils down to: how in Visual Studio do you provide Cordova variables to plugins?
(You tried adding the plugin from the c:/users/admin folder which is not your project folder, that's why the Cordova CLI said: "Current working directory is not a Cordova-based project.")
I'm assuming you're using the AppBuilder extension for Visual Studio. If so, please read this doc, especially about how to configure variables:
http://docs.telerik.com/platform/appbuilder/creating-your-project/using-plugins/using-verified-plugins/install-verified-plugins

react-native running tutorial 'AwesomeProject' on Android results in 'Unable to download JS Bundle' red screen

I am following this Facebook tutorial, and when running react-native run-android from AwesomeProject dir, I am getting a red screen on the android emulator, with the following text:
Unable to download JS bundle. Did you forget to start the development server or connect your device?
onResponse
DevServerHelper.java:175
run
NamedRunnable.java:33
runWorker
ThreadPoolExecutor.java:1113
run
ThreadPoolExecutor.java:588
run
Thread.java:818
I don't know if it's related, but I'm also getting a bunch of SyntaxErrors on the server regarding const not being valid in strict mode (I did not change anything in the original code) and getting the following error on START:
< START> request:/index.android.bundle?platform=android
TypeError: Cannot read property 'root' of null
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
at tryCallOne (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
Update
Upgrading to Node v4.1.1 got rid of the const syntax error, but I still get the same result with the following error on React Packager:
TypeError: Cannot read property 'root' of null
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
at tryCallOne (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
[5:02:20 PM] request:/index.android.bundle?platform=android
[5:02:20 PM] find dependencies
TypeError: Cannot read property 'root' of null
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
at tryCallOne (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/lib/core.js:103:15
at flush (/Users/tome/projects/reactNative/AwesomeProject/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
[5:02:26 PM] request:/index.android.bundle?platform=android
I managed to solve the issue. To anyone else who encounters the issue, re-installing watchman did the trick for me:
brew uninstall watchman
brew install watchman
My app is now running
Also, I tried the Wathman install/uninstall route, with not much luck. What did work was making sure I updated and changed the version of node as used by nvm.
e.g. nvm install 4.1.1

Categories

Resources