hadynz / obsidian-kindle-plugin

Sync your Kindle notes and highlights directly into your Obsidian vault
MIT License
897 stars 52 forks source link

[BUG] Sync hangs after successfully syncing first few books #266

Open inspiredearth opened 9 months ago

inspiredearth commented 9 months ago

Describe the bug

On my first sync attempt it showed there were 13 books, and within a few minutes the sync reached "2/13". The two book files appeared in my allocated folder, with their notes/highlights.

I inadvertently (not knowing it would abort the sync process) clicked someone in the Obsidian app, and the sync popup vanished. So I started it again.

When I tried to initiate sync again it showed there's 2 books synced, and I start the sync again, and it shows it is trying to sync the remaining 11. But even after 15 minutes or more, it appears no progress is made. It just sits on "1/11".

I thought perhaps it's run into an issue with the notes from that particular book. So I added one highlight to a previously highlight-free book. Now when I sync it shows there's 12 books, and the book title shown when it starts syncing ("1/12") is the book I added the one test highlight into.

Again, it sits for a very long time 15+ minutes, before I close the sync pop-up, and no progress.

I also note that if (during the sync process) I hold my mouse over the "Syncing ..." button (which is not clickable) it shows "4 warnings".

Method of syncing

To Reproduce

Steps to reproduce the behaviour:

  1. Click on the sync icon.
  2. Click on "Sync" button in the popup.
  3. "Amazon Cloud" option is already selected. Click on "Sync Now" button.
  4. Share error(s) from Developer Tools console

The error log data related to this plugin is:

/Applications/Obsidian.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/renderer/callbacks-registry.js:54 Uncaught (in promise) Error:  (-337) loading 'https://read.amazon.com/notebook?asin=B005DMEE8O&contentLimitState=&token='
    at rejectAndCleanup (node:electron/js2c/browser_init:2:84929)
    at WebContents.failListener (node:electron/js2c/browser_init:2:85142)
    at WebContents.emit (node:events:513:28)
/Applications/Obsidian.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/renderer/callbacks-registry.js:54 Uncaught (in promise) Error:  (-337) loading 'https://read.amazon.com/notebook?asin=B005DMEE8O&contentLimitState=&token='
    at rejectAndCleanup (node:electron/js2c/browser_init:2:84929)
    at WebContents.failListener (node:electron/js2c/browser_init:2:85142)
    at WebContents.emit (node:events:513:28)
/Applications/Obsidian.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/renderer/callbacks-registry.js:54 Uncaught (in promise) Error:  (-337) loading 'https://read.amazon.com/notebook?asin=B08H2KCJ7D&contentLimitState=&token='
    at rejectAndCleanup (node:electron/js2c/browser_init:2:84929)
    at WebContents.failListener (node:electron/js2c/browser_init:2:85142)
    at WebContents.emit (node:events:513:28)
apply @ /Applications/Obsidian.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/renderer/callbacks-registry.js:54
(anonymous) @ /Applications/Obsidian.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/renderer/remote.js:346
(anonymous) @ /Applications/Obsidian.app/Contents/Resources/app.asar/node_modules/@electron/remote/dist/src/renderer/remote.js:328
emit @ node:events:513
onMessage @ node:electron/js2c/renderer_init:2

Expected behaviour

I expected it to continue where it left off, and complete the syncing of the remaining 12 (now 13) books.

Screenshots

This is the plugin seemingly stuck on the book that I added one highlight to for testing purposes.

CleanShot 2023-10-19 at 19 30 28

This is the "4 warnings" caption that pops up:

CleanShot 2023-10-19 at 19 31 15

Metadata

darrencroton commented 9 months ago

I have exactly the same problem.

Initially I thought it was a filename issue (the book has "80/20" in the title, and "/" isn't an allowed filename character typically). So I removed the highlights from the book and it skipped passed. But then it hung on another book with no such apparent issues. Help!

EDIT: Looks like the book it's struggling with is one I borrowed under Kindle Unlimited then returned. I guess I have some highlights in it. I now don't have access to the book so can't remove the highlights, or even see what might be happening. It's not in my Library on Amazon, but somehow the plugin is finding it. Perhaps this is the reason the plugin is hanging?

matteodiga commented 9 months ago

Same here, just installed the plugin and after synchronization of 5 books now it's hang. Close, re-open obsidian nothing changes.

Note: the book is try to synchronize has a "?" in the title.

matteodiga commented 9 months ago

Problem has been solved when I changed "Amazon region" in the plugin options window, in my case Italy. I signed out from amazon, always from the plugin options window.

I hope this will help.

inspiredearth commented 8 months ago

Today I tried to sync again, just to see if anything different would play out. The sync process competed in full. I am not sure why would have changed. The plugin is still version 1.9.2, and Obsidian is also on the same version. Also, the region was set to the Global region from the get-go.