[GH-ISSUE #553] [Bug]: ComfyUI-Studio plugin cant access image resouce #160

Closed
opened 2026-10-31 22:09:26 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @KarryCharon on GitHub (Dec 24, 2024).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/553

App Version

v0.4.0

Expected Behavior

Actual Behavior

Steps to Reproduce

Debug Logs

-

Browser Logs

Setting JSON

{
"Comfy-Desktop.AutoUpdate": true,
"Comfy-Desktop.SendStatistics": true,
"Comfy.ColorPalette": "dark",
"Comfy.UseNewMenu": "Top",
"Comfy.Workflow.WorkflowTabsPosition": "Topbar",
"Comfy.Workflow.ShowMissingModelsWarning": true,
"Comfy.Server.LaunchArgs": {
"enable-cors-header": ""
},
"AGL.Locale": "zh-CN",
"LiteGraph.Canvas.MaximumFps": 60,
"Comfy.DevMode": true,
"Comfy.Server.ServerConfigValues": {
"enable-cors-header": "
"
}
}

Other

https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Studio/issues/67
Image cannot query from local comfyui server. Meet 403 forbidden status code.
We've tried config like --enable-cors-header * and --enable-cors-header "*", neither of them worked.
Maybe caused by CORS policy.

┆Issue is synchronized with this Notion page by Unito

Originally created by @KarryCharon on GitHub (Dec 24, 2024). Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/553 ### App Version v0.4.0 ### Expected Behavior - ### Actual Behavior - ### Steps to Reproduce - ### Debug Logs ```powershell - ``` ### Browser Logs - ### Setting JSON { "Comfy-Desktop.AutoUpdate": true, "Comfy-Desktop.SendStatistics": true, "Comfy.ColorPalette": "dark", "Comfy.UseNewMenu": "Top", "Comfy.Workflow.WorkflowTabsPosition": "Topbar", "Comfy.Workflow.ShowMissingModelsWarning": true, "Comfy.Server.LaunchArgs": { "enable-cors-header": "*" }, "AGL.Locale": "zh-CN", "LiteGraph.Canvas.MaximumFps": 60, "Comfy.DevMode": true, "Comfy.Server.ServerConfigValues": { "enable-cors-header": "*" } } ### Other https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Studio/issues/67 Image cannot query from local comfyui server. Meet 403 forbidden status code. We've tried config like `--enable-cors-header *` and `--enable-cors-header "*"`, neither of them worked. Maybe caused by CORS policy. ┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-553-Bug-ComfyUI-Studio-plugin-cant-access-image-resouce-1666d73d3650817ab664e1c690531c46) by [Unito](https://www.unito.io)
Author
Owner

@robinjhuang commented on GitHub (Jan 1, 2025):

@KarryCharon How does the extension access images? Is it calling a ComfyUI API? Can help look into this

<!-- gh-comment-id:2566780407 --> @robinjhuang commented on GitHub (Jan 1, 2025): @KarryCharon How does the extension access images? Is it calling a ComfyUI API? Can help look into this
Author
Owner

@KarryCharon commented on GitHub (Jan 2, 2025):

@KarryCharon How does the extension access images? Is it calling a ComfyUI API? Can help look into this

I was made this local pc image path as web StaticResource, so this addon can access image like
http://127.0.0.1:8000/Users/xxx/yyy.png?t=1735786023.1082802

<!-- gh-comment-id:2567239811 --> @KarryCharon commented on GitHub (Jan 2, 2025): > @KarryCharon How does the extension access images? Is it calling a ComfyUI API? Can help look into this I was made this local pc image path as web StaticResource, so this addon can access image like `http://127.0.0.1:8000/Users/xxx/yyy.png?t=1735786023.1082802`
Author
Owner

@KarryCharon commented on GitHub (Jan 2, 2025):

@KarryCharon How does the extension access images? Is it calling a ComfyUI API? Can help look into this

It works fine on MacOS, but get 403 Forbidden on windows.
image

<!-- gh-comment-id:2567242971 --> @KarryCharon commented on GitHub (Jan 2, 2025): > @KarryCharon How does the extension access images? Is it calling a ComfyUI API? Can help look into this It works fine on MacOS, but get 403 Forbidden on windows. ![image](https://github.com/user-attachments/assets/d2874afe-604f-4d87-b11e-c734dc85b2fe)
Author
Owner

@webfiltered commented on GitHub (Jan 2, 2025):

Is this only happening in ComfyUI desktop, or all versions? Happy to take a look at the code, if you can link us to it?

I have two guesses:

  1. Something to do with paths - Windows paths may be getting changed / unintentionally escaped somewhere (absolute paths have : in them).
  2. If it's desktop-only, there might be an Electron API that's behaving differently - just need to know what code / extension is listening for that request, so we can take a look.

p.s. I'd recommend escaping the path and passing it as an escaped string - e.g. http://127.0.0.1:8000/clear-custom-url/?q=/path/here. There's no guarantee you won't get name clashes and other easily-avoidable problems with the current format.

<!-- gh-comment-id:2567269556 --> @webfiltered commented on GitHub (Jan 2, 2025): Is this only happening in ComfyUI desktop, or all versions? Happy to take a look at the code, if you can link us to it? I have two guesses: 1. Something to do with paths - Windows paths may be getting changed / unintentionally escaped somewhere (absolute paths have `:` in them). 2. If it's desktop-only, there might be an Electron API that's behaving differently - just need to know what code / extension is listening for that request, so we can take a look. p.s. I'd recommend escaping the path and passing it as an escaped string - e.g. `http://127.0.0.1:8000/clear-custom-url/?q=/path/here`. There's no guarantee you won't get name clashes and other easily-avoidable problems with the current format.
Author
Owner

@KarryCharon commented on GitHub (Jan 2, 2025):

Is this only happening in ComfyUI desktop, or all versions? Happy to take a look at the code, if you can link us to it?

I have two guesses:

  1. Something to do with paths - Windows paths may be getting changed / unintentionally escaped somewhere (absolute paths have : in them).
  2. If it's desktop-only, there might be an Electron API that's behaving differently - just need to know what code / extension is listening for that request, so we can take a look.

p.s. I'd recommend escaping the path and passing it as an escaped string - e.g. http://127.0.0.1:8000/clear-custom-url/?q=/path/here. There's no guarantee you won't get name clashes and other easily-avoidable problems with the current format.

Only Desktop, if launch by bat script also works fine!

<!-- gh-comment-id:2567274641 --> @KarryCharon commented on GitHub (Jan 2, 2025): > Is this only happening in ComfyUI desktop, or all versions? Happy to take a look at the code, if you can link us to it? > > I have two guesses: > > 1. Something to do with paths - Windows paths may be getting changed / unintentionally escaped somewhere (absolute paths have `:` in them). > 2. If it's desktop-only, there might be an Electron API that's behaving differently - just need to know what code / extension is listening for that request, so we can take a look. > > p.s. I'd recommend escaping the path and passing it as an escaped string - e.g. `http://127.0.0.1:8000/clear-custom-url/?q=/path/here`. There's no guarantee you won't get name clashes and other easily-avoidable problems with the current format. Only Desktop, if launch by bat script also works fine!
Author
Owner

@KarryCharon commented on GitHub (Jan 2, 2025):

Is this only happening in ComfyUI desktop, or all versions? Happy to take a look at the code, if you can link us to it?

I have two guesses:

  1. Something to do with paths - Windows paths may be getting changed / unintentionally escaped somewhere (absolute paths have : in them).
  2. If it's desktop-only, there might be an Electron API that's behaving differently - just need to know what code / extension is listening for that request, so we can take a look.

p.s. I'd recommend escaping the path and passing it as an escaped string - e.g. http://127.0.0.1:8000/clear-custom-url/?q=/path/here. There's no guarantee you won't get name clashes and other easily-avoidable problems with the current format.

Of course, here the code https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Studio/blob/main/__init__.py

<!-- gh-comment-id:2567274997 --> @KarryCharon commented on GitHub (Jan 2, 2025): > Is this only happening in ComfyUI desktop, or all versions? Happy to take a look at the code, if you can link us to it? > > I have two guesses: > > 1. Something to do with paths - Windows paths may be getting changed / unintentionally escaped somewhere (absolute paths have `:` in them). > 2. If it's desktop-only, there might be an Electron API that's behaving differently - just need to know what code / extension is listening for that request, so we can take a look. > > p.s. I'd recommend escaping the path and passing it as an escaped string - e.g. `http://127.0.0.1:8000/clear-custom-url/?q=/path/here`. There's no guarantee you won't get name clashes and other easily-avoidable problems with the current format. Of course, here the code `https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Studio/blob/main/__init__.py`
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
Comfy-Org/desktop#160
No description provided.