wakatime / jetbrains-wakatime

IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, Goland, Rider, & WebStorm plugin for quantifying your coding.
https://wakatime.com/intellij-idea
BSD 3-Clause "New" or "Revised" License
1.14k stars 167 forks source link

Ignore SSL errors / zscaler corporate proxy #127

Closed mt3o closed 2 years ago

mt3o commented 4 years ago

Please add support to ignoring SSL errors. From behind the corporate proxy, even having proper proxy configuration, it's impossible to push data to the server. Here is what error log has to say about the issue:

{
  "now": "2019/12/04 17:47:35 +0100",
  "version": "13.0.2",
  "plugin": "Python/2019.3 Python-wakatime/9.3.3",
  "time": 1575478033.375,
  "caller": "C:\\Users\\username\\AppData\\Roaming\\WakaTime\\wakatime-master\\wakatime\\api.py",
  "lineno": 125,
  "file": "C:\\Users\\username\\Documents\\search-automation-selenium\\Smokes\\smokes.py",
  "level": "WARNING",
  "message": "{\n  'SSLError': \"HTTPSConnectionPool(host='api.wakatime.com', port=443): Max retries exceeded with url: /api/v1/users/current/heartbeats.bulk (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)')))\",\n  'traceback': 'Traceback (most recent call last):\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\urllib3\\\\connectionpool.py\", line 595, in urlopen\\n    self._prepare_proxy(conn)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\urllib3\\\\connectionpool.py\", line 816, in _prepare_proxy\\n    conn.connect()\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\urllib3\\\\connection.py\", line 326, in connect\\n    ssl_context=context)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\urllib3\\\\util\\\\ssl_.py\", line 329, in ssl_wrap_socket\\n    return context.wrap_socket(sock, server_hostname=server_hostname)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37\\\\lib\\\\ssl.py\", line 423, in wrap_socket\\n    session=session\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37\\\\lib\\\\ssl.py\", line 870, in _create\\n    self.do_handshake()\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37\\\\lib\\\\ssl.py\", line 1139, in do_handshake\\n    self._sslobj.do_handshake()\\nssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)\\n\\nDuring handling of the above exception, another exception occurred:\\n\\nTraceback (most recent call last):\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\requests\\\\adapters.py\", line 440, in send\\n    timeout=timeout\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\urllib3\\\\connectionpool.py\", line 639, in urlopen\\n    _stacktrace=sys.exc_info()[2])\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\urllib3\\\\util\\\\retry.py\", line 388, in increment\\n    raise MaxRetryError(_pool, url, error or ResponseError(cause))\\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=\\'api.wakatime.com\\', port=443): Max retries exceeded with url: /api/v1/users/current/heartbeats.bulk (Caused by SSLError(SSLError(1, \\'[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)\\')))\\n\\nDuring handling of the above exception, another exception occurred:\\n\\nTraceback (most recent call last):\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\api.py\", line 111, in send_heartbeats\\n    verify=ssl_verify)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\requests\\\\sessions.py\", line 555, in post\\n    return self.request(\\'POST\\', url, data=data, json=json, **kwargs)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\requests\\\\sessions.py\", line 508, in request\\n    resp = self.send(prep, **send_kwargs)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\requests\\\\sessions.py\", line 618, in send\\n    r = adapter.send(request, **kwargs)\\n  File \"C:\\\\Users\\\\username\\\\AppData\\\\Roaming\\\\WakaTime\\\\wakatime-master\\\\wakatime\\\\packages\\\\requests\\\\adapters.py\", line 506, in send\\n    raise SSLError(e, request=request)\\nwakatime.packages.requests.exceptions.SSLError: HTTPSConnectionPool(host=\\'api.wakatime.com\\', port=443): Max retries exceeded with url: /api/v1/users/current/heartbeats.bulk (Caused by SSLError(SSLError(1, \\'[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)\\')))\\n'\n}"
}
alanhamlett commented 4 years ago

The reason to ignore SSL errors would be since your heartbeats are synced later when coding outside the corporate network?

How do these errors surface? Do they only show in the ~/.wakatime.log file or also inside your IDE?

mt3o commented 4 years ago

In general, they don't show. They are presented in logs, and the effect is that nothing is reported to back to WakaTime app. In my case, heartbeats won't be synced, because most of the time my PC never leaves the corporate network. Unless, of course, it will be possible to sync without proper SSL.

peterjcole commented 2 years ago

I'm behind the ZScaler proxy as well and had issues installing Wakatime via Webstorm on my mac.

Logs from first install of plugin and subsequent restarts of Webstorm

2022-02-08 08:22:43,839 [   3485]   WARN -                       WakaTime - PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:349)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:292)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:287)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1357)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1232)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1175)
    at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
    at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
    at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
    at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:182)
    at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
    at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1426)
    at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1336)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:450)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:421)
    at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:572)
    at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:197)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
    at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:334)
    at com.wakatime.intellij.plugin.Dependencies.getUrlAsString(Dependencies.java:317)
    at com.wakatime.intellij.plugin.Dependencies.latestCliVersion(Dependencies.java:134)
    at com.wakatime.intellij.plugin.Dependencies.getCLIDownloadUrl(Dependencies.java:236)
    at com.wakatime.intellij.plugin.Dependencies.installCLI(Dependencies.java:176)
    at com.wakatime.intellij.plugin.WakaTime$1.run(WakaTime.java:101)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:263)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
    at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
    at java.base/sun.security.validator.Validator.validate(Validator.java:264)
    at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:222)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1341)
    ... 32 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
    at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
    at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
    at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434)
    ... 38 more
2022-02-08 08:22:43,854 [   3500]   INFO - til.net.ssl.CertificateManager - Default SSL context initialized 
2022-02-08 08:22:43,870 [   3516]  ERROR - nSystem.impl.ActionManagerImpl - Assertion failed: assert !app.isDispatchThread() 
java.lang.Throwable: Assertion failed: assert !app.isDispatchThread()
    at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:218)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.<init>(ActionManagerImpl.java:140)
    at com.jetbrains.rdserver.ui.actionPopupMenu.BackendActionManager.<init>(BackendActionManager.kt:16)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:47)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:876)
    at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:47)
    at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:37)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:60)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:595)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:569)
    at com.intellij.openapi.client.ClientAwareComponentManager.getFromSelfOrCurrentSession(ClientAwareComponentManager.kt:37)
    at com.intellij.openapi.client.ClientAwareComponentManager.getService(ClientAwareComponentManager.kt:22)
    at com.intellij.openapi.actionSystem.ActionManager.getInstance(ActionManager.java:30)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.addAction(DefaultActionGroup.java:168)
    at com.intellij.openapi.actionSystem.DefaultActionGroup.add(DefaultActionGroup.java:139)
    at com.intellij.ui.mac.touchbar.Touchbar.setButtonActions(Touchbar.java:58)
    at com.intellij.ui.mac.touchbar.Touchbar.setButtonActions(Touchbar.java:49)
    at com.intellij.openapi.ui.DialogWrapper.createSouthPanel(DialogWrapper.java:564)
    at com.intellij.openapi.ui.DialogWrapper.init(DialogWrapper.java:1340)
    at com.wakatime.intellij.plugin.ApiKey.<init>(ApiKey.java:31)
    at com.wakatime.intellij.plugin.WakaTime$2.run(WakaTime.java:135)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2022-02-08 08:22:43,876 [   3522]  ERROR - nSystem.impl.ActionManagerImpl - WebStorm 2021.3.2  Build #WS-213.6777.57 
2022-02-08 08:22:43,880 [   3526]  ERROR - nSystem.impl.ActionManagerImpl - JDK: 11.0.13; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2022-02-08 08:22:43,881 [   3527]  ERROR - nSystem.impl.ActionManagerImpl - OS: Mac OS X 
2022-02-08 08:22:43,883 [   3529]  ERROR - nSystem.impl.ActionManagerImpl - Plugin to blame: WakaTime version: 13.1.10 
2022-02-08 08:22:43,883 [   3529]  ERROR - nSystem.impl.ActionManagerImpl - Last Action:  
2022-02-08 08:22:43,950 [   3596]   WARN -                       WakaTime - PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:349)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:292)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:287)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1357)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1232)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1175)
    at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
    at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
    at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421)
    at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:182)
    at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
    at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1426)
    at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1336)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:450)
    at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:421)
    at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:572)
    at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:197)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)
    at java.base/java.net.URL.openStream(URL.java:1165)
    at com.wakatime.intellij.plugin.Dependencies.downloadFile(Dependencies.java:259)
    at com.wakatime.intellij.plugin.Dependencies.installCLI(Dependencies.java:179)
    at com.wakatime.intellij.plugin.WakaTime$1.run(WakaTime.java:101)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:263)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
    at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
    at java.base/sun.security.validator.Validator.validate(Validator.java:264)
    at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:222)
    at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1341)
    ... 30 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
    at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
    at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
    at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434)
    ... 36 more
2022-02-08 08:22:43,951 [   3597]   INFO -                       WakaTime - Finished downloading and installing wakatime-cli. 

Also got this error in the logs:

2022-02-08 08:36:15,134 [  37837]   WARN -                       WakaTime - Cannot run program "/Users/pcole/.wakatime/wakatime-cli-darwin-amd64": error=2, No such file or directory 
java.io.IOException: Cannot run program "/Users/pcole/.wakatime/wakatime-cli-darwin-amd64": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
    at java.base/java.lang.Runtime.exec(Runtime.java:592)
    at java.base/java.lang.Runtime.exec(Runtime.java:451)
    at com.wakatime.intellij.plugin.WakaTime$7.run(WakaTime.java:485)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:263)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
    ... 14 more

As a workaround I got it working by following these steps:

  1. Install the cli using brew - brew install wakatime-cli
  2. Copying the executable from brew to the directory that the plugin was trying to use, and making it executable: cp /usr/local/Cellar/wakatime-cli/1.35.4/bin/wakatime-cli ~/.wakatime/wakatime-cli-darwin-amd64 && chmod +x ~/.wakatime/wakatime-cli-darwin-amd64

(Note for anyone coming to this in the future: the directory to copy from 1.35.4 will change with future wakatime-cli releases so you'll need to find the current directory inside /usr/local/Cellar/wakatime-cli).

alanhamlett commented 2 years ago

Easier than copying from the homebrew directory is downloading the release directly: https://github.com/wakatime/wakatime-cli/releases

Does it work if you add your proxy in your IDE under Tools -> WakaTime Settings?

gandarez commented 2 years ago

Is that still NOK @alanhamlett?

alanhamlett commented 2 years ago

Closing for now unless it's still occurring after setting a proxy.