mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #16037] issue: Saving tools as a group user fails due to automatically appending "Loading click Loaded click" at the beginning #17761
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vincent0408 on GitHub (Jul 26, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16037
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.18
Ollama Version (if applicable)
No response
Operating System
Windows 11/Debian
Browser (if applicable)
Firefox/Edge
Confirmation
README.md.Expected Behavior
When giving tools permission to group users, users should be able to simply save their tools.
Actual Behavior
It formats the code correctly, then adds "Loading click Loaded click" at the beginning.
Steps to Reproduce
Logs & Screenshots
Additional Information
@rgaricano commented on GitHub (Jul 26, 2025):
It's not related to users or groups; the problem is due to an incorrect import, which for some reason introduced informational tags used in the import process into the temporary file (used to add the tool/feature).
Probably due to some kind of connection/transmission error.
Does this always happen, or does it disappear if you retry the tool import?
@vincent0408 commented on GitHub (Jul 26, 2025):
It does not occur when saving tool scripts as admin, and since by default users are not allowed to access workspace, I specified group user to avoid confusion. It happens to any tool script even the default one, and as for now I cannot find a method to remove the error other than promoting the user to be an admin.
@rgaricano commented on GitHub (Jul 26, 2025):
But when did this happen? By importing the tool from https://openwebui.com or by copying/pasting?
are you tried editing and removing those lines manually?
@vincent0408 commented on GitHub (Jul 26, 2025):
It is reproducible when saving the default tool script template, that is:
Press + in Tools, type sth in title and description, save. Tested on Windows and (offline)Debian.
Removing manually was the first thing I did, the two lines came back automatically.
@rgaricano commented on GitHub (Jul 26, 2025):
Confirmed,
(adding tool just with default content, without add any content)
the error arise because when any content is added it try to add the content of the tool from a temporary tool file (previous ones, not related with default)....,
it's necessary recheck the logic in the tool create process.
(before try to add the default content I tried to import &| copy paste other tool & I named test1, in that case if don't do nothing, any message, any tool added, but temp file is there)
@vincent0408 commented on GitHub (Jul 26, 2025):
Would be interesting to know why admins can save properly, from the context I'm guessing admins have r/w control over the temp file but users may lack required permissions?
Also, as a group user the import function is not there, hence I never got the chance to try it.
@rgaricano commented on GitHub (Jul 26, 2025):
I deleted the update because I make a mistake: i tried with admin account... the error still there.
@rgaricano commented on GitHub (Jul 26, 2025):
OK, tested and solved with this changes:
b8912aa671/src/lib/components/common/CodeEditor.svelte (L181)changed by:
($user?.role === 'admin' || $user?.permissions?.features?.code_interpreter)b8912aa671/backend/open_webui/routers/utils.py (L36)changed by:
async def format_code(form_data: CodeForm, user=Depends(get_verified_user)):I added the code_interpreter permission for consistency, if user don't have permission for the code interpreter user shouldn't have it to change or format the code either. The tools permission could also be used.
PR: https://github.com/open-webui/open-webui/pull/16044
@vincent0408 commented on GitHub (Jul 27, 2025):
Thanks for the PR!
@tjbck commented on GitHub (Jul 28, 2025):
Incorrect python should not be accepted.
@GamerGuy95953 commented on GitHub (Jul 28, 2025):
Pull request with the fix was closed meaning no offical fix was done yet. :(
@tjbck commented on GitHub (Jul 28, 2025):
@GamerGuy95953 "Loading" is not a valid python syntax.
@GamerGuy95953 commented on GitHub (Jul 28, 2025):
You are right, but the problem is that it adds those lines automatically every time we click "Save" and there is no way to remove it.
See video attatched:
https://github.com/user-attachments/assets/43ef1ece-187b-4580-85e4-bb8fa7dfd3c8
@rgaricano commented on GitHub (Jul 28, 2025):
yes, its are added by frontend because it begin the proccess of create function but fault in code formatter.
It happend in my side too, anyway, with or without that lines the tool or function isn't added, any advice message neither.
@vincent0408 commented on GitHub (Jul 29, 2025):
If you can't even bother to test this reproducible and obvious bug, why take the time to close this issue?
@rgaricano commented on GitHub (Jul 29, 2025):
https://github.com/open-webui/open-webui/pull/16044#issuecomment-3132037012
@tjbck commented on GitHub (Jul 29, 2025):
@GamerGuy95953 Thanks for the clarification, I got confused with the PR addressing an unrelated part, taking a look right now.
@tjbck commented on GitHub (Jul 29, 2025):
@vincent0408 Just managed to reproduce with FF, I was extra confused because we were unable to reproduce this issue on Chromium based browsers. Are you using FF as well?
@vincent0408 commented on GitHub (Jul 29, 2025):
I experienced this issue on Firefox and Edge
@tjbck commented on GitHub (Jul 29, 2025):
@vincent0408 I'd appreciate if you could fill out the entire issues template, including the browser section, going forward. Taking a look right now!
@vincent0408 commented on GitHub (Jul 29, 2025):
Updated browser section
@rgaricano commented on GitHub (Jul 29, 2025):
@tjbck commented on GitHub (Jul 29, 2025):
Addressed with
071a2ac835in dev!@rgaricano commented on GitHub (Jul 29, 2025):
Tested & working properly, just a qq:
do you know from where was the extra code, from frontend or from pyodide lib loader?
(by the way, sometimes codeformatter is a little bit slow, a event indicating that is working would be welcome)
thanks,
(NOTE: I saw that in formatPythonCodeHandler the call is await, formatPythonCode is async but formatPythonCodePyodide seem that not, I don't know it this can be a problem, formatting sometimes it's a little bit slow, I had to increase the worker timeout)
@17jmumford commented on GitHub (Jul 29, 2025):
Thank you, we were getting the same bug. Group users were seeing a 'Click loading' 'Click loaded' inserted to the top of the file when they hit the save button.
Will watch for this fix.
@GamerGuy95953 commented on GitHub (Jul 30, 2025):
Can confirm that it is working again on the dev branch! Thank you!
@Lashatabidze commented on GitHub (Aug 3, 2025):
Greetings. Is this error resolved? Because im clearly facing the same problem and dont know how to deal with it. Could anyone please help?
@17jmumford commented on GitHub (Aug 4, 2025):
@Lashatabidze you'll need to wait until it gets released. Note that they merged the fix in last week to the 'dev' branch, and there have been no releases in the past two weeks. Watch the releases page for an update that notes the fix. Likely v0.6.19 if I had to guess (I'm too lazy to go digging through the pre-release branches to know for sure).
In the meantime, any admin can make a tool and share it with others. It's only non-admins that are affected.
@rgaricano commented on GitHub (Aug 4, 2025):
if docker, also you can use some of the most recent dev builts: https://github.com/open-webui/open-webui/pkgs/container/open-webui/versions?filters%5Bversion_type%5D=tagged
@Lashatabidze commented on GitHub (Aug 5, 2025):
Greetings and thanks for the answer!
Just to confirm — we understand that the issue with tool creation is
already fixed in the dev branch of Open WebUI, in commit
071a2ac.So we are currently waiting for this fix to be included in an upcoming
stable release, correct?
Once that stable version is released, we’ll be able to use the tool
creation feature without the syntax error. - is everything correct?
On Mon, 4 Aug 2025 at 20:24, 00 @.***> wrote:
@Lashatabidze commented on GitHub (Aug 13, 2025):
the matter has been resolved but as im checking the problem still exists - I still can not create a tool. Can you please help?
@rgaricano commented on GitHub (Aug 13, 2025):
it's fixed in versions => 0.6.19