motschel123 / Mac-Contact-Sync-Obsidian

GNU Affero General Public License v3.0
9 stars 2 forks source link

Error: Error: spawnSync osascript ENOBUFS #1

Closed omaerkhan closed 10 months ago

omaerkhan commented 11 months ago

Hi, I get the following error when running the Sync command:

Error: Error: spawnSync osascript ENOBUFS
    at LoadContactsLogic.get_vcards_string_from_applescript (plugin:sync-contacts-macos:364:13)
    at LoadContactsLogic.loadContacts (plugin:sync-contacts-macos:331:27)
    at Object.callback (plugin:sync-contacts-macos:255:49)

I'm able to sync successfully when I reduce the number of contacts in my smart list... There might be a limit to how much data can be sent from the Contacts app?

I have about 1300 contacts so that might explain why it's running out of space. When I reduce the "Obsidian" Smart List to just 50 or so contacts, it works fine.

Thank you!

motschel123 commented 10 months ago

Thanks for the feedback, I'll work on it.

motschel123 commented 10 months ago

@omaerkhan I just finished and published a new version with an improved AppleScript. As I don't have 1000's of contacts I can't test for it, so please try it and let me know how it goes. 👍

And if it still crashes please let me know what the lower bound is for you

omaerkhan commented 10 months ago

Thank you - brilliant! This particular issue is resolved now...

Interestingly, I get the following message: "Successfully synced 1235 of 1252" so it seems that for some reason, 17 contacts are not being synced... I'll look into it a bit more to see if I can isolate these 17 contacts and figure out why they're being skipped.

Do you think that an error message might be available where the Plugin itself could report why it's skipping some contacts? I'll open another issue once I am able to identify why these 17 are being skipped.

omaerkhan commented 10 months ago

Closing this issue (oops forgot to click that earlier).

omaerkhan commented 10 months ago

@motschel123 - I was able to figure out why the rest of the contacts were not syncing... As well as a few other potential issues...

Not syncing:

Additional issues I noticed:

These issues aren't critical for me, so I won't open an issue for them unless you'd prefer that I do (in case you'd like to track these).

Thank you.

motschel123 commented 10 months ago

I'm glad it works now. I will take a look into special characters in names.

Renaming and delete notes in correspondence to their contact is currently not planned.

motschel123 commented 10 months ago

@omaerkhan If you would like/need the renaming/deletion features, please create a new issue and I'll add it whenever I got time.