Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the IDE is not closed for a long time, the waketime time will record errors. #254

Open
ASTARCHEN opened this issue Apr 20, 2023 · 3 comments

Comments

@ASTARCHEN
Copy link

When the IDE is not closed for a long time, the waketime time will record errors.
(OS=windows, IDE=pycharm, waka version=14.1 )
image

@alanhamlett
Copy link
Member

What errors? We need an actual error message from your ~/.wakatime/wakatime.log file or PyCharm's idea.log file.

@ASTARCHEN
Copy link
Author

I can find wakatime. log logs before April 13th, but I cannot find any log data after that.

wakatime.log

{"caller":"cmd/run.go:292","func":"cmd.runCmd","level":"error","message":"failed to run command: today fetch failed: failed fetching today from api: failed to make request to \"https://api.wakatime.com/api/v1/users/current/statusbar/today\": Get \"https://api.wakatime.com/api/v1/users/current/statusbar/today\": dial tcp 143.244.210.202:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.","now":"2023-04-13T14:52:18+08:00","os/arch":"windows/amd64","version":"v1.70.0"}
{"caller":"cmd/params/params.go:366","file":"D:/astar/codes/python/QGisPlugins/AutoEditPlatformHeight/auto_tool_base.py","func":"params.LoadHeartbeatParams","level":"error","message":"failed to read extra heartbeats: failed parsing: failed to json decode from data \"\": unexpected end of JSON input","now":"2023-04-13T17:27:39+08:00","os/arch":"windows/amd64","plugin":"PyCharmCore/2022.3.2 PyCharmCore-wakatime/14.1.4","time":1681378049.3,"version":"v1.70.0"}
{"caller":"cmd/params/params.go:366","file":"D:/astar/codes/python/QGisPlugins/AssistToolPlatform/__init__.py","func":"params.LoadHeartbeatParams","level":"error","message":"failed to read extra heartbeats: failed parsing: failed to json decode from data \"\": unexpected end of JSON input","now":"2023-04-13T18:54:09+08:00","os/arch":"windows/amd64","plugin":"PyCharmCore/2022.3.2 PyCharmCore-wakatime/14.1.4","time":1681383237.268,"version":"v1.70.0"}

idea.log(April 13th)

2023-04-13 16:36:50,474 [17421215]   WARN - WakaTime - Wrong offset: 416947. Should be in range: [0, 107658]
java.lang.IndexOutOfBoundsException: Wrong offset: 416947. Should be in range: [0, 107658]
	at com.intellij.openapi.editor.impl.LineSet.findLineIndex(LineSet.java:166)
	at com.intellij.openapi.editor.impl.DocumentImpl.getLineNumber(DocumentImpl.java:1015)
	at com.wakatime.intellij.plugin.WakaTime.getLineStats(WakaTime.java:621)
	at com.wakatime.intellij.plugin.CustomSaveListener.beforeDocumentSaving(CustomSaveListener.java:34)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:621)
	at com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:466)
	at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:262)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:421)
	at jdk.proxy1/jdk.proxy1.$Proxy26.beforeDocumentSaving(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:172)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:127)
	at jdk.proxy1/jdk.proxy1.$Proxy26.beforeDocumentSaving(Unknown Source)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$doSaveDocumentInWriteAction$4(FileDocumentManagerImpl.java:411)
	at com.intellij.pom.core.impl.PomModelImpl.guardPsiModificationsIn(PomModelImpl.java:326)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.doSaveDocumentInWriteAction(FileDocumentManagerImpl.java:410)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$doSaveDocument$2(FileDocumentManagerImpl.java:371)
	at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:968)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:994)
	at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.doSaveDocument(FileDocumentManagerImpl.java:371)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocuments(FileDocumentManagerImpl.java:291)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:266)
	at com.intellij.configurationStore.SaveAndSyncHandlerImpl$addListeners$2.applicationDeactivated(SaveAndSyncHandlerImpl.kt:155)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:621)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:395)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:374)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:433)
	at jdk.proxy1/jdk.proxy1.$Proxy53.applicationDeactivated(Unknown Source)
	at com.intellij.ide.ApplicationActivationStateManager.updateState(ApplicationActivationStateManager.java:61)
	at com.intellij.ide.IdeEventQueue.processAppActivationEvent(IdeEventQueue.java:869)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:728)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
	at java.desktop/java.awt.SentEvent.dispatch(SentEvent.java:75)
	at java.desktop/java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:262)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:289)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:833)
	at com.intellij.ide.IdeKeyboardFocusManager.lambda$dispatchEvent$0(IdeKeyboardFocusManager.java:32)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
	at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:32)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4903)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/sun.awt.SunToolkit$1.run(SunToolkit.java:516)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

idea.log (April 15th)

2023-04-15 15:05:24,112 [1138137]   WARN - WakaTime - Unexpected end of ZLIB input stream
java.io.EOFException: Unexpected end of ZLIB input stream
	at java.base/java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:244)
	at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
	at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:106)
	at com.wakatime.intellij.plugin.Dependencies.unzip(Dependencies.java:454)
	at com.wakatime.intellij.plugin.Dependencies.installCLI(Dependencies.java:184)
	at com.wakatime.intellij.plugin.WakaTime$1.run(WakaTime.java:117)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:246)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
2023-04-15 15:05:24,113 [1138138]   INFO - WakaTime - Finished upgrading wakatime-cli.
2023-04-15 15:05:35,837 [1149862]   WARN - WakaTime - Cannot run program "C:\Users\ZD\.wakatime\wakatime-cli-windows-amd64.exe": CreateProcess error=32, 另一个程序正在使用此文件,进程无法访问。
java.io.IOException: Cannot run program "C:\Users\ZD\.wakatime\wakatime-cli-windows-amd64.exe": CreateProcess error=32, 另一个程序正在使用此文件,进程无法访问。
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
	at java.base/java.lang.Runtime.exec(Runtime.java:594)
	at java.base/java.lang.Runtime.exec(Runtime.java:453)
	at com.wakatime.intellij.plugin.WakaTime.sendHeartbeat(WakaTime.java:305)
	at com.wakatime.intellij.plugin.WakaTime.processHeartbeatQueue(WakaTime.java:298)
	at com.wakatime.intellij.plugin.WakaTime.access$000(WakaTime.java:52)
	at com.wakatime.intellij.plugin.WakaTime$3.run(WakaTime.java:159)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: CreateProcess error=32, 另一个程序正在使用此文件,进程无法访问。
	at java.base/java.lang.ProcessImpl.create(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:499)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
	... 13 more


@hamza7assanM
Copy link

t also happens when I add my IDE to start on boot - in my case, Ubuntu. The tracker will not work; you have to restart your IDE, and then it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants