nodejs download fails due to invalid link (Protocol switch unsafe) Liferay 7 - node.js

failures using Gradle v.6 + Workspace / liferay 7.2 , Here is the stacktrace exception of the first build command ​​​​​:
Task :downloadNode FAILED
Trying to download http://mirrors.lax.liferay.com/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/jenkins/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
Trying to download http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz to /home/jenkins/.liferay/mirrors/nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz.tmp
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':downloadNode'.
Redirection detected from http to https. Protocol switch unsafe, not allowed.
 
Any good FIX, thanks in advance..?

Edit :
problem solved by adding this to the build.gradle:
allprojects {
plugins.withId("com.liferay.node") {
node.global = true
node.nodeUrl = node.nodeUrl.replace("http:", "https:")
System.out.println(node.nodeUrl)
} }

Related

bootJar fails after upgrading to Gradle v7.6 (project is already evaluated)

I've updated Gradle to v7.6 and now the task bootJar does not work longer.
This is what I have configured in the past and what was working:
bootJar {
mainClass.set("com.dwiner.app.MainApplication")
from("$appDir/dist/angular/browser") {
into 'static'
}
}
bootJar.dependsOn 'npm_run_buildprod'
It seems that the dependsOn has some troubles now, as it the build keeps crashing with the following message:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':bootJar'.
...
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':npm_run_buildprod'.
...
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'NpmTask'.
...
Caused by: org.gradle.api.InvalidUserCodeException: Cannot run Project.afterEvaluate(Closure) when the project is already evaluated.
Update:
It seems that the issue occurs when executing npm_run_buildprod and is not dependent on the dependsOn config.
Any help is appreciated.

node build adding x86_64 and failing on M1 chip?

I am trying to build an application but it fails when setting up the node.
> Task :my-app:nodeSetup FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':my-app:nodeSetup'.
> Could not resolve all files for configuration ':my-app:detachedConfiguration22'.
> Could not find node-16.4.0-darwin-x86_64.tar.gz (org.nodejs:node:16.4.0).
Searched in the following locations:
https://nodejs.org/dist/v16.4.0/node-v16.4.0-darwin-x86_64.tar.gz
it looks like its adding x86_64 to the end of the artifact? and because of that its not finding it in the repository. Any ideas? Please let em know if you need more info.

Gradle task :app:createDebugAndroidTestCoverageReport fails, why?

When I run gradlew createDebugCoverageReport it fails with:
Task :app:connectedDebugAndroidTest
Starting 1 tests on Tablet_Sv2(AVD) - 12
Test results saved as file:/../app/build/outputs/androidTest-results/connected/flavors/app/Tablet_Sv2(AVD)%20-%2012/test-result.pb. Inspect these results in Android Studio by selecting Run > Import Tests From File from the menu bar and importing test-
result.pb.
Task :app:createDebugAndroidTestCoverageReport FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:createDebugAndroidTestCoverageReport'.
A failure occurred while executing com.android.build.gradle.internal.coverage.JacocoReportTask$JacocoReportWorkerAction
Unable to generate Jacoco report
Why?
EDIT:
According to this Answer the app level build.gradle would require
configurations.all{
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion "0.8.7"
}
}
}
}

Grails4 getting out of memory while compiling groovy

I am getting below out of memory error in my grails4 application after adding more controllers in my workspace.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':cira:compileGroovy'.
GC overhead limit exceeded
so far i have total of 41 controller files in my grails application while adding 42 one i am getting this error while compiling if i remove it and run with existing 41 controllers its working.
Please let me know if you have any solution for this.
Thanks in Advance!
Modify bootRun block of build.gradle as follows
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx4096m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive,
System.getProperty(springProfilesActive)
}

Android Studio 3.2 Canary 14 Github integration

I just updated to the new 3.2 Canary build of Android Studio and everything seems to work fine, except for Github integration.
When I try to push or pull through the UI, I get the following error:
Invocation failed Unexpected Response from Server: Unauthorized
java.lang.RuntimeException: Invocation failed Unexpected Response from Server: Unauthorized
at org.jetbrains.git4idea.http.GitAskPassXmlRpcClient.askPassword(GitAskPassXmlRpcClient.java:65)
at org.jetbrains.git4idea.http.GitAskPassApp.main(GitAskPassApp.java:68)
Caused by: java.io.IOException: Unexpected Response from Server: Unauthorized
at org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:231)
at org.apache.xmlrpc.LiteXmlRpcTransport.sendXmlRpc(LiteXmlRpcTransport.java:90)
However, the test tool under Settings > Version Control > GitHub works perfectly. So does the console git. And so did the 3.1 AS I used before.
Any ideas what the reason could be?
Just go in settings->Version control->Git and check the credential helper box.
The issue seems to be solved in AS 3.2 Canary 16, so just update.

Resources