liamcain / obsidian-things-logbook

Sync your Things 3 Logbook with Obsidian
MIT License
120 stars 22 forks source link

Sync stopped working #44

Open aaronjz opened 1 year ago

aaronjz commented 1 year ago

Before Submitting: Double-check that you are running the latest version of the plugin. The bug might have already been fixed 😄

Describe the bug

After the latest Things 3 update (3.17.4), the Things Logbook plugin stopped syncing.

Steps to reproduce

  1. Run the Things Logbook: Sync command.
  2. See error, "Things Logbook sync failed."

Expected behavior

To sync completed tasks from the Logbook.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please specify)

OS

macOS 12.6.3

Obsidian Version (e.g. v0.10.6)

1.1.16

Theme (if applicable):

If the bug is visual, please provide the name of the Community Theme you're using.

ChipMorris commented 1 year ago

Same problem. macOS Ventura 13.2.1. M1 mini. Things 3.17.4. May be related to update of URL scheme.

dentonjacobs commented 1 year ago

Some discussion on Reddit indicates that the location and structure of the local database has changed. Perhaps details there are helpful.

netfly commented 1 year ago

You need to change the following constant and add the Folder "ThingsData-S6UZE" to the path.

const THINGS_DB_PATH = "~/Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-S6UZE/Things Database.thingsdatabase/main.sqlite";

sacbegg commented 1 year ago

@netfly Sorry can you explain more?, where should I make the changes?

netfly commented 1 year ago

@netfly Sorry can you explain more?, where should I make the changes?

In your Obsidian Vault-Folder (in the Filesystem) there is a folder called .obsidian/plugins/things-logbook. There is a main.js. Open it with an editor and search for this constant THINGS_DB_PATH. For me it is on line 570, but I already changed some code. Overwrite this line with the following code: const THINGS_DB_PATH = "~/Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-S6UZE/Things Database.thingsdatabase/main.sqlite";

I think I will write a pullrequest for this fix, but for now you can do this manually. hope this helped.

sacbegg commented 1 year ago

@netfly Sorry can you explain more?, where should I make the changes?

In your Obsidian Vault-Folder (in the Filesystem) there is a folder called .obsidian/plugins/things-logbook. There is a main.js. Open it with an editor and search for this constant THINGS_DB_PATH. For me it is on line 570, but I already changed some code. Overwrite this line with the following code: const THINGS_DB_PATH = "~/Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-S6UZE/Things Database.thingsdatabase/main.sqlite";

I think I will write a pullrequest for this fix, but for now you can do this manually. hope this helped.

Thanks!!! By the way the name of this folder ThingsData-S6UZE, I think it changes on each computer on mine it was ThingsData-9D38J

netfly commented 1 year ago

Hmm ... thats bad. So it's not possible to have this path hardcoded as a constant anymore. In this case we either need a setting to save this generated folder name (which is not very user friendly) or get the info at the initialize.

aaronjz commented 1 year ago

I also had a different folder name. It's back to working like normal for me after adding that folder to the constant. Thanks, @netfly!

likeweiss commented 1 year ago

Had the same issue and fixed it using PATH code above. Mine was also a different alphanumeric string after ThingsData-_____ so I can confirm it does change based on your computer. Thank you!

themanofsilver commented 1 year ago

Brilliant. Thanks so much @netfly ... this solution worked for me (but needed to rename with my database string).

adarsh commented 1 year ago

Many have noticed the database location has recently changed (link to Reddit discussion).