hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
6.63k stars 240 forks source link

Unable to do a mass import #359

Closed iosdave closed 3 months ago

iosdave commented 3 months ago

Hello,

I just deployed hoarder on unraid. Im able to manually add bookmarks without any issues.

However, i have an html export of pinboard, dragging that to the UI fails to import any of the links (I get multiple errors stating, failed to fetch followed by something went wrong).

I tried importing using the hoarder-cli as referenced in the documentation .

Here is the command im using and the an example of the error.

cat all_links.txt | xargs -I{} hoarder --api-key 'api_key' --server-addr http://serverip:3060 bookmarks add --link {}

Error: Failed to add a link bookmark for url "https://www.bleepingcomputer.com/news/security/azure-domains-and-google-abused-to-spread-disinformation-and-malware/". Reason: No fetch implementation found [] Error: Failed to add a link bookmark for url "https://www.reddit.com/r/devops/comments/1eulgi0/any_good_podcasts_for_devops/". Reason: No fetch implementation found []

Error: Failed to add a link bookmark for url "https://blog.codinghorror.com/programmers-dont-read-books-but-you-should/". Reason: No fetch implementation found []

I have all the containers needed deployed (hoarder, hoarder-worker, redis, browserless, melli) Whats bizarre, is both attempts (ui and cli) do not create entries in any of the logs.

iosdave commented 3 months ago

UPDATE:

I deployed the stack on my local machine (mac) using docker compose, running into the same issue. mass import gives me the same errors.

kamtschatka commented 3 months ago

Is it the same as this? https://github.com/hoarder-app/hoarder/issues/281 Are you importing too many bookmarks at once?

iosdave commented 3 months ago

Is it the same as this? #281 Are you importing too many bookmarks at once?

same issue, but it has nothing to do with the amount of links. I removed all but two urls. same error.

CleanShot 2024-08-22 at 11 50 13@2x

iosdave commented 3 months ago

here is another attempt with diff urls...

CleanShot 2024-08-22 at 11 55 29@2x

MohamedBassem commented 3 months ago

can you share your nodejs version? My guess is that you have an old nodejs installed.

iosdave commented 3 months ago

Hoarder Web:

root@Tower:~# docker exec -it ca623d4e624c sh /app/apps/web # node --version v21.7.3 /app/apps/web #

Hoarder Worker:

root@Tower:~# docker exec -it f53a35c089c1 sh /app/apps/workers # node --version v21.7.3

kamtschatka commented 3 months ago

those are showing the nodejs versions in the docker containers, but I am guessing you are running the cli from your own machine, since it shows /Downloads as the directory where you are executing the command? I had a look at the trpc code and it is basically just throwing this error, when window.fetch or globalThis.fetch are not defined, which should only be the case on older nodejs versions. Since nodejs is part of the docker images, that would be rather strange if it would only affect you.

iosdave commented 3 months ago

Issue partially resolved. Still seeing the issue with dragging the bookmarks html to the web ui.

Upgrading node on my local machine to the latest version resolved the CLI issue. I can use the cli to import rest of my links now. TY!

CleanShot 2024-08-22 at 16 45 00@2x