IntelliJ Community build error downloading Kotlin plugin

已回答

How can I fix the following error when building `master` for IntelliJ Community (on commit eee5627cc76fb5adc1ed445406fb43a9ec1f95d8 from https://github.com/JetBrains/intellij-community) in IntelliJ 2019.2.3 Preview:

 

* Where:
Script '/Users/ross.goldberg/Code/fork/intellij-community/build/dependencies/setupKotlin.gradle' line: 19

* What went wrong:
A problem occurred evaluating script.
> Could not resolve all files for configuration ':kotlinPlugin'.
   > Could not resolve ideadev.com.jetbrains.plugins:org.jetbrains.kotlin:1.3.50-release-IJ2019.2-2.
     Required by:
         project :
      > Could not resolve ideadev.com.jetbrains.plugins:org.jetbrains.kotlin:1.3.50-release-IJ2019.2-2.
         > Could not get resource 'https://repo.labs.intellij.net/java/ideadev/com/jetbrains/plugins/org.jetbrains.kotlin/1.3.50-release-IJ2019.2-2/org.jetbrains.kotlin-1.3.50-release-IJ2019.2-2.pom'.
           > Could not GET 'https://repo.labs.intellij.net/java/ideadev/com/jetbrains/plugins/org.jetbrains.kotlin/1.3.50-release-IJ2019.2-2/org.jetbrains.kotlin-1.3.50-release-IJ2019.2-2.pom'.
               > Connect to repo.labs.intellij.net:443 [repo.labs.intellij.net/92.242.140.21] failed: connect timed out

0

Could you please try this again? Seems like a glitch in the cache-redirector Maven repository.

0

The problem is still occurring.

0

Could you please post the output of command `curl -vvv https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven` in Terminal ?

0

*   Trying 143.204.142.112...

* TCP_NODELAY set

* Connected to cache-redirector.jetbrains.com (143.204.142.112) port 443 (#0)

* ALPN, offering h2

* ALPN, offering http/1.1

* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH

* successfully set certificate verify locations:

*   CAfile: /etc/ssl/cert.pem

  CApath: none

* TLSv1.2 (OUT), TLS handshake, Client hello (1):

* TLSv1.2 (IN), TLS handshake, Server hello (2):

* TLSv1.2 (IN), TLS handshake, Certificate (11):

* TLSv1.2 (IN), TLS handshake, Server key exchange (12):

* TLSv1.2 (IN), TLS handshake, Server finished (14):

* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):

* TLSv1.2 (OUT), TLS change cipher, Client hello (1):

* TLSv1.2 (OUT), TLS handshake, Finished (20):

* TLSv1.2 (IN), TLS change cipher, Client hello (1):

* TLSv1.2 (IN), TLS handshake, Finished (20):

* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256

* ALPN, server accepted to use h2

* Server certificate:

*  subject: CN=cache-redirector.jetbrains.com

*  start date: May 28 00:00:00 2019 GMT

*  expire date: Jun 28 12:00:00 2020 GMT

*  subjectAltName: host "cache-redirector.jetbrains.com" matched cert's "cache-redirector.jetbrains.com"

*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon

*  SSL certificate verify ok.

* Using HTTP2, server supports multi-use

* Connection state changed (HTTP/2 confirmed)

* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0

* Using Stream ID: 1 (easy handle 0x7fe1c0003200)

> GET /plugins.jetbrains.com/maven HTTP/2

> Host: cache-redirector.jetbrains.com

> User-Agent: curl/7.54.0

> Accept: */*

>

* Connection state changed (MAX_CONCURRENT_STREAMS updated)!

< HTTP/2 302

< content-type: text/html

< content-length: 138

< location: https://dtahfujkndrht.cloudfront.net/plugins.jetbrains.com/maven

< date: Fri, 13 Sep 2019 14:30:35 GMT

< server: nginx

< expires: Fri, 13 Sep 2019 14:30:34 GMT

< cache-control: no-cache

< x-debug-remoteaddr: 108.14.246.37

< x-debug-forwardedfor: 108.14.246.37, 70.132.13.136

< x-debug-redirecttolocalspbmirror: 0

< x-cache: Miss from cloudfront

< via: 1.1 6f21edc64d8594b28f80c9ab159bcddd.cloudfront.net (CloudFront)

< x-amz-cf-pop: EWR52-C2

< x-amz-cf-id: lgmXzJpw3mKmx1Kzvq-roIa-Bzj9aP-vuYJaWZk8NAVcbQcYl0rosg==

<

<html>

<head><title>302 Found</title></head>

<body>

<center><h1>302 Found</h1></center>

<hr><center>nginx</center>

</body>

</html>

* Connection #0 to host cache-redirector.jetbrains.com left intact

0

I am running Norton 360 Deluxe with a firewall, but I haven't had issues with any other connections…

0

Aren't you by any chance using your local Gradle installation, not gradle-wrapper? Please check in 'Preferences | Build, Execution, Deployment | Build Tools | Gradle | Use Gradle from'.

I'm still trying to reproduce the error. As a workaround please apply this patch to 'build/dependencies' directory:

Index: build/dependencies/setupJetSign.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- build/dependencies/setupJetSign.gradle (revision 074d24bbd0b6eb3c2b6788b1d3176ea3514df3bd)
+++ build/dependencies/setupJetSign.gradle (date 1568387713009)
@@ -14,8 +14,10 @@
* limitations under the License.
*/
repositories {
- maven {
- url 'https://repo.labs.intellij.net/jet-sign'
+ if (inJetBrainsNetwork) {
+ maven {
+ url 'https://repo.labs.intellij.net/jet-sign'
+ }
}
}

Index: build/dependencies/setupJdk.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- build/dependencies/setupJdk.gradle (revision 074d24bbd0b6eb3c2b6788b1d3176ea3514df3bd)
+++ build/dependencies/setupJdk.gradle (date 1568387705297)
@@ -158,8 +158,10 @@

// JDK 1.6
repositories {
- maven {
- url 'https://repo.labs.intellij.net/java'
+ if (inJetBrainsNetwork) {
+ maven {
+ url 'https://repo.labs.intellij.net/java'
+ }
}
}

 

0

I'm using 'gradle-wrapper.properties' file

0

Applied the patch.  It didn't update the second file, so I manually applied the changes.

"Could not GET" changed to "Could not HEAD"

Otherwise, same error.

0

Could you please execute the command './gradlew --info --refresh-dependencies clean setupKotlinPlugin > setupKotlinPlugin.txt' in 'build/dependencies' directory and post 'setupKotlinPlugin.txt'?

0

Have you managed to resolve the issue?

0

I had the same issue while playing around this with IDEA 2020.2. The patch fixed the issue. Do you want to add that patch to master?

0

I somehow missed the replies above.

I haven't used the intellij-community repo since our earlier discussion.

I've upgraded to IDEA-U 2020.2.1 EAP & Kotlin plugin 1.4.0-rc-release-IJ2020.2-2; I'm not seeing this error on the old commit, or on current master.

Was the patch added to master since Stevenylai responded?

I do get a new NoClassDefFoundError: com.sun.jdi.Value (despite that class being in both the JDK 1.8 & 11 for the project, though the JDK 11 is AdoptOpenJDK instead of Corretto) that is unrelated to the error from earlier in this thread:

Groovyc: While compiling tests of intellij.groovy: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com.sun.jdi.Value
at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1118)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1098)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:640)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:618)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:595)
at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:62)
at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:119)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:81)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.runGroovycInThisProcess(InProcessGroovyc.java:167)
at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.lambda$runGroovyc$0(InProcessGroovyc.java:77)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: com.sun.jdi.Value
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:46)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveNonArrayType(AsmReferenceResolver.java:79)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveType(AsmReferenceResolver.java:70)
at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:49)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode$2.get(DecompiledClassNode.java:234)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode$2.get(DecompiledClassNode.java:231)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.createMethodNode(DecompiledClassNode.java:242)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:199)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getDeclaredField(DecompiledClassNode.java:116)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.existsProperty(StaticTypeCheckingVisitor.java:1480)
at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.existsProperty(StaticCompilationVisitor.java:528)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.existsProperty(StaticTypeCheckingVisitor.java:1396)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitPropertyExpressionSilent(StaticTypeCheckingVisitor.java:740)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitPropertyExpression(StaticTypeCheckingVisitor.java:747)
at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitPropertyExpression(StaticCompilationVisitor.java:542)
at org.codehaus.groovy.ast.expr.PropertyExpression.visit(PropertyExpression.java:55)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:120)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:197)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBlockStatement(StaticTypeCheckingVisitor.java:3736)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:110)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:121)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:2086)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:132)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.startMethodInference(StaticTypeCheckingVisitor.java:2457)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:2415)
at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod(StaticCompilationVisitor.java:224)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1103)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:54)
at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:393)
at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:182)
at org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:65)
at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:148)
at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:229)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1084)
... 20 more
0

I no longer get the error that this patch is supposed to fix. I’m not on the JetBrains network. Do you still get the error? If so, what versions of the Kotlin plugin & IDEA are you running? What commit are you building? Any idea why I don’t get it? My guess is that I’m now using Kotlin plugin 1.4.0-RC…

0

I haven't tried on the latest branch yet since it's slow to load on my office computer. But I think if you try to run cleanSetupJdks and load the project again, you should get an error about unable to connect to https://repo.labs.intellij.net/java

0

PR is merged, thank you!

0

请先登录再写评论。