[GH-ISSUE #1597] Import nested bookmarks doesn't work #995

Closed
opened 2026-03-02 11:54:14 +03:00 by kerem · 17 comments
Owner

Originally created by @JunoArc on GitHub (Jun 11, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1597

Describe the Bug

Trying to import the nested bookmarks from chrome in html doesn't work. It creates folders but without any bookmarks inside

Steps to Reproduce

  1. user settings
  2. Import / Export Bookmarks
  3. HTML File

Expected Behaviour

All my bookmarks are on the bookmarks bar so I expect them to create folders (and nested folders) with bookmakrs

Screenshots or Additional Context

Image

Device Details

Ubuntu

Exact Karakeep Version

v0.25 docker compose

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @JunoArc on GitHub (Jun 11, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1597 ### Describe the Bug Trying to import the nested bookmarks from chrome in html doesn't work. It creates folders but without any bookmarks inside ### Steps to Reproduce 1. user settings 2. Import / Export Bookmarks 3. HTML File ### Expected Behaviour All my bookmarks are on the bookmarks bar so I expect them to create folders (and nested folders) with bookmakrs ### Screenshots or Additional Context ![Image](https://github.com/user-attachments/assets/e38c251e-0814-4281-bcdb-ec30e967f605) ### Device Details Ubuntu ### Exact Karakeep Version v0.25 docker compose ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
kerem 2026-03-02 11:54:14 +03:00
Author
Owner

@hannibalshosting88 commented on GitHub (Jun 11, 2025):

Having this same problem now, will report back if I find a workaround or solve.

<!-- gh-comment-id:2964011103 --> @hannibalshosting88 commented on GitHub (Jun 11, 2025): Having this same problem now, will report back if I find a workaround or solve.
Author
Owner

@MohamedBassem commented on GitHub (Jun 15, 2025):

This seems like a bug, but at the same time, I can't reproduce it. Can you give me a minimal bookmark file that I can use to repro the problem?

<!-- gh-comment-id:2974581574 --> @MohamedBassem commented on GitHub (Jun 15, 2025): This seems like a bug, but at the same time, I can't reproduce it. Can you give me a minimal bookmark file that I can use to repro the problem?
Author
Owner

@MohamedBassem commented on GitHub (Jun 15, 2025):

For example, created a dummy profile on chrome, and exported the bookmarks and it didn't correctly import the list:

Image

<!-- gh-comment-id:2974583980 --> @MohamedBassem commented on GitHub (Jun 15, 2025): For example, created a dummy profile on chrome, and exported the bookmarks and it didn't correctly import the list: ![Image](https://github.com/user-attachments/assets/6f039f63-76f0-4496-9cd1-71dd61a69f7f)
Author
Owner

@hannibalshosting88 commented on GitHub (Jun 15, 2025):

For me it was the 40 character list name limit, I fixed that and it worked like a charm!

<!-- gh-comment-id:2974654862 --> @hannibalshosting88 commented on GitHub (Jun 15, 2025): For me it was the 40 character list name limit, I fixed that and it worked like a charm!
Author
Owner

@JunoArc commented on GitHub (Jun 26, 2025):

For me it was the 40 character list name limit, I fixed that and it worked like a charm!

40 char limit in the name of the bookmark?

<!-- gh-comment-id:3008099778 --> @JunoArc commented on GitHub (Jun 26, 2025): > For me it was the 40 character list name limit, I fixed that and it worked like a charm! 40 char limit in the name of the bookmark?
Author
Owner

@hannibalshosting88 commented on GitHub (Jun 26, 2025):

For me it was the 40 character list name limit, I fixed that and it worked like a charm!

40 char limit in the name of the bookmark?

Kinda, It's a limit on the folder names as well, so if you have nested bookmark folders.... it's pretty much game over.

<!-- gh-comment-id:3008114852 --> @hannibalshosting88 commented on GitHub (Jun 26, 2025): > > For me it was the 40 character list name limit, I fixed that and it worked like a charm! > > 40 char limit in the name of the bookmark? Kinda, It's a limit on the folder names as well, so if you have nested bookmark folders.... it's pretty much game over.
Author
Owner

@bannert1337 commented on GitHub (Jul 12, 2025):

I have the same issue. Have a structure of nested folders.

[
  {
    "code": "too_big",
    "maximum": 40,
    "type": "string",
    "inclusive": true,
    "exact": false,
    "message": "List name is at most 40 chars",
    "path": [
      "name"
    ]
  }
]
<!-- gh-comment-id:3065101497 --> @bannert1337 commented on GitHub (Jul 12, 2025): I have the same issue. Have a structure of nested folders. ``` [ { "code": "too_big", "maximum": 40, "type": "string", "inclusive": true, "exact": false, "message": "List name is at most 40 chars", "path": [ "name" ] } ] ```
Author
Owner

@bannert1337 commented on GitHub (Jul 12, 2025):

It successfully creates the folder structure, but fails after.
Additionally the folder/list behaviour is awful.

If I delete a folder, all subfolders become new lists, which have to be manually deleted again. Now my Karakeep is cluttered with folders. I would need hours to delete all folders manually by hand. There are no bulk actions for lists/folders...

When a list is to be deleted, which contains nested lists, I would assume the list and all nested lists get deleted.
Alternatively, the user could be informed and prompted how the nested lists should be handled.

This also shows that the import functions need better validation and error handling. If an import cannot be successfully completed, it should not make any changes. This has to be tested before making any changes to the user's collection.

<!-- gh-comment-id:3065109523 --> @bannert1337 commented on GitHub (Jul 12, 2025): It successfully creates the folder structure, but fails after. Additionally the folder/list behaviour is awful. If I delete a folder, all subfolders become new lists, which have to be manually deleted again. Now my Karakeep is cluttered with folders. I would need hours to delete all folders manually by hand. There are no bulk actions for lists/folders... When a list is to be deleted, which contains nested lists, I would assume the list and all nested lists get deleted. Alternatively, the user could be informed and prompted how the nested lists should be handled. This also shows that the import functions need better validation and error handling. If an import cannot be successfully completed, it should not make any changes. This has to be tested before making any changes to the user's collection.
Author
Owner

@MohamedBassem commented on GitHub (Jul 12, 2025):

@bannert1337 I do agree that the behavior of promoting sublists to root lists is intuitive, can you please file another issue?

<!-- gh-comment-id:3065112544 --> @MohamedBassem commented on GitHub (Jul 12, 2025): @bannert1337 I do agree that the behavior of promoting sublists to root lists is intuitive, can you please file another issue?
Author
Owner

@bannert1337 commented on GitHub (Jul 12, 2025):

There also seems to be no way for a user to delete everything and start over.

<!-- gh-comment-id:3065112603 --> @bannert1337 commented on GitHub (Jul 12, 2025): There also seems to be no way for a user to delete everything and start over.
Author
Owner

@MohamedBassem commented on GitHub (Jul 12, 2025):

@bannert1337 I also agree regarding the validation, this could be another issue :)

<!-- gh-comment-id:3065113425 --> @MohamedBassem commented on GitHub (Jul 12, 2025): @bannert1337 I also agree regarding the validation, this could be another issue :)
Author
Owner

@qixing-jk commented on GitHub (Jul 15, 2025):

Yes, I encountered this problem when importing thousands of bookmarks.
Because of the length restrictions and slash segmentation issues, I checked based on the HTML itself, and used the karakeep API in Python to delete the failed ones and start from scratch. After repeating several times, I finally imported it completely.
My personal experience now is that karakeep does bring a different folder organization structure, but the original folder organization is conducive to maintaining a natural change in usage habits rather than a huge pain during migration.
And sometimes the search results are not as fast as searching directly from the folders that were manually classified before.

<!-- gh-comment-id:3075166219 --> @qixing-jk commented on GitHub (Jul 15, 2025): Yes, I encountered this problem when importing thousands of bookmarks. Because of the length restrictions and slash segmentation issues, I checked based on the HTML itself, and used the karakeep API in Python to delete the failed ones and start from scratch. After repeating several times, I finally imported it completely. My personal experience now is that karakeep does bring a different folder organization structure, but the original folder organization is conducive to maintaining a natural change in usage habits rather than a huge pain during migration. And sometimes the search results are not as fast as searching directly from the folders that were manually classified before.
Author
Owner

@MohamedBassem commented on GitHub (Jul 19, 2025):

Ok, folks, I want to solve this problem, but I need a way to repro it. Can anyone give me a minimal bookmark file to repro it? Or can explain to me why nested folders hit list name limits? Or do you legitimately have folders with more than 40chars?

<!-- gh-comment-id:3092115324 --> @MohamedBassem commented on GitHub (Jul 19, 2025): Ok, folks, I want to solve this problem, but I need a way to repro it. Can anyone give me a minimal bookmark file to repro it? Or can explain to me why nested folders hit list name limits? Or do you legitimately have folders with more than 40chars?
Author
Owner

@qixing-jk commented on GitHub (Jul 19, 2025):

There are indeed folder names with more than 40 characters, and there are more than a dozen such folders. And when the folder name contains /, the folder name is cut off, I guess the reason of it is github.com/karakeep-app/karakeep@f3feb59994/apps/web/components/settings/ImportExport.tsx (L228)

As for why the name is so long, it is because folders are a good way to describe the contents of a folder when using bookmarks. Native bookmarks do not support description fields.

<!-- gh-comment-id:3092193236 --> @qixing-jk commented on GitHub (Jul 19, 2025): There are indeed folder names with more than 40 characters, and there are more than a dozen such folders. And when the folder name contains /, the folder name is cut off, I guess the reason of it is https://github.com/karakeep-app/karakeep/blob/f3feb5999430fbab5afd888b90e05656f938ac96/apps/web/components/settings/ImportExport.tsx#L228 As for why the name is so long, it is because folders are a good way to describe the contents of a folder when using bookmarks. Native bookmarks do not support description fields.
Author
Owner

@MohamedBassem commented on GitHub (Jul 19, 2025):

Ok, so the truncation problem because of slash in the name I think I can solve. And for large folder names, I can bump the limit to 100 chars and truncate it if it's longer?

<!-- gh-comment-id:3092198418 --> @MohamedBassem commented on GitHub (Jul 19, 2025): Ok, so the truncation problem because of slash in the name I think I can solve. And for large folder names, I can bump the limit to 100 chars and truncate it if it's longer?
Author
Owner

@MyBlood commented on GitHub (Jul 24, 2025):

Friends, greetings! Has there been any solution? I have more than 5000 bookmarks exported in HTML format, I do not know how to deal with it. 😜

<!-- gh-comment-id:3111633895 --> @MyBlood commented on GitHub (Jul 24, 2025): Friends, greetings! Has there been any solution? I have more than 5000 bookmarks exported in HTML format, I do not know how to deal with it. 😜
Author
Owner

@trinomically commented on GitHub (Aug 28, 2025):

Hello, I have went searching to find anyone with the same issue and found this thread for the same problem. I am a new karakeep user and I really like the project and want to use it. I just setup my docker container and I've been trying out the android app too. When I tried to import my HTML file of my brave browser bookmarks, I also hit this 40 char limit warning. All my nested folders partially imported with zero actual bookmarks inside them so I had to manually delete the empty nested folders one by one which was a little time consuming!

<!-- gh-comment-id:3234298999 --> @trinomically commented on GitHub (Aug 28, 2025): Hello, I have went searching to find anyone with the same issue and found this thread for the same problem. I am a new karakeep user and I really like the project and want to use it. I just setup my docker container and I've been trying out the android app too. When I tried to import my HTML file of my brave browser bookmarks, I also hit this 40 char limit warning. All my nested folders partially imported with zero actual bookmarks inside them so I had to manually delete the empty nested folders one by one which was a little time consuming!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#995
No description provided.