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

Webstorm 2018.2.4 x64 cannot initialize wakatime plugin #109

Closed mihailgaberov closed 6 years ago

mihailgaberov commented 6 years ago

What steps will reproduce the problem? Install Wakatime plugin Restart WebStorm Exception occurs, WebStorm is unable to start. What is the expected result? WebStorm opens normally and Wakatime plugin works as expected

What happens instead? Internal error occurs (java.lang.NoClassDefFoundError)

WebStorm log:

Plugin 'com.wakatime.intellij.plugin' failed to initialize and will be disabled.  Please restart WebStorm.

java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
    at com.sun.jna.Pointer.<clinit>(Pointer.java:54)
    at com.sun.jna.platform.win32.WinReg$HKEY.<init>(WinReg.java:42)
    at com.sun.jna.platform.win32.WinReg.<clinit>(WinReg.java:71)
    at com.wakatime.intellij.plugin.Dependencies.getPythonLocation(Dependencies.java:83)
    at com.wakatime.intellij.plugin.Dependencies.isPythonInstalled(Dependencies.java:45)
    at com.wakatime.intellij.plugin.WakaTime.initComponent(WakaTime.java:87)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:488)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:107)
    at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:446)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:580)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:453)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:91)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:405)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:391)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:209)
    at com.intellij.idea.IdeaApplication.a(IdeaApplication.java:75)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:361)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
alanhamlett commented 6 years ago

Fixed in v9.2.2 released today. Let me know if the plugin works after updating.

mihailgaberov commented 6 years ago

Looks like it's working fine now. Thank you!

mihailgaberov commented 6 years ago

But...looks like no data is being sent. At least I still don't see anything in my dashboard from WebStorm.

alanhamlett commented 6 years ago

After turning on debug mode do you see errors in your \Users\<user>\.wakatime.log file? Also check your idea.log file. My guess is it's encountering an error when running wakatime-cli using the Python version installed on your machine. Probably installing the latest Python would fix it, but the error in that logfile will tell us for sure.

The troubleshooting section of this repo has a link to finding your idea.log file.

mihailgaberov commented 6 years ago

Thank you for the quick response! I will check it and keep you posted.

Regards, Mihail

On Mon, 15 Oct 2018 at 19:14, Alan Hamlett notifications@github.com wrote:

After turning on debug mode do you see errors in your \Users\.wakatime.log file? Also check your idea.log file. My guess is it's encountering an error when running wakatime-cli using the Python version installed on your machine. Probably installing the latest Python would fix it, but the error in that logfile will tell us for sure.

The troubleshooting section of this repo has a link to finding your idea.log file.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wakatime/jetbrains-wakatime/issues/109#issuecomment-429937572, or mute the thread https://github.com/notifications/unsubscribe-auth/ACYtEBzL0YnviDpXhc_G4bz2nHRoECzqks5ulMJbgaJpZM4XahGf .

mihailgaberov commented 6 years ago

Yup! You were right, @alanhamlett! Installing the latest version of Python fixed the issue. Big thanks!