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

Apple Notes importer not working #144

Closed
franknu opened this issue Oct 19, 2023 · 19 comments · Fixed by #146
Closed

Apple Notes importer not working #144

franknu opened this issue Oct 19, 2023 · 19 comments · Fixed by #146
Labels
apple notes bug Something isn't working

Comments

@franknu
Copy link

franknu commented Oct 19, 2023

I was really looking forward to using the new Apple Notes import option in Importer. But unfortunately it's not working for me. When I follow the instructions and click Open on the popup for "group.com.apple.notes", the importer creates all the folders that are present in my Apple Notes but after that doesn't do anything anymore. The progress bar with the statistics remains on all zeros, no matter how long I leave it running. I've tried it with Apple Notes running and closed, doesn't make a difference. My notes are not locked. Any idea how to troubleshoot?

@rtblair
Copy link

rtblair commented Oct 19, 2023

I've encountered similar behavior.

In my case, it creates one folder and a sub-folder, but no files within either. The importer progress counts all remain at 0.

For me, Apple Notes contains 1200+ notes in ~50 folders. So, it's failing pretty quickly.

There is a detail that is perhaps notable and worth exploring. The subfolder in question contains two of the oldest notes in my library, dating from 2015. Both of those notes have multiple images inserted inline.

@kepano
Copy link
Collaborator

kepano commented Oct 19, 2023

@mirnovov

@kepano kepano added the bug Something isn't working label Oct 19, 2023
@kepano
Copy link
Collaborator

kepano commented Oct 19, 2023

@franknu @rtblair can you provide debug info? Go to the command palette and choose Show debug info then copy/paste that here. Which version of macOS are you using?

@rtblair
Copy link

rtblair commented Oct 19, 2023

MacOS 14.0 @kepano

SYSTEM INFO:
	Obsidian version: v1.4.16
	Installer version: v1.4.13
	Operating system: Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:57 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8112 23.0.0
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: on
	Live preview: on
	Legacy editor: off
	Base theme: light
	Community theme: Minimal v7.3.2
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 10
	Plugins enabled: 10
		1: Actions URI v1.3.1
		2: Advanced URI v1.38.1
		3: Calendar v1.5.10
		4: Convert url to preview (iframe) v0.5.0
		5: Dataview v0.5.61
		6: Importer v1.5.2
		7: Minimal Theme Settings v7.3.0
		8: Natural Language Dates v0.6.1
		9: Tag Wrangler v0.6.1
		10: Templater v1.16.4

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

@franknu
Copy link
Author

franknu commented Oct 19, 2023

SYSTEM INFO:
	Obsidian version: v1.4.16
	Installer version: v1.4.13
	Operating system: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 23.0.0
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: on
	Live preview: on
	Legacy editor: off
	Base theme: light
	Community theme: Prism v3.4.1
	Snippets enabled: 2
	Restricted mode: off
	Plugins installed: 22
	Plugins enabled: 22
		1: Better Word Count v0.10.0
		2: Calendar v1.5.10
		3: Citations v0.4.5
		4: Dataview v0.5.61
		5: Day Planner v0.12.1
		6: Kanban v1.5.3
		7: Pandoc Plugin v0.4.1
		8: Reading Time v1.1.1
		9: Readwise Official v2.0.1
		10: Recent Files v1.3.8
		11: Style Settings v1.0.7
		12: Minimal Theme Settings v7.3.0
		13: Hider v1.3.1
		14: QuickAdd v1.4.0
		15: Tag Wrangler v0.6.1
		16: Outliner v4.8.0
		17: Zotero Integration v3.0.11
		18: Excalidraw v1.9.24
		19: Importer v1.5.1
		20: Projects v1.16.5
		21: Shortcut Launcher v1.0.1
		22: Tasks v4.9.0

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

I'm on MacOS 14.0 (Sonoma).

@mirnovov
Copy link
Contributor

@franknu @rtblair Does it show any errors in the developer console? (This can be shown via View -> Show Developer Tools)

@franknu
Copy link
Author

franknu commented Oct 19, 2023

I'm not sure where to look in the console. Does this help?

app.js:1 Uncaught (in promise) Error: File name cannot contain any of the following characters: \ / :
    at jy (app.js:1:696095)
    at t.checkPath (app.js:1:703345)
    at t.<anonymous> (app.js:1:706008)
    at app.js:1:237027
    at Object.next (app.js:1:237132)
    at app.js:1:236048
    at new Promise (<anonymous>)
    at v (app.js:1:235793)
    at t.createFolder (app.js:1:705896)
    at hr.createFolders (plugin:obsidian-importer:62:2451)
    at hr.resolveFolder (plugin:obsidian-importer:86:411)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async hr.import (plugin:obsidian-importer:72:69)
    at async HTMLButtonElement.eval (plugin:obsidian-importer:200:9812)

@mirnovov
Copy link
Contributor

Yes! It appears that your folder name contains some characters that means it can’t be created. The plugin should take care of this so I’ll work on an update but in the meantime, I’d try removing \ / or : from your folders temporarily.

@franknu
Copy link
Author

franknu commented Oct 19, 2023

Oddly enough my folder names don't contain any of those three characters. They did contain + and < and - and I removed those, but it still doesn't work. I get the same error in the console. Does the same restriction go for the individual notes? I can image I might have used / \ or : in one of the titles of the 459 notes I have.

Uncaught (in promise) Error: File name cannot contain any of the following characters: \ / :
    at jy (app.js:1:696095)
    at t.checkPath (app.js:1:703345)
    at t.<anonymous> (app.js:1:706008)
    at app.js:1:237027
    at Object.next (app.js:1:237132)
    at app.js:1:236048
    at new Promise (<anonymous>)
    at v (app.js:1:235793)
    at t.createFolder (app.js:1:705896)
    at hr.createFolders (plugin:obsidian-importer:62:2451)

@mirnovov
Copy link
Contributor

mirnovov commented Oct 19, 2023

No, since it creates the folders first and then the files. Do your folders have any other sort of special characters in their name? Theoretically this shouldn’t be an issue but it seems to be having difficulty with something in the folder name.

@franknu
Copy link
Author

franknu commented Oct 19, 2023

These are the folders in Apple Notes and after the import in Obsidian. Not all folders are apparently imported. And in Obsidian two folders are added: Geïmporteerd and Geïmporteerd 1 (in Dutch; imported and imported 1 in English).

@mirnovov
Copy link
Contributor

mirnovov commented Oct 20, 2023

Not sure why one of your folders is failing in particular. Anyway, I've made a change so it handles illegal characters in folder names better. And if it fails on a specific folder, it will now show a more visible error in the importer log, keep going, and put the notes inside it in the root folder.

@franknu
Copy link
Author

franknu commented Oct 20, 2023

Okay thanks, I'll give it a try. Is the updated plugin version 1.5.2?

@mirnovov
Copy link
Contributor

@franknu Its not been merged yet I’m afraid, it’ll be 1.5.3

@scarrillo
Copy link

scarrillo commented Oct 23, 2023

Thank you all for the amazing work on this plugin.

Just confirming that this is a problem for both folder and file names. I have many folders and file names that contain colons and dates. For example, a folder named: 1:1 (For one on one meetings).

The Obsidian/Chrome debugger does report the error as mentioned above.

Edit:
I've updated a few folders, but there are many files that contain both characters. The option to use a single substitution character would suffice (for me), though this would be highly subjective. :)

Ex: "RCA: issue title 5/2023" > "RCA- issue title 5-2023".

@mirnovov
Copy link
Contributor

@scarrillo files work for me - are you sure the error isn't being caused by just the folders?

@kepano
Copy link
Collaborator

kepano commented Oct 24, 2023

This should now be fixed if you update to Importer 1.5.3

@franknu
Copy link
Author

franknu commented Oct 24, 2023

It works now! Thanks 🥳

@scarrillo
Copy link

Apologies for the late response. Confirmed fixed.

I was using an older version of Obsidian (1.4.14). Today I upgraded both Obsidian (1.4.16) and Importer (1.5.3) before testing. Previously Importer stalled with no updates, today Importer finished with a clear log of issues that I was able to resolve by tweaking a few Apple Notes.

Note errors which were easily resolved:

  • "because unexpected end of file"
  • "because cannot read properties of undefined (reading 'zhexdata')"
  • "because incorrect header check"

Thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple notes bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants