Skip to content

The icon does not appear when adding a tool. #14578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 tasks done
kevintsai1202 opened this issue Feb 28, 2025 · 7 comments · Fixed by #15241
Closed
5 tasks done

The icon does not appear when adding a tool. #14578

kevintsai1202 opened this issue Feb 28, 2025 · 7 comments · Fixed by #15241
Labels
🐞 bug Something isn't working

Comments

@kevintsai1202
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When adding a tool to the workflow, the icon does not appear. This issue only occurs on the community board, while it displays correctly on Cloud.

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 28, 2025
Copy link

dosubot bot commented Feb 28, 2025

There are two similar open issues related to icons not appearing when adding a tool:

  1. Issue 1: The 404 Not Found error when trying to get the resource of an icon in the workspace could be due to an incorrect or missing tenant_id or filename in the URL. Ensure that currentWorkspace.id is correctly set and that the fileName you are passing to getIconUrl is correct and corresponds to an existing resource. See issue [1].

  2. Issue 2: To resolve the issue of icons not loading and resulting in "ERR_CONNECTION_REFUSED" errors, ensure that the base URL for resource requests is correctly configured. Verify that the NEXT_PUBLIC_PUBLIC_API_PREFIX environment variable is set to the correct base URL of the Web App. See issue [2].

For your specific issue, ensure that the community board has access to the necessary data sources and marketplace, check for any errors in fetching the icon, and verify that the icon file is correctly placed in the _assets folder as specified in the documentation [3][4].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@kevintsai1202
Copy link
Author

The installed plugin can display the icon, but it fails to show up when adding a new node. It’s probably not a settings issue.

Image

@crazywoola
Copy link
Member

You can install those missing packages back.

@kevintsai1202
Copy link
Author

You can install those missing packages back.

After uninstalling and reinstalling the tool, the icon still doesn't appear when adding a process.

@kevintsai1202
Copy link
Author

@crazywoola

You can install those missing packages back.

I checked the icon URL, and the Docker icon URL is as follows:
http://localhost/app/22bb5036-a40e-4387-8ebc-4138c950eb91/console/api/workspaces/current/tool-provider/builtin/audio/icon

If I manually enter the URL below, it displays correctly. The URI below is consistent with the Cloud version. Could there be an error with the URI in the community version?
http://localhost/console/api/workspaces/current/tool-provider/builtin/audio/icon

Image

@kevintsai1202
Copy link
Author

@dosu

Can you change the issue status to "open"? I found that the icon isn’t displaying because, in the community version, the icon’s URI in the workflow or agent includes an extra "/app/22bb5036-a40e-4387-8ebc-4138c950eb91," which causes it to fail to display.

Copy link

dosubot bot commented Mar 1, 2025

The issue you're experiencing with the icon not displaying in the community version seems to be related to the extra "/app/{id}" segment in the URI. This discrepancy between the community and cloud versions could be due to differences in how the URI is constructed for resources like icons.

To address this, you might want to check the configuration settings related to URI paths. Specifically, ensure that the environment variables influencing the URI structure are correctly set. These include variables like CONSOLE_API_URL, CONSOLE_WEB_URL, and others that define the base paths for different services [1].

Additionally, the functions responsible for generating the full URI for icons are located in the api/core/tools/tool_manager.py and api/services/tools/tools_transform_service.py files. These functions might need to be reviewed to ensure they are generating the correct URI without the extra segment in the community version [2][3].

If the issue persists, it might be necessary to look into the specific logic that adds the "/app/{id}" segment to the URI in the community version and adjust it to match the cloud version's behavior.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants