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

"Can't find variable: Buffer" #3

Closed
robertandrews opened this issue Aug 8, 2022 · 3 comments
Closed

"Can't find variable: Buffer" #3

robertandrews opened this issue Aug 8, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@robertandrews
Copy link

On iPad, a previously-authenticated install is reporting "Can't find variable: Buffer".

My initial setup a few days ago was a little problematic. Initial iPad plugin install (0.0.9) (via BRAT) seemed to work. Then it simply wouldn't pull any bookmarks. I moved to iMac to use Developer Tools to check for messages. It was warning about a problem with the token, so I re-pasted it in, and then pulling bookmarks on iMac worked (and continues to work).

However, on iPad, with the same Obsidian account etc, synced through iCloud, it throws this error and will not pull new bookmarks. I can only sync successfully on Mac.

Anything to do with

buffer-crc32@^0.2.5:
?

@kaiiiz
Copy link
Owner

kaiiiz commented Aug 10, 2022

This is caused by gray-matter, as it seems to only work on the node.js back-end properly. I've replaced the implementation of front matter update logic from gray-matter with built-in parseYaml and stringifyYaml. This has been fixed in the 0.0.10 release, please check out the latest version.

@kaiiiz kaiiiz added the bug Something isn't working label Aug 10, 2022
@robertandrews
Copy link
Author

Seems to work! I deleted 0.0.9, which had been a release-specific install, installed 0.0.10 fresh, set it up and did a sync pull. It added okay on iPadOS.

@kaiiiz kaiiiz closed this as completed Aug 10, 2022
@kaiiiz
Copy link
Owner

kaiiiz commented Aug 11, 2022

v0.0.10 replaced the gray-matter frontmatter update logic with built-in parseYaml and stringifyYaml.

However, I noticed that app.metadataCache.getFileCache has an unexpected behavior after appending the new content to the file. The frontmatter object inside metadataCache is null instead of the latest object. This caused frontmatter duplication bug while updating the post.

I've fixed this issue in v0.0.11. It should work properly now.

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

No branches or pull requests

2 participants