[GH-ISSUE #132] mklink 'extensions' and Gradio throw an error #95

Closed
opened 2026-10-30 21:19:02 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Lycoris-SF on GitHub (Mar 2, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/132

After I mklink 'extensions' folder to somewhere else, 'Gradio app' report an error as follow:
ValueError: File cannot be fetched: extensions/ANY OF THE JS FILE FROM ABOVE. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app.
mklink error

And here is as far as i can dig into it, unable to understand it.
github.com/AUTOMATIC1111/stable-diffusion-webui@50059ea661 (commitcomment-98447439)
Right now I can cancel that mklink to let 'extensions' work again, but Im still a little bit curious any way to fix Gradio? Update that web app program?

Originally created by @Lycoris-SF on GitHub (Mar 2, 2023). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/132 After I mklink 'extensions' folder to somewhere else, 'Gradio app' report an error as follow: _ValueError: File cannot be fetched: extensions/ANY OF THE JS FILE FROM ABOVE. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app._ <img width="721" alt="mklink error" src="https://user-images.githubusercontent.com/74293406/222463267-f663b713-4649-4f36-af7f-b4d87703dcd6.png"> And here is as far as i can dig into it, unable to understand it. https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/50059ea661b63967b217e687819cf7a9081e4a0c#commitcomment-98447439 Right now I can cancel that mklink to let 'extensions' work again, but Im still a little bit curious any way to fix Gradio? Update that web app program?
Author
Owner

@DominikDoom commented on GitHub (Mar 2, 2023):

That is sadly a hard limitation by Gradio. They only allow files in the root folder of the app to be fetched for security reasons, since it is essentially a local server and not doing so would allow bad actors to potentially get to any file on your PC (at least as soon as you share the webui on the local network or even the internet). Since it appears they follow the actual symlink location instead of treating it as the "fake" path, these files are now all outside of the root folder, which blocks the request.

There's no proper way to get around that with symlinks as far as I know. Maybe true junctions instead of symlinks would work, but I haven't tried that.

<!-- gh-comment-id:1452141609 --> @DominikDoom commented on GitHub (Mar 2, 2023): That is sadly a hard limitation by Gradio. They only allow files in the root folder of the app to be fetched for security reasons, since it is essentially a local server and not doing so would allow bad actors to potentially get to any file on your PC (at least as soon as you share the webui on the local network or even the internet). Since it appears they follow the actual symlink location instead of treating it as the "fake" path, these files are now all outside of the root folder, which blocks the request. There's no proper way to get around that with symlinks as far as I know. Maybe true junctions instead of symlinks would work, but I haven't tried that.
Author
Owner

@Lycoris-SF commented on GitHub (Mar 3, 2023):

Thx, note taken

<!-- gh-comment-id:1453079076 --> @Lycoris-SF commented on GitHub (Mar 3, 2023): > Thx, note taken
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
DominikDoom/a1111-sd-webui-tagcomplete#95
No description provided.