SonarLint 4.2. - Error while Installing in Eclipse Mars

Hello,
I’m trying to install Sonarlint, using Eclipse Mars. I go to the marketplace and search for “sonarlint”. I get a hit with version 4.2. Then I click install an then I confirm it an click Finish. And then immediately comes an error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarlint.eclipse.cdt_4.2.0.201909192007.jar.
https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarlint.eclipse.cdt_4.2.0.201909192007.jar
[…]
https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarsource.sonarlint.core.sonarlint-client-api_4.5.0.2626.jar
Artifact not found: https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarsource.sonarlint.core.sonarlint-core_4.5.0.2626.jar.
https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarsource.sonarlint.core.sonarlint-core_4.5.0.2626.jar

On https://www.sonarlint.org/eclipse/ I read that version 4.1 would be the actual one. But I don’t have a choice, I only get version 4.2 at the marketplace.

Hello, thank you for your feedback.

The version on https://www.sonarlint.org/eclipse/ is not up to date (yet), and I confirm that the latest version of SonarLint available on the Eclipse marketplace is 4.2 :slight_smile:

I tried to reproduce this issue with a freshly downloaded Eclipse Mars.2, but I had trouble with the Marketplace client.

However, I did manage to have SonarLint 4.2 installed (and working!) using the “Help > Install New Software…” dialog, and the update site URL provided by the marketplace page: https://eclipse-uc.sonarlint.org

Could you please try with the manual update site install?

There could also be hints about what is wrong in log file in ${workspace}/.metadata/.log.

Hello,

Thank you for your reply. I’m sorry, that I did notice it so late. The notification mail got lost in my spam directory.

I tried it using “Help -> Install new Software…”. It lasts longer and the progressbar said that it did something, but then the same error occured.

In the logfile is the stacktrace, but the message itself stays the same:

!MESSAGE Artifact not found: https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarlint.eclipse.m2e_4.2.0.201909192007.jar.
!STACK 0
java.io.FileNotFoundException: https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarlint.eclipse.m2e_4.2.0.201909192007.jar
at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryStatusHelper.checkFileNotFound(RepositoryStatusHelper.java:297)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.checkException(FileReader.java:478)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.sendRetrieveRequest(FileReader.java:435)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.readInto(FileReader.java:358)
at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.download(RepositoryTransport.java:101)
at org.eclipse.oomph.p2.internal.core.CachingTransport.download(CachingTransport.java:124)
at org.eclipse.oomph.p2.internal.core.CachingTransport.download(CachingTransport.java:235)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:669)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:591)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:723)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:319)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:288)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:223)
at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:153)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:707)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.DownloadJob.run(DownloadJob.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Hello, at this point it looks like there is something in your network that prevents you from accessing the file, e.g a proxy server.

Just to be sure, could you please:

  • Try to download the file by opening the URL in a browser
  • If you have access to the curl utility, show the output of e.g:
curl -O -vvv https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarlint.eclipse.m2e_4.2.0.201909192007.jar

For reference, this is what I get from my development box:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 91.134.125.245...
* TCP_NODELAY set
* Connected to binaries.sonarsource.com (91.134.125.245) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [93 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4613 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: OU=Domain Control Validated; OU=Gandi Standard Wildcard SSL; CN=*.sonarsource.com
*  start date: Mar 28 00:00:00 2019 GMT
*  expire date: Apr  8 23:59:59 2021 GMT
*  subjectAltName: host "binaries.sonarsource.com" matched cert's "*.sonarsource.com"
*  issuer: C=FR; ST=Paris; L=Paris; O=Gandi; CN=Gandi Standard SSL CA 2
*  SSL certificate verify ok.
} [5 bytes data]
> GET /SonarLint-for-Eclipse/releases/4.2.0/plugins/org.sonarlint.eclipse.m2e_4.2.0.201909192007.jar HTTP/1.1
> Host: binaries.sonarsource.com
> User-Agent: curl/7.58.0
> Accept: */*
> 
{ [5 bytes data]
< HTTP/1.1 200 OK
< Date: Tue, 22 Oct 2019 13:10:19 GMT
< Server: Apache
< Strict-Transport-Security: max-age=63072000; preload
< Last-Modified: Thu, 19 Sep 2019 20:09:06 GMT
< ETag: "34cb-592ed868f5c80"
< Accept-Ranges: bytes
< Content-Length: 13515
< Content-Type: application/x-java-archive
< 
{ [5 bytes data]
100 13515  100 13515    0     0   118k      0 --:--:-- --:--:-- --:--:--  118k
* Connection #0 to host binaries.sonarsource.com left intact