VS2015 build with Cordova-cli#5.4.0 shows deployment errors - visual-studio-cordova

Currently, I upgrade my VS2015 Tools for Apache Cordova to update 4, in this version run #5.3.3 well, but change taco.json to run #5.4.0(the newly version) will get the error as follow. It looks like "org.gradle.internal.UncheckedException: java.io.IOException" gradle error.
My question does taco.json support the newly #5.4.0 as well?
2>
2> BUILD SUCCESSFUL
2>
2> Total time: 3.272 secs
2>Picked up _JAVA_OPTIONS: -Xmx512M
2> Built the following apk(s):
2> D:\BlankCordovaApp1\BlankCordovaApp1\platforms\android\build\outputs\apk\android-debug.apk
2> Using apk: D:\BlankCordovaApp1\BlankCordovaApp1\platforms\android\build\outputs\apk\android-debug.apk
2> Installing app on device...
2> Launching application...
2> LAUNCH SUCCESS
2> Command finished with error code 0: cmd /s /c "D:\BlankCordovaApp1\BlankCordovaApp1\platforms\android\cordova\run.bat --buildConfig=D:\BlankCordovaApp1\BlankCordovaApp1\build.json"
2> Executing "after_run" hook for all plugins.
2>
2>Exception in thread "DisconnectableInputStream source reader" org.gradle.internal.UncheckedException: java.io.IOException: Stream Closed
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I work on the Tools for Apache Cordova in Visual Studio at Microsoft.
We are interpreting the Cordova output from 5.4.0 incorrectly. We think it's telling us there was an error when there actually wasn't one.
We'll fix this in the next update, but for now you can just click "Yes" on that dialog and ignore the warning since there wasn't actually a problem.
Thanks for reporting this to us!

Related

Dotnet test questions on errors

I am working on Azure pipelines, running on a Windows self-hosted agent, behind a firewall to run automated tests.
I would want to see the tests results and code coverage in the pipeline results in Azure. My build pipelines are working but I never saw yet the results of automated tests so I'm not sure of what to expect.
I run this in my pipeline:
- job: Test
steps:
- task: NuGetAuthenticate#0
- task: DotNetCoreCLI#2
inputs:
command: test
projects: 'src/***.Test.Core/*.csproj'
testRunTitle: '***Tests'
arguments: '--collect "Code coverage"'
publishTestResults: true
Here are extracts of the logs, with my questions and comments:
Initialization of proxies and general stuff
##[debug]Agent.ProxyUrl=http://***proxy.***.***:443
##[debug]Agent.ProxyBypassList=["***.***,localhost,127.0.0.1","***.***","localhost","127.0.0.1"]
##[debug]Agent.CAInfo=*:\***Certificates\***PKIG2PEM.txt
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]command=test
##[debug]projects=src/***.Test.Core/*.csproj
##[debug]arguments=--collect "Code coverage"
##[debug]publishWebProjects=true
##[debug]workingDirectory=*:\Agent\_work\24\s
##[debug]check path : *:\Agent\_work\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.179.2\node_modules\packaging-common\module.json
##[debug]adding resource file: *:\Agent\_work\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.179.2\node_modules\packaging-common\module.json
Not sure what is CHCP but tests are run, with errors I believe linked to firewall so I'd expect to see those errors in the tests results
[command]C:\Windows\system32\chcp.com 65001
##[debug]publishTestResults=true
##[debug]Agent.TempDirectory=*:\Agent\_work\_temp
##[debug]defaultRoot: '*:\Agent\_work\_temp'
##[debug]pattern: '**/*.trx'
Results File: E:\Agent\_work\_temp\***_***_2020-12-17_16_13_24.trx
Attachments:
*:\Agent\_work\_temp\d992768e-f36f-4558-9b52-f42fc7cd3c74\***_***_2020-12-17.16_13_16.coverage
Failed! - Failed: 29, Passed: 0, Skipped: 0, Total: 29, Duration: 3 s - OECD.Glue.Contacts.API.Test.Core.dll (netcoreapp3.1)
Errors when pushing the results, what means "Failed to get FF TestManagement.Server.UsePublishTestResultsLibInAgent Value." ?
##[debug]Exit code 1 received from tool 'C:\Program Files\dotnet\dotnet.exe'
##[debug]STDIO streams have closed for tool 'C:\Program Files\dotnet\dotnet.exe'
##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
##[debug]Processed: ##vso[task.issue type=error;]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
##[debug]BuildConfiguration=undefined
##[debug]BuildPlatform=undefined
##[debug]testRunTitle=***Tests
##[debug]adjustedPattern: '*:\Agent\_work\_temp\**/*.trx'
##[debug]Failed to get FF TestManagement.Server.UsePublishTestResultsLibInAgent Value.
Unable to get the FF: TestManagement.Server.EnablePublishToTcmServiceDirectlyFromTask. Reason: One or more errors occurred. (Moved Temporarily)
Failed to get FF TestManagement.PTR.CalculateTestRunSummary, what is CalculateTestRunSummary ?
##[debug]Failed to get FF TestManagement.PTR.CalculateTestRunSummary Value.
##[debug]Reading test results from file '*:\Agent\_work\_temp\***_***_2020-12-17_16_13_24.trx'
##[debug]Processed: ##vso[results.publish type=VSTest;mergeResults=false;runTitle=GlueContactsTests;publishRunAttachments=true;resultFiles=*:\Agent\_work\_temp\*_***_2020-12-17_16_13_24.trx;testRunSystem=VSTS - dotnet;]
I wonder what to do with these warnings, I don't know much about Dotnet core and Nuget, my job is only the pipeline, not the underlying project. In project settings, I see .Net Core 3.1, I don't understand where to look to find if I use Nuget version < 5.7 and if this warning applies to me
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
##[debug]Processed: ##vso[task.issue type=warning;].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) Use global.json using an older sdk version(<=3) to build
##[debug]task result: Failed
Then I have this, publish test results ends with Moved Temporarily, I'm guessing this is because of firewall, still, I did setup the proxy and other calls to Azure seems to work, what could be the issue ?
##[error]Dotnet command failed with non-zero exit code on the following projects : *:\Agent\_work\24\s\src\***.Test.Core\***.Test.Core.csproj
##[debug]Processed: ##vso[task.issue type=error;]Dotnet command failed with non-zero exit code on the following projects : E:\Agent\_work\24\s\src\***.Test.Core\***.Test.Core.csproj
##[debug]Processed: ##vso[task.complete result=Failed;]Dotnet command failed with non-zero exit code on the following projects : E:\Agent\_work\24\s\src\***.Core\***.Test.Core.csproj
##[section]Async Command Start: Publish test results
##[warning]Failed to publish test results: Moved Temporarily
##[section]Async Command End: Publish test results
##[section]Finishing: DotNetCoreCLI
Thanks for any help, Claude
Update 1 ---------------------------------
Thank you.
I understood that my version of DotNet Core on the agent is not good,
the agent has version 5 while the project references version 3.1.
I added this task :
- task: UseDotNet#2
inputs:
packageType: 'sdk'
version: '3.1.x'
But I am behind a firewall, still I have these logs:
##[debug]agent.proxyurl=http://***proxy.***.***:443
##[debug]agent.proxyusername=undefined
##[debug]agent.proxypassword=undefined
##[debug]agent.proxybypasslist=["***.***,localhost,127.0.0.1","***.***","localhost","127.0.0.1"]
##[debug]agent.proxybypasslist=["***.***,localhost,127.0.0.1","***.***","localhost","127.0.0.1"]
##[debug]AZURE_HTTP_USER_AGENT=VSTS_c11775e3-cd05-4e03-abd2-35da98ef2f0f_build_164_0
Tool to install: .NET Core sdk version 3.1.x.
##[debug]task result: Failed
##[error]Failed to download or parse releases-index.json with error: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
Would it be best to install this version locally ? In that case, would I have to do something special so it uses the correct version ?
Update 2 ---------------------------------
Thanks for that link to a known issue. I noticed that issue doesn't mention an error I have: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
Can it be that the task tries to reach 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json' but can't as we are behind a firewall ??
I don't understand why it tries to install DotNet Core as it is already installed but I don't know much about DotNet Core, I am only trying to run automated tests.
My last test included:
- task: NuGetAuthenticate#0
displayName: 'Authenticate with NuGet'
- task: UseDotNet#2
inputs:
packageType: 'sdk'
version: '3.1.101'
installationPath: '$(Agent.ToolsDirectory)/dotnet'
- task: DotNetCoreCLI#2
inputs:
command: test
projects: 'src/myProject.Test.Core/*.csproj'
testRunTitle: 'myProject'
arguments: '--collect "Code coverage"'
publishTestResults: true
Logs contains:
##[debug]agent.proxyurl=http://proxy.myCie.com:443
##[debug]agent.proxyusername=undefined
##[debug]agent.proxypassword=undefined
##[debug]agent.proxybypasslist=["myCie.com,localhost,127.0.0.1","myCie.com","localhost","127.0.0.1"]
##[debug]agent.proxybypasslist=["myCie.com,localhost,127.0.0.1","myCie.com","localhost","127.0.0.1"]
##[debug]AZURE_HTTP_USER_AGENT=VSTS_xxx_build_173_0
Tool to install: .NET Core sdk version 3.1.101.
##[debug]task result: Failed
##[error]Failed to download or parse releases-index.json with error: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
##[debug]Processed: ##vso[task.issue type=error;]Failed to download or parse releases-index.json with error: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
##[section]Finishing: UseDotNet
Thanks for any help
I think this is similar to GitHub issue #10969. It has something to do with internal GitHub repo/url. This is because the version which we specify in the task is searched in releases-index file, which is accessible to public as well:
You could also check the releases-index.json
{
"channel-version": "3.1",
"latest-release": "3.1.10",
"latest-release-date": "2020-11-10",
"security": false,
"latest-runtime": "3.1.10",
"latest-sdk": "3.1.404",
"product": ".NET Core",
"support-phase": "lts",
"eol-date": "2022-12-03",
"releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json"
},
In this case, I would recommend you to reopen the Issue #10969.

Error - Expected ';' while running Gatling using sbt

I am running a Gatling test script using Jenkins on a Unix machine. The test and the Simulation passes successfully after which I am seeing the below error marked in bold below also causing the Jenkins build to fail.
Log from the Jenkins build
Reports generated in 0s.
Please open the following file: >/var/lib/jenkins/workspace/gatling_test_job/target/gatling/demoscript-20200930173820423/index.html
[info] Simulation DemoScript successful.
[info] Simulation(s) execution ended.
[success] Total time: 326 s (05:26), completed Sep 30, 2020 5:43:32 PM
>[error] Expected ';'
[error] com.test.performance.DemoScript
[error] ^
Build step 'Build using sbt' changed build result to FAILURE
Build step 'Build using sbt' marked build as failure
I am using build using sbt block in my Jenkins job to trigger the test using the below command
gatling:testOnly com.test.performance.DemoScript
Scala Version is - 2.12.10
Gatling and related libraries - 3.3.1
Build using sbt config in Jenkins
sbt installation in global tool configuration

Error to build a signed apk

i'm trying to build an signed apk with visual studio /Cordova template. But i'm receiving this error: ERROR building one of the platforms 1
And : Error MDAVSCLI 1
I´m following this tutorial:
http://taco.visualstudio.com/en-us/docs/tutorial-package-publish-readme/
and my Keystore is like image bellow:
-package-resources:
[aapt] Creating full resource package...
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating MainActivity-release-unsigned.apk for release...
-post-package:
-release-prompt-for-password:
-release-nosign:
-release-sign:
[echo] Signing final apk...
BUILD FAILED
C:\Users\Leo\AppData\Local\Android\sdk1\tools\ant\build.xml:1135: The following error occurred while executing this line:
C:\Users\Leo\AppData\Local\Android\sdk1\tools\ant\build.xml:1147: C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\"my-release-key.Keystore" (The file name syntax, the name of the directory or volume label incorrect)
Total time: 52 seconds
Picked up _JAVA_OPTIONS: -Xmx512M
C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant release -f C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
Command finished with error code 1: C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\cordova\build.bat --release
ERROR building one of the platforms : error : C:\Users\Leo\Desktop\Mobile\Mobile\platforms\android\cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
MDAVSCLI : error : C:\Users\Leo\Desktop\Mobile\Mooobile\platforms\android\c
I've found a way : removing the quotes in my ant.properties i can build.

JavaFX to Android - Execution failed for task ':deleteSrcAndLayout'

good day, I got an issue in creating an android project, Im currently using windows7 with JDK8u40 installed and Im using the latest dalvik sdk. But when I attempted to create an android project, an error was thrown:
* What went wrong:
Execution failed for task ':deleteSrcAndLayout'.
> Directory does not exist: C:\AndroidFX\CodeGenerator\src
Here's the complete error log:
C:\dalvik-sdk\samples\Ensemble8>./gradlew --info createProject -PDEBUG -PDIR=C:/
AndroidFX -PPACKAGE="hello" -PNAME="CodeGenerator" -PANDROID_SDK=C:/AndroidSDK/s
dk -PJFX_SDK=C:/dalvik-sdk -PJFX_APP=C:/Jar -PJFX_MAIN="hello.Hello"
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file 'C:\dalvik-sdk\samples\Ensemble8\
build.gradle'.
Included projects: [root project 'Ensemble8']
Evaluating root project 'Ensemble8' using build file 'C:\dalvik-sdk\samples\Ense
mble8\build.gradle'.
Starting file lock listener thread.
All projects evaluated.
Selected primary task 'createProject'
Tasks to be executed: [task ':conf', task ':androidCreateProject', task ':delete
SrcAndLayout', task ':writeAntProperties', task ':updateManifest', task ':update
StringsXml', task ':updateBuildXml', task ':createProject']
:conf (Thread[main,5,main]) started.
:conf
Executing task ':conf' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
====================================================
Android SDK: [C:/AndroidSDK/sdk]
Target: [android-21]
Project name: [CodeGenerator]
Package: [hello]
JavaFX application: [C:/Jar]
JavaFX sdk: [C:/dalvik-sdk]
JavaFX main.class: [hello.Hello]
Workdir: [C:/AndroidFX]
debug: [true]
===================================================
:conf (Thread[main,5,main]) completed. Took 0.078 secs.
:androidCreateProject (Thread[main,5,main]) started.
:androidCreateProject
Executing task ':androidCreateProject' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Starting process 'command 'C:/AndroidSDK/sdk/tools/android.bat''. Working direct
ory: C:\AndroidFX Command: C:/AndroidSDK/sdk/tools/android.bat create project -n
CodeGenerator -p CodeGenerator -t android-21 -k hello -a Activity
An attempt to initialize for well behaving parent process finished.
Successfully started process 'command 'C:/AndroidSDK/sdk/tools/android.bat''
Error: Package name 'hello' contains invalid characters.
A package name must be constitued of two Java identifiers.
Each identifier allowed characters are: a-z A-Z 0-9 _
Proces
s 'command 'C:/AndroidSDK/sdk/tools/android.bat'' finished with exit value 0 (st
ate: SUCCEEDED)
:androidCreateProject (Thread[main,5,main]) completed. Took 1.375 secs.
:deleteSrcAndLayout (Thread[main,5,main]) started.
:deleteSrcAndLayout
Executing task ':deleteSrcAndLayout' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:deleteSrcAndLayout FAILED
:deleteSrcAndLayout (Thread[main,5,main]) completed. Took 0.594 secs.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\dalvik-sdk\samples\Ensemble8\build.gradle' line: 203
* What went wrong:
Execution failed for task ':deleteSrcAndLayout'.
> Directory does not exist: C:\AndroidFX\CodeGenerator\src
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to
get more log output.
BUILD FAILED
Total time: 6.531 secs
Please help me!! Im stuck!!!!
I also tried JDK7u75 but it didnt worked!!
I successfully created an android project by editing the createHelloWorld.bat under android-tools in the dalvik-sdk.

appharbor gives error on compiling after push

I get this error from appharbor:
Build started 5/31/2012 4:52:13 PM.
Project "D:\temp\woojnpbm.drx\input\wsolver.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
D:\temp\woojnpbm.drx\input\wsolver.sln.metaproj : warning MSB4121: The project configuration for project "wsolver" was not specified in the solution file for the solution configuration "Release|Any CPU". [D:\temp\woojnpbm.drx\input\wsolver.sln]
Project "D:\temp\woojnpbm.drx\input\wsolver.sln" (1) is building "D:\temp\woojnpbm.drx\input\wsolver.metaproj" (2) on node 1 (default targets).
Build:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /wsolver -p ..\..\WebSites\wsolver\ -u -f D:\temp\woojnpbm.drx\output\_PublishedWebsites\wsolver\
ASPNETCOMPILER : error 1003: The directory 'D:\temp\WebSites\wsolver\' doesn't exist. [D:\temp\woojnpbm.drx\input\wsolver.metaproj]
Done Building Project "D:\temp\woojnpbm.drx\input\wsolver.metaproj" (default targets) -- FAILED.
Done Building Project "D:\temp\woojnpbm.drx\input\wsolver.sln" (default targets) -- FAILED.
Build FAILED.
"D:\temp\woojnpbm.drx\input\wsolver.sln" (default target) (1) ->
(ValidateProjects target) ->
D:\temp\woojnpbm.drx\input\wsolver.sln.metaproj : warning MSB4121: The project configuration for project "wsolver" was not specified in the solution file for the solution configuration "Release|Any CPU". [D:\temp\woojnpbm.drx\input\wsolver.sln]
"D:\temp\woojnpbm.drx\input\wsolver.sln" (default target) (1) ->
"D:\temp\woojnpbm.drx\input\wsolver.metaproj" (default target) (2) ->
(Build target) ->
ASPNETCOMPILER : error 1003: The directory 'D:\temp\WebSites\wsolver\' doesn't exist. [D:\temp\woojnpbm.drx\input\wsolver.metaproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.62
My app is aspx.net 4.0 - anyone seen this before?
You should probably check the paths in your solution and project files. From the error, D:\temp\WebSites\wsolver\ is referenced, but that path is not found when your code is built on AppHarbor.
A good way to debug this would be to checkout or clone your code to a different machine to check whether it builds there.

Resources