KosmosisDire / obsidian-webpage-export

Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
https://docs.obsidianweb.net/
MIT License
775 stars 64 forks source link

[Bug]: Out of memory and crash while exporting #469

Open vforge opened 2 months ago

vforge commented 2 months ago

What happened?

While exporting my vault I am getting two kinds of issues:

1) First (and sometimes second) click on the icon on the ribbon does nothing. Only the next click opens the modal for me. No errors in the console.

2) More importantly, the entire process of export dies white white export screen. It's during the writing files to disk step. The Modal becomes white (see bug4.png) and the entire Obsidian crashes, leaving only the white window intact.

Now, when the console is open I can catch an out-of-memory exception (see bug1.png) and continue execution until I see the same white screen (see bug4.png)

Reproduction

(I am not able to share the vault)

Last Working Version

Was working before the new modal (with folder selector) was introduces (a long time ago)

Version

1.8.01

Operating System

Windows 11

Obsidian Version

1.6.5

Which browsers can you reproduce this in?

No response

Relevant log output

Log:
[INFO]  Including stylesheet: css-settings-manager

Settings:
    settingsVersion ------------- 1.8.01
    makeOfflineCompatible         true
    inlineAssets ---------------- true
    includePluginCSS              1 plugins included
    includeSvelteCSS ------------ true
    titleProperty                 title
    customHeadContentPath -------
    faviconPath                  
    documentWidth --------------- 40em
    sidebarWidth                  20em
    minOutlineCollapse ---------- 2
    startOutlineCollapsed         false
    allowFoldingHeadings -------- true
    allowFoldingLists             true
    allowResizingSidebars ------- true
    logLevel                      all
    minifyHTML ------------------ true
    makeNamesWebStyle             false
    onlyExportModified ---------- false
    deleteOldFiles                false
    addThemeToggle -------------- true
    addOutline                    false
    addFileNav ------------------ true
    addSearchBar                  false
    addGraphView ---------------- false
    addTitle                      true
    addRSSFeed ------------------ false
    siteURL                      
    authorName ------------------
    vaultTitle                    <nope>
    exportPreset ---------------- documents
    openAfterExport               false
    graphAttractionForce -------- 1
    graphLinkLength               10
    graphRepulsionForce --------- 150
    graphCentralForce             3
    graphEdgePruning ------------ 100
    graphMinNodeSize              3
    graphMaxNodeSize ------------ 7
    showDefaultTreeIcons          false
    emojiStyle ------------------ Native
    defaultFileIcon               lucide//file
    defaultFolderIcon ----------- lucide//folder
    defaultMediaIcon              lucide//file-image
    exportPath ------------------ <nope>
    filesToExport                 17
    inlineCSS ------------------- false
    inlineJS                      false
    inlineImages ---------------- false
    sidebarsAlwaysCollapsible     false
    addFilenameTitle ------------ true
    customLineWidth              
    contentWidth ----------------
    incrementalExport             false
    deleteOldExportedFiles ------ true
    addDarkModeToggle             true
    includeOutline -------------- true
    includeGraphView              true
    includeFileTree ------------- true
    beautifyHTML                  false
    dataviewBlockWaitTime ------- 700
    showWarningsInExportLog       true
    lastExportPath -------------- <nope>
    includeVaultOutline           true
    keepNestedFolderStructure --- false

Enabled Plugins:
    Dataview
    Editor Syntax Highlight
    Mind Map
    Linter
    Diagrams
    Mermaid Tools
    Style Settings
    Leaflet
    Image Gallery
    Settings Search
    Plugin Update Tracker
    Reading Time
    Emoji Shortcodes
    Custom File Extensions Plugin
    Templater
    Regex Find/Replace
    Reveal Active File Button
    Gemmy
    Webpage HTML Export
    Quiet Outline
    Editing Toolbar
    Metadata Menu
    Pane Relief
    Sortable
    Tag Wrangler
    Tags Overview
    Floating Search
    HTML Reader
    File Explorer Note Count
    Nested tags graph
    Omnisearch
    Local Images Plus

Additional Info

Bug1.png: bug1

Bug4.png: bug4

I am also including the memory information from the browser: bug3

KosmosisDire commented 1 month ago

This is unfortunately expected with too large of a vault. Obsidian has a memory limit which is much lower than your system's memory limit. The solution is to allow the files to be written to disk as they go rather than saving everything at the end, but I have not yet implemented this feature.

KosmosisDire commented 2 weeks ago

Hey, I just released a beta version that should address this. If you could try it out and let me know if his issue is fixed and if you find any other issues. There are instructions for installing the beta in the readme :) Thanks!