Dotnet Core NuGet package dependency build issue on Azure DevOps - .net-core

With no changes at all to source code or pipelines, I am now experiencing an issue where none of my build pipelines work anymore in Azure DevOps. The package that is being referenced isn't a dependency for this project, nor has it ever been. I can't work out what's causing this or how I can go about troubleshooting.
2018-11-26T10:25:14.2812751Z Restoring packages for C:\Agent\_work\19\s\OrchestrateIT.Web\OrchestrateIT.csproj...
2018-11-26T10:25:14.7577515Z C:\Program Files\dotnet\sdk\2.1.400\NuGet.targets(114,5): error : Unable to load the service index for source https://orchestrate-it.pkgs.visualstudio.com/_packaging/Shared_DBUpdate/nuget/v3/index.json. [C:\Agent\_work\19\s\OrchestrateIT.DataImportScheduler\OrchestrateIT.DataImportScheduler.csproj]
2018-11-26T10:25:14.7577910Z C:\Program Files\dotnet\sdk\2.1.400\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Agent\_work\19\s\OrchestrateIT.DataImportScheduler\OrchestrateIT.DataImportScheduler.csproj]
2018-11-26T10:25:14.7579439Z 0 Warning(s)
2018-11-26T10:25:14.7579628Z 1 Error(s)
2018-11-26T10:25:14.7579743Z
2018-11-26T10:25:14.7579902Z Time Elapsed 00:00:02.18
2018-11-26T10:25:14.7906687Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
Local (manual) build works fine. I have already tried clearing Nuget cache and VSTS agent cache. A quick workaround might be to solve the authorisation issue (even though the package isn't required) however I'm not sure how to go about doing this.
Any advice would be greatly appreciated.

Even though my Personal Access Token had not expired, for some reason I needed to remove and add this package back to my sources with the same PAT. This resolved the authentication issue and therefore resolved the build issue.
It is still unclear to me as to why this package is being considered as a dependency for this project though.

Related

After Update to Android Studio Arctic Fox 2020.3.1 Patch 4, Error: Could not resolve aapt2-7.0.4-7396180-windows.jar

After update to Android Studio Arctic Fox 2020.3.1 Patch 4,
Error: Could not resolve aapt2-7.0.4-7396180-windows.jar (com.android.tools.build:aapt2:7.0.4-7396180): No cached version
Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform viewbinding-7.0.4.aar (androidx.databinding:viewbinding:7.0.4) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
.
.
Possible solution:
- Disable offline mode and rerun the build
if I disable offline mode and syn the project again. Then even its not building the project then errors comes again.
Error after disabling offline mode:
:app:writeDebugSigningConfigVersions
FAILURE: Build completed with 8 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.cuberto:liquid-swipe:1.0.0.
Required by:
project :app
> Could not resolve com.cuberto:liquid-swipe:1.0.0.
> Could not get resource 'https://dl.bintray.com/amulyakhare/maven/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'.
> Could not HEAD 'https://dl.bintray.com/amulyakhare/maven/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'. Received status code 502 from server: Bad Gateway
.
many errors
.
.
Could not HEAD 'https://dl.bintray.com/amulyakhare/maven/com/cuberto/liquid-swipe/1.0.0/liquid-swipe-1.0.0.pom'. Received status code 502 from server: Bad Gateway
Disable Gradle 'offline mode' and sync project
even offline mode is deactivated.
What's wrong with it?
Even Firebase is not connecting to internet through firebase Assistant though Android Studio.
I found the culprit for this in my project.
Earlier I was using in all projects repositories in build.gradle(Exam String)
maven {
url 'https://dl.bintray.com/amulyakhare/maven'
}
In earlier Android studio versions, it was working using this repositories.
After removing this from build.gradle(Exam String).
It started working fine.
It is used for liquide swipe view pager.
For reference I have added screenshot of repositories.

Error staging application: App staging failed in the buildpack compile phase in HWC Buildpack

I am trying to deploy my application built in ASP.Net 4.6.1. So I am using HWC Buildpack.
Below is my manifest.yml
---
applications:
- name: DRSN
random-route: true
memory: 128M
buildpack:
https://github.com/cloudfoundry/hwc-buildpack.git
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
The error that I am receiving is below.
Waiting for API to complete processing files...
Staging app and tracing logs...
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 creating container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 successfully created container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Downloading app package...
Downloading build artifacts cache...
Downloaded build artifacts cache (231B)
Downloaded app package (19.5M)
Failed to compile droplet: Failed to compile droplet: fork/exec /tmp/buildpackdownloads/6c6dca8d638ac0d145d6581f9eb9a96a/bin/compile: permission denied
Exit status 223
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 stopping instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 destroying container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Error staging application: App staging failed in the buildpack compile phase
Can anyone help me resolve this issue? Am I not correct in my manifest.yml? Or is it something else?
I believe that the problem is that you're telling the system to use the HWC buildpack, but at the same time you're not setting the Windows stack (at least based on what info I can see). That means it's going to default to the Linux stack, which I believe is why you're seeing the fork/exec /tmp/buildpackdownloads/... error.
Try adding stack: windows to your manifest.yml or -s windows to your cf push command (for future reference, when you need help always include the full cf push command you're running).
PS: you shouldn't use https://github.com/cloudfoundry/hwc-buildpack.git that is telling the system to grab the master branch in whatever state it's currently in. That's a.) not reproducible and b.) not guaranteed to be in a working state. You should either use the platform provided buildpack names (from cf buildpacks) or append #<branch_or_tag> to the end of the URL so it picks a specific branch. All CF Buildpacks have tags for each release. It's strongly recommended you use a tagged release.

Corda 4.3 compilation issues

Trying to compile Corda from scratch. I cloned version 4.3 from Github. Details and error codes below.I am using Oracle java version 1.8. I have asked this question on slack as well but didn't find anyone who has faced this issue before.
Task :node-api-tests:test
net.corda.nodeapitests.internal.crypto.X509UtilitiesTest > create valid server certificate chain FAILED
java.security.cert.CertificateException at X509UtilitiesTest.kt:166
net.corda.nodeapitests.internal.crypto.X509UtilitiesTest > create valid self-signed CA certificate FAILED
java.security.cert.CertificateException at X509UtilitiesTest.kt:131
46 tests completed, 2 failed
Task :node-api-tests:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:node-api-tests:test’.
So it looks like you're trying to build Corda's source code. Most of the time you really won't need to do this. I'd recommend instead just taking a look at the Corda samples as they use gradle which will download the jars and compile the samples for you.
Here's a link to some of those sample repo's so you can try building off of them.
https://github.com/corda/samples-kotlin
https://github.com/corda/samples-java
All of them compile and run the same way so it shouldn't be too difficult to get running.
./gradlew deployNodes
and then
./build/nodes/runnodes

error: GenerateFeatureFileCodeBehindTask task could not be loaded from the assembly

We have ported our project from .NET to .NET Core in order to use an AWS pipeline with Docker containers which requires Linux.
The application builds successfully on our local computers (which run Windows) but in the AWS pipeline the build steps shows this error - GenerateFeatureFileCodeBehindTask ... task could not be loaded from the assembly ... SpecFlow.Tools.MsBuild.Generation.dll:
Full error:
/root/.nuget/packages/specflow.tools.msbuild.generation/3.0.225/build/SpecFlow.Tools.MsBuild.Generation.targets(78,5): error MSB4062: The "SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask" task could not be loaded from the assembly /root/.nuget/packages/specflow.tools.msbuild.generation/3.0.225/build/../tasks/netcoreapp2.0/SpecFlow.Tools.MsBuild.Generation.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements
Microsoft.Build.Framework.ITask. [/codebuild/output/src814/src/s3/00/ProjectFoo/ProjectFoo.csproj]
I have found 2 links mentioning this error but no solution - https://ci.appveyor.com/project/SpecFlow/specflow-kx1o3/build/build1119 and https://www.gitmemory.com/issue/techtalk/SpecFlow/1699/520196304.
I have checked and I have no <UsingTask> in my csproj files. Any idea what this SpecFlow task is, and why it is throwing this error?
The GenerateFeatureFileCodeBehindTask is contained in the SpecFlow.Tools.MSBuild.Generation package. It is used to generate the code-behind files of your feature files.
You don't find a <UsingTask> because it is done in the NuGet package.
The GitHub issue for this is: https://github.com/techtalk/SpecFlow/issues/1699/
Currently I have no idea why this error is thrown. But we are currently fixing our build/tests for Linux.

Cause: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl

I have connected my Android application with firebase-database by putting this dependency (kapt 'com.google.firebase:firebase-database:16.0.1:15.0.0') but after that I am getting errors like the one mentioned in title also when I synchronized the project I am getting different errors like: Connection time out, Failed to resolved build listener.
Enabling/Disabling offline work and setting proxy in gradle.properties file doesn't work for me.
Also you guys have seen that I used 'kapt' in dependency as it is necessary to use, without it I am getting error "failed to resolve 15.0.0". Removing 15.0.0 doesn't work for me.
Error
Cause:org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()Lorg/gradle/api/artifacts/ModuleIdentifier;ing
I am using Android Studio 3.2 and sadly I can't update this version.
Gradle version: 5.1.1 and
Plugin version: 3.4.0

Resources