Uploaded image for project: 'SonarLint Core Library'
  1. SonarLint Core Library
  2. SLCORE-268

Catch all Throwable in telemetry

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.11
    • Component/s: None
    • Labels:
      None

      Description

      Telemetry is designed to not be annoying to users, and not polluting logs, even when there is an issue sending the payload.
      But we are only catching Exception, so this kind of error ca still be visible:

      java.lang.ExceptionInInitializerError
      at org.sonarsource.sonarlint.shaded.okhttp3.internal.tls.CertificateChainCleaner.get(CertificateChainCleaner.java:41)
      at org.sonarsource.sonarlint.shaded.okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.java:782)
      at org.sonarsource.sonarlint.core.util.ws.OkHttpClientBuilder.build(OkHttpClientBuilder.java:191)
      at org.sonarsource.sonarlint.core.util.ws.HttpConnector.(HttpConnector.java:86)
      at org.sonarsource.sonarlint.core.util.ws.HttpConnector.(HttpConnector.java:54)
      at org.sonarsource.sonarlint.core.util.ws.HttpConnector$Builder.build(HttpConnector.java:345)
      at org.sonarsource.sonarlint.core.telemetry.TelemetryHttpFactory.buildClient(TelemetryHttpFactory.java:39)
      at org.sonarsource.sonarlint.core.telemetry.TelemetryClient.upload(TelemetryClient.java:59)
      at org.sonarsource.sonarlint.core.telemetry.TelemetryManager.uploadLazily(TelemetryManager.java:96)
      at org.sonarlint.eclipse.core.internal.telemetry.SonarLintTelemetry.upload(SonarLintTelemetry.java:148)
      at org.sonarlint.eclipse.core.internal.telemetry.SonarLintTelemetry$TelemetryJob.run(SonarLintTelemetry.java:127)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
      Caused by: java.security.ProviderException: Initialization failed
      at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:376)
      at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:103)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at sun.security.jca.ProviderConfig$2.run(Unknown Source)
      at sun.security.jca.ProviderConfig$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.security.jca.ProviderConfig.doLoadProvider(Unknown Source)
      at sun.security.jca.ProviderConfig.getProvider(Unknown Source)
      at sun.security.jca.ProviderList.loadAll(Unknown Source)
      at sun.security.jca.ProviderList.removeInvalid(Unknown Source)
      at sun.security.jca.Providers.getFullProviderList(Unknown Source)
      at java.security.Security.getProviders(Unknown Source)
      at org.sonarsource.sonarlint.shaded.okhttp3.internal.platform.Platform.isConscryptPreferred(Platform.java:196)
      at org.sonarsource.sonarlint.shaded.okhttp3.internal.platform.Platform.findPlatform(Platform.java:208)
      at org.sonarsource.sonarlint.shaded.okhttp3.internal.platform.Platform.(Platform.java:79)
      … 12 more
      Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DEVICE_ERROR
      at sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo(Native Method)
      at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:365)
      … 29 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jeanbaptiste.lievremont Jean-Baptiste Lievremont
              Reporter:
              julien.henry Julien Henry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: