Plugin: Time Slip (time tracker) [v1.0.2, 2024-11-12]

I have checked out the log in my profile directory, here are some more clues:

2024-10-02 01:04:56: joplin.plugins: [error] Uncaught exception in plugin "joplin.plugin.alondmnt.time-slip": Error: View already added or there is already a view with this ID: plugin-view-joplin.plugin.alondmnt.time-slip-timeSlipPanel
Error: View already added or there is already a view with this ID: plugin-view-joplin.plugin.alondmnt.time-slip-timeSlipPanel
    at Plugin.addViewController (/tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/Plugin.js:138:19)
    at JoplinViewsPanels.<anonymous> (/tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/api/JoplinViewsPanels.js:49:25)
    at Generator.next (<anonymous>)
    at /tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/api/JoplinViewsPanels.js:9:71
    at new Promise (<anonymous>)
    at __awaiter (/tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/api/JoplinViewsPanels.js:5:12)
    at JoplinViewsPanels.create (/tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/api/JoplinViewsPanels.js:42:16)
    at /tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/utils/executeSandboxCall.js:55:19
    at Generator.next (<anonymous>)
    at /tmp/.mount_JoplinZFnQha/resources/app.asar/node_modules/@joplin/lib/services/plugins/utils/executeSandboxCall.js:8:71
2024-10-02 01:04:56: joplin.plugins: Finished running onStart handler: joplin.plugin.alondmnt.time-slip (Took 265ms)

It seems that my plugins are being initialised more than once?

Further down the log, Time Slip has some complaints:

2024-10-02 01:04:56: PostMessageService: [warn] Cannot receive message because no viewMessageHandler was found {"pluginId":"joplin.plugin.alondmnt.time-slip","viewId":"plugin-view-joplin.plugin.alondmnt.time-slip-timeSlipPanel","contentScriptId":null,"from":"plugin","to":"userWebview","id":"plugin_17277950965660.1178587123889927","content":{"name":"updateRunningTasks","tasks":{}}}
2024-10-02 01:04:56: PostMessageService: [warn] Cannot receive message because no viewMessageHandler was found {"pluginId":"joplin.plugin.alondmnt.time-slip","viewId":"plugin-view-joplin.plugin.alondmnt.time-slip-timeSlipPanel","contentScriptId":null,"from":"plugin","to":"userWebview","id":"plugin_17277950965660.15820855999941652","content":{"name":"updateRunningTasks","tasks":{}}}
2024-10-02 01:04:56: PostMessageService: [warn] Cannot receive message because no viewMessageHandler was found {"pluginId":"joplin.plugin.alondmnt.time-slip","viewId":"plugin-view-joplin.plugin.alondmnt.time-slip-timeSlipPanel","contentScriptId":null,"from":"plugin","to":"userWebview","id":"plugin_17277950965660.13512576568637713","content":{"name":"updateCompletedTasks","tasks":[]}}
2024-10-02 01:04:56: PostMessageService: [warn] Cannot receive message because no viewMessageHandler was found {"pluginId":"joplin.plugin.alondmnt.time-slip","viewId":"plugin-view-joplin.plugin.alondmnt.time-slip-timeSlipPanel","contentScriptId":null,"from":"plugin","to":"userWebview","id":"plugin_17277950965660.009873751814339915","content":{"name":"updateCompletedTasks","tasks":[]}}

Clearly there is something dodgy with my environment / set of plugins.

Thanks for your assistance with troubleshooting, I'll continue to look into this, however I'm leaning towards a new install and limiting my plugins (I have many installed and inactive, some installed that I don't really use, etc) as well as checking the logs to see where things are going wrong

Thanks @ncatanchin for the additional information.

Just making sure that I understood: Were you able to create time-slip notes and add entries to them via the panel?

Is the empty message from your main / first installation of Joplin and the plugin?

This message indeed means that Time Slip is unable to find notes tagged with time-slip. Could you check what Joplin reports as the number of notes tagged with the tag? (for example, I have 3 logs.)

image

I'm not an expert on Joplin's plugin system, but it does look strange. I don't see this in my logs. Perhaps this can explain the "View already added" error.

Having this PostMessageService error right after the plugin starts is normal, I believe, if the panel's JS script has yet to load while the message was sent. This happens on my device as well after Joplin starts (just once in every app session).

EDIT: Please try the latest v0.3.1. I tried to handle one edge case that could explain the behaviour you're experiencing.

Sorry, wasn't terribly clear with my findings!

Confirming that only point 1 in my previous post is related to the fresh install, everything else relates to the original install where I'm having the issues.

time-slip tag currently showing a count of 7:

image

I'll try the updated version ASAP!

Cheers

1 Like

Sort by Endtime - is good. But where is the Duration field, which I wanted to see? How to obtain chronologically ordered list with tasks Durations?

Due to size constraints on mobile, the task list displays 4 columns, depending on your choice, otherwise there is not enough space on screen for the entire table. I might be able to make this behavior dependent on the available space, and show all columns where possible, but no promises.

v0.3.2

  • added: Escape keypress handling in text boxes
  • improved: show all 5 summary columns when panel is wide enough
  • improved: rewrite autocomplete lists

v0.3.1

  • fixed: handle multiple identical time-slip tags

v0.4.0

  • added: setting Order of time logs (ascending / descending by start time)
  • added: setting Auto-sort time logs (see screen capture)
    • you may activate auto-sorting, so that edited entries are automatically resorted
  • added: command Sort Time Slip log (under the Note menu)
  • added: command Copy Time Slip summary (under the Note menu) (see screen capture)
  • fixed: get selected note before calling debounce to handle note switching properly
  • fixed: ensure the log note list is unique
  • various minor improvements

time-slip-sort

3 Likes

@shikuz just want to give you an update on how I'm going with this plugin.

Unfortunately, no good news to share.

  1. The clean Joplin installation where I was successful at getting Time Slip working, is no longer working. I believe this change started right after I configured synchronisation to bring it up to date with my primary installation. No other plugins installed. Same issue / behaviour as primary install.

  2. For my primary installation, I progressively disabled and removed plugins to see if this would help. I have updated the plugin to the latest version 0.4.0. I removed the plugin and then installed it again. No joy.

  3. SQL UNIQUE constraint failed error - see screenshot. This is happening on primary install. It also happened with older versions, so it's not something from a new version of the plugin. Previously, I did open the Joplin sqlite database and removed the offending key, and that stopped the error.

Please also note that all my Joplin installs have been updated to the latest version 3.0.18, running on Ubuntu Linux v24.10.

v0.4.1

  • fixed: handle case where log note tag is not first page of tags (by @ncatanchin) (#1)
  • fixed: handle more than 100 logs

Why the new task starts right after I choose the suggested project name? I'd like to Start tasks by myself.

I find it convenient for quickly entering tasks.
if you select the project first, and the task second, the timer won't start automatically.
but I'll consider changing it, if it's a popular request.

I think that I found a way I'm comfortable with to add Markdown table support, following @Eduardo's request. The new commands enable exporting time logs to Markdown tables (insert the table to a note, or replace current selection), as well as importing time logs from Markdown tables.

v1.0.0

  • added: commands for exporting to markdown and importing from markdown (see screen capture)
    • Note -> Insert Time Slip markdown log
    • Note -> Insert Time Slip markdown summary
    • Tools -> Convert selected table to CSV
  • fixed: Enter key press when no autocomplete item is selected
  • improved: organise commands in Note / Tools menus
  • improved: debounce using lodash

time-slip-markdown

1 Like

Hi @shikuz Thanks for the upgrading.