CODE-PUSH unable to release on VSTS - android

While trying to release via code-push on VSTS getting the following error:
Unable to find or read "config.xml" in the CWD. The "release-cordova" command must be executed in a Cordova project folder
2017-11-21T09:22:35.1120732Z [Error] Unable to find or read "config.xml" in the CWD. The "release-cordova" command must be executed in a Cordova project folder.
2017-11-21T09:22:35.1200947Z ##[debug]Finished Building Command: node d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\code-push-cli\script\cli logout
2017-11-21T09:22:36.2276558Z ##[debug]task result: Failed
2017-11-21T09:22:36.2295997Z Command failed: release-cordova
2017-11-21T09:22:36.2326120Z ##[debug]Processed: ##vso[task.complete result=Failed;]Command failed: release-cordova
Here's the screenshot attached of the problem:
For the detailed log: https://drive.google.com/open?id=1SMk0N47A8OGm5PDUk5e86sPygmMAjD5X

In order to trouble shooting for this error:
Please add two tasks before CodePush task:
1) Add npm task with this setting
https://drive.google.com/open?id=1H4bWAMruzfOs90xOLxgjadAd7DihaVH4
2)After npm task, add Command Line task with below setting
https://drive.google.com/open?id=1bxd54kVgW4zGRwhsH_JKz_cjc1wYZ-No
Then check if the Cordova command can execute correctly
Then if you have specified the variable Build.SourceDirectory
as $(Build.SourcesDirectory)\path to your app
remove it (the variable) as you have already specified the path in GET SOURCES
You do not need to add the “Build.SourceDirectory” variable in this condition. And now, you specified the working directory to “d:\a\3\s\app path” which should not exist on the build agent, but the task didn’t report that error.
The task indicated that it cannot find the config.xml since the file exist under “d:\a\3\s” rather than “d:\a\3\s\app path”.
Thus remove the “Build.SourceDirectory” variable and run the build to check
The above steps should work for the given 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.

Nativescript, Unable to make changes on device. error is: cannot read property 'startsWith' of null

I ran tns run android in my Windows 10 Command prompt with administrator privelleges.
Upon execution i get this error
C:\Users\Work\tns-station\Hello>tns run android
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Copying template files...
Unable to apply changes on device: 192.168.28.102:5555. Error is: Cannot read property 'startsWith' of null.
Please what is the problem.
Note: "I ran this command in my apps directory".
Might be unrelated, but I had the same error message and it turned out that my HTTPS_PROXY environment variable was incorrect (incorrectly started with an '=' in my case).
Check that the value of the proxy variables are correct.
To help narrow down the issue, run with the "--log trace" and if you are able, check the value returned by getProxyUri with the getAgent method within \node_modules\nativescript\node_modules\make-fetch-happen\agent.js

Unable to launch WebDriver Agent because of xcodebuild failure

Me using Xcode_8.2.1 . When i am building my app its trowing error implicit converstation from nullable pointer
I suggest to
Get clean WebDriverAgent project from github repo or via appium installation, you can find it on your local machine:
/Users/someName/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
Run ./Scripts/bootstrap.sh for "clean" project in path specified above
Open WebDriverAgent.xcodeproj and check if there are any errors

Gradle in Android Studio 0.44 can't find process on path to run in an Exec Type task

I used to have the following gradle build task:
task buildWebApp(type: Exec) {
executable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt"
args = ["build"]
}
This would pick the appropriate grunt command and run it with the argument "build".
This worked without any kind of issue
I've just tried this in Android Studio 0.4, using Gradle 1.9 and it's no longer working. Instead I get the following error:
Execution failed for task ':BrowserPages:buildWebApp'.
A problem occurred starting process 'command 'grunt''
Normally at this point I would debug with gradlew, but running the following command, throws no errors:
$ ./gradlew buildWebApp
I've also tried running the full task list to still not find any problems.
The way this is executed is from my main build.gradle file with this dependency
copyWebApplication.dependsOn ':BrowserPages:buildWebApp'
Anyone have any ideas?
I've tried to run executable = "node" with arg = ["-v"] and get the same error where it can't find node. Node is globally accessible on my terminal, so I can only assume that the command is being run in a different environment to the terminal. There is the option for setting the environment but I can't find any examples of how it should be used.
Try using a fully-qualified path to the grunt executable. Perhaps something in the path has changed between Android Studio/Gradle/Android Plugin versions.

Jenkins unable to locate files on my computer

when ever I try to build my android project on jenkins it fails by saying :
Started by user anonymous
Building in workspace /home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2
[mysteryshopper_version2] $ ant -Dlabel=trial1-9 clean debug
Buildfile: /home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2/build.xml
BUILD FAILED
/home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2/build.xml:90: Cannot find /home/tanzeelrana/android-sdk-linux/tools/ant/build.xml imported from /home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2/build.xml
Total time: 0 seconds
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
on line 90 in my build.xml file I have a tag with the following in it :
import file="/home/tanzeelrana/android-sdk-linux/tools/ant/build.xml"
does anyone know why it is unable to locate this file ? the file exist at the exact path ....
Jenkins usually runs with its own user (jenkins),
so it is probably an issue of permissions.
Try printing the current user from within your Jenkins job.
EDIT:
See here about running Jenkins as a daemon -
it also shows how to set it to run as a different user than 'jenkins':
Installing Jenkins as a Unix daemon

Categories

Resources