TriliumNext / Notes

Build your personal knowledge base with TriliumNext Notes
https://triliumnext.github.io/Docs/
GNU Affero General Public License v3.0
1.04k stars 59 forks source link

(Bug report) Error importing zip file #281

Closed talkahe closed 3 months ago

talkahe commented 3 months ago

TriliumNext Version

0.90.2-beta

What operating system are you using?

Windows

What is your setup?

Local (no sync)

Operating System Version

Windows 11 Pro 23H2

Description

Hi,

I encountered an issue when importing an "HTML file in ZIP archive", which was exported from Trilium 0.63.7. Despite trying different import options, the result remained the same: a popup titled "Import status" showing "Import in progress: 0", followed by getting stuck at this point. Also I received an error message in the console stating Refused to set unsafe header "cookie". Upon refreshing the page manually, only notes up to the render note using the Collection Views plugin were imported. When attempting to re-import this same file into Trilium 0.63.7, there are no issues.

trilium

Attached is the zip file used for testing: root 1.zip

Error logs

Backend logs

21:27:52.696 200 GET /api/script/startup with 2 bytes took 1ms
21:27:59.766 Sending message to all clients: {"type":"taskProgressCount","taskId":"UhPja4bG5Y","taskType":"importNotes","data":{"safeImport":false,"shrinkImages":true,"textImportedAsText":true,"codeImportedAsCode":true,"explodeArchives":true,"replaceUnderscoresWithSpaces":true},"progressCount":0}
21:27:59.783 Created new note 'IMo4RQGsBpaM', branch 'root_IMo4RQGsBpaM' of type 'text', mime 'text/html'
21:27:59.787 Created new note 'nLL5cwpeIl5U', branch 'IMo4RQGsBpaM_nLL5cwpeIl5U' of type 'text', mime 'text/html'
21:27:59.790 Created new note 'zrNohlzVOpWC', branch 'IMo4RQGsBpaM_zrNohlzVOpWC' of type 'canvas', mime 'application/json'
21:27:59.811 Created new note 'zX08RxlyKWHn', branch 'IMo4RQGsBpaM_zX08RxlyKWHn' of type 'mermaid', mime 'text/plain'
21:27:59.814 Error: Unable to resolve mime type.
21:28:06.275 200 GET /api/note-map/_backendLog/backlink-count with 11 bytes took 0ms
eliandoran commented 3 months ago

@talkahe , thank you for the very well described issue. I can reproduce the issue and I will start working on a fix. Please be on stand-by.

eliandoran commented 3 months ago

@talkahe , it should be OK now. You can test by accessing https://github.com/TriliumNext/Notes/actions/runs/10134620090 once the CI finishes.

talkahe commented 3 months ago

Thank you so much! I've been able to import the full zip file of my actual instance.