cocoonjs fail to add webview plus - android

I have a problem setting up cocoon according to their manual at:
http://support.ludei.com/hc/en-us/articles/202568973-First-steps-with-CocoonJS-CLI
When I try to do:
cocoonjs plugin add com.ludei.webview.plus
I get the error:
[CocoonJS] Executing command 'plugin add com.ludei.webview.plus'
[CocoonJS] Installing Webview+ in your Cordova Project.
[CocoonJS] The command `android` failed. Add the platform-tools/ as well as the tools/ directory to your PATH environment variable.
But I already have those in my path:
ANDROID_HOME=/home/gerard/adt-bundle-linux-x8664-20140702/sdk
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/gerard/gcc-arm-none-eabi-48-2014q3/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
This configuration is working with phonegap, I am trying switch to cocoonjs now but this seems to go wrong.
Can anyone tell me what can be wrong else than the PATH problem?

Related

Errors when building : no source map reference + remove sentry-cordova exited with exit code 1

I'm trying to build my ionic app for android and most users have a white screen after the splashscreen. I've past the past week to try to determine where it could come but got no idea... So I'm trying to get rid of all the errors I have when building. (it still succed to build with the errors and worked on almost half phones).
First one is here :
Building for Android...
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin remove sentry-cordova exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
> cordova.cmd plugin remove sentry-cordova Sentry: running before_plugin_rm - set SENTRY_SKIP_WIZARD=true to skip this angular.json build.json build_android.sh build-extras.gradle CertificateSigningRequest.certSigningRequest
...
tslint.json www Uninstalling sentry-cordova from android Subproject Path: CordovaLib Subproject Path: app Uninstalling sentry-cordova from browser js-module uninstall called : plugins\sentry-cordova\dist\js\sentry-cordova.bundle.js Uninstalling sentry-cordova from ios Removing "sentry-cordova" Removing sentry-cordova from package.json doc.find is not a function
Second one is after, there is multiples lines like this :
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/1-es5.1922
I'm pretty sure I miss some informations. Don't hesitate to ask if necessary but I'm sure I forget to do something, but i'm kinda desperate now...
EDIT : Here is the begining of the script I'm using for build :
echo "Building for Android..."
#npm run android:build:prod
sentryRemove=$(ionic cordova plugin remove sentry-cordova)
echo $sentryRemove
sentryAdd=$(cordova plugin add sentry-cordova)
echo $sentryAdd
echo "successfully added the sentry. \n Performing build now."
appBuildOut=$(ionic cordova build android --prod --release --source-map)
echo $appBuildOut
BUILD_MESSAGE='BUILD SUCCESSFUL'
Thanks for your help
The first question is why are you running a plugin remove command when building your app, if I understand correctly. I would check what is calling this command because the script that is erroring before_plugin_rm should only be called when the plugin is being removed.
To get this script to just work, try running with the environment variable SENTRY_SKIP_WIZARD=true and see if the build works. I don't think the reason for the white screen is related to Sentry as the step that is failing looks to be related to source map uploading.

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

How to use phonegap-facebook-plugin in ionic?

I'm building an app in ionic/Cordova in which I want my users to be able to log in using Facebook. So I'm trying to install the PhonegapFacebookPlugin that I found on ngCordova.com.
The first thing that I noticed was that the docs on the ngCordova.com website for installing the plugin on Android are different from the docs on the project's github docs. So I first tried using the (simpler) instructions on the github page first, which after installing and trying to use the following code:
facebookConnectPlugin.login(['email'],
function(data){ console.log(JSON.stringify(data));},
function(error){console.log(error);});
led to these errors:
file:///android_asset/www/lib/phonegap-facebook-plugin-master/facebookConnectPlugin.js: Line 181 : Uncaught ReferenceError: require is not defined
file:///android_asset/www/js/app.js: Line 23 : Uncaught TypeError: Cannot read property 'Keyboard' of undefined
file:///android_asset/www/lib/ionic/js/ionic.bundle.js: Line 19387 : TypeError: Cannot call method 'login' of undefined
at Scope.$scope.fbLogin (file:///android_asset/www/js/controllers.js:10:31)
at $parseFunctionCall (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20124:18)
at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:50863:9
at Scope.$eval (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22178:28)
at Scope.$apply (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22276:23)
at HTMLButtonElement.<anonymous> (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:50862:13)
at HTMLButtonElement.eventHandler (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:10823:21)
at triggerMouseEvent (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2811:7)
at tapClick (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2800:3)
at HTMLDocument.tapTouchEnd (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2918:5)
After running into these errors, I tried continuing with the more extensive installation instructions on the ngCordova website, but the following command:
android update project --subprojects --path "platforms/android" --target android-19 --library "com.phonegap.plugins.facebookconnect/FacebookLib"
led to the following error:
Resolved location of library project to: /Users/kramer65/repos/my-app/platforms/android/com.phonegap.plugins.facebookconnect/FacebookLib
Error: Project folder '/Users/kramer65/repos/my-app/platforms/android/com.phonegap.plugins.facebookconnect/FacebookLib' is not a valid directory.
Error: No Android Manifest at: /Users/kramer65/repos/my-app/platforms/android/com.phonegap.plugins.facebookconnect/FacebookLib
This makes sense, because there is no folder called com.phonegap.plugins.facebookconnect/ in the platforms/android/ folder. I don't really know why not though. Do I need to copy-paste it there? Or did something go wrong in a previous step?
I'm stuck here and I really need to get this working. Any help would be greatly appreciated!

./create-android-project.sh: line 103: /home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/sdk/tools/android: No such file or directory

I am trying to build project of cocos2dx in my eclipse.whenever I am try to run ./create-android-project.sh command on my terminal its gives me an error saying :-
Now cocos2d-x supports Android 2.2 or upper version
./create-android-project.sh: line 103: /home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/sdk/tools/android: No such file or directory
input target id:
I have made every change as per suggested in this tutorial :- http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started
I have changed the following lines :-
# set environment paramters
NDK_ROOT_LOCAL="/home/laschweinski/android/android-ndk-r8d"
ANDROID_SDK_ROOT_LOCAL="/home/laschweinski/android/android-sdk-linux_86"
to
NDK_ROOT_LOCAL="/home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/android-ndk-r10d"
ANDROID_SDK_ROOT_LOCAL="/home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/sdk"
in create-android-project.sh shell script.
have also provided path of my NDK in build_native.sh.
Can anyone tell me that where I am lacking in building this project. Any help will be appreciated. I am working on Ubuntu.
Thanks.

Jenkins-CI SCP Plugin cannot find files to upload

I have Jenkins-CI compiling an Android app I'm working on. Compiles it great but it will not upload the release apk via SCP. I have set the source to bin/* and it gives me the following error. Does anyone have a suggestion on what I have configured wrong? I've had it working in the past, but I forgot to get the config before I re-installed Fedora on the machine.
[SCP] Connecting to smccloud.com
ERROR: Failed to upload files
2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1741)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1758)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1715)
at be.certipost.hudson.plugin.SCPSite.upload(SCPSite.java:188)
at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:218)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
at hudson.model.Build$RunnerImpl.post2(Build.java:161)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE
I encountered this error when I was trying to copy to a directory that didn't exist on the target machine. Create the directory(s) on the target first and this should go away and the copy work.
On the target machine you are seeing something like:
No such file or directory
when you try to navigate to the non-existent directory.
If the plugin isn't working for you can use the shell script with expect, as a post build step, to do it for you.

Categories

Resources