LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

While Deleting: SyntaxError: Failed to execute 'querySelectorAll' on 'Document'

Open werk21 opened this issue 9 months ago • 0 comments

LocalAI version: v2.27.0 (6d7ac09e96fc85fb45b4ce098b658b5040ed201b)

Environment, CPU architecture, OS, and Version: Linux s211-024 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug After clicking on "Delete" in gallery for "sd-3.5-medium-ggml" the error occurs: Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Document': '#action-div-localai__sd-3.5-medium-ggml' is not a valid selector.

The dot (.) has to be marked \.:

-<button class="float-right inline-block rounded bg-red-800 px-6 pb-2.5 mb-3 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-primary-3 transition duration-150 ease-in-out hover:bg-red-accent-300 hover:shadow-red-2 focus:bg-red-accent-300 focus:shadow-primary-2 focus:outline-none focus:ring-0 active:bg-red-600 active:shadow-primary-2 dark:shadow-black/30 dark:hover:shadow-dark-strong dark:focus:shadow-dark-strong dark:active:shadow-dark-strong" data-twe-ripple-color="light" data-twe-ripple-init="" hx-confirm="Are you sure you wish to delete the model?" hx-post="browse/delete/model/[email protected]" hx-swap="outerHTML" hx-target="#action-div-localai__sd-3.5-medium-ggml" style=""><i class="fa-solid fa-cancel pr-2"></i>Delete</button>
+<button class="float-right inline-block rounded bg-red-800 px-6 pb-2.5 mb-3 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-primary-3 transition duration-150 ease-in-out hover:bg-red-accent-300 hover:shadow-red-2 focus:bg-red-accent-300 focus:shadow-primary-2 focus:outline-none focus:ring-0 active:bg-red-600 active:shadow-primary-2 dark:shadow-black/30 dark:hover:shadow-dark-strong dark:focus:shadow-dark-strong dark:active:shadow-dark-strong" data-twe-ripple-color="light" data-twe-ripple-init="" hx-confirm="Are you sure you wish to delete the model?" hx-post="browse/delete/model/[email protected]" hx-swap="outerHTML" hx-target="#action-div-localai__sd-3\.5-medium-ggml" style=""><i class="fa-solid fa-cancel pr-2"></i>Delete</button>

Also occurs in Reinstall-Button:

-<button class="float-right inline-block rounded bg-primary ml-2 px-6 pb-2.5 mb-3 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-primary-3 transition duration-150 ease-in-out hover:bg-primary-accent-300 hover:shadow-primary-2 focus:bg-primary-accent-300 focus:shadow-primary-2 focus:outline-none focus:ring-0 active:bg-primary-600 active:shadow-primary-2 dark:shadow-black/30 dark:hover:shadow-dark-strong dark:focus:shadow-dark-strong dark:active:shadow-dark-strong" data-twe-ripple-color="light" data-twe-ripple-init="" hx-post="browse/install/model/[email protected]" hx-swap="outerHTML" hx-target="#action-div-localai__sd-3.5-medium-ggml" style=""><i class="fa-solid fa-arrow-rotate-right pr-2"></i>Reinstall</button>
+<button class="float-right inline-block rounded bg-primary ml-2 px-6 pb-2.5 mb-3 pt-2.5 text-xs font-medium uppercase leading-normal text-white shadow-primary-3 transition duration-150 ease-in-out hover:bg-primary-accent-300 hover:shadow-primary-2 focus:bg-primary-accent-300 focus:shadow-primary-2 focus:outline-none focus:ring-0 active:bg-primary-600 active:shadow-primary-2 dark:shadow-black/30 dark:hover:shadow-dark-strong dark:focus:shadow-dark-strong dark:active:shadow-dark-strong" data-twe-ripple-color="light" data-twe-ripple-init="" hx-post="browse/install/model/[email protected]" hx-swap="outerHTML" hx-target="#action-div-localai__sd-3\.5-medium-ggml" style=""><i class="fa-solid fa-arrow-rotate-right pr-2"></i>Reinstall</button>

To Reproduce Install sd-3.5-medium-ggml and try to uninstall via UI.

Expected behavior Delete this model.

werk21 avatar Apr 05 '25 20:04 werk21