The web page crashed while trying to call tools which would return file object. #14337

Closed
opened 2026-02-21 19:16:46 -05:00 by yindo · 6 comments
Owner

Originally created by @chenly15 on GitHub (May 30, 2025).

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

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I'm using an old version 0.15.3. When I try to call tool which would return file object, the web page crashed.
The message shows "Application error: a client-side exception has occurred (see the browser console for more information).".

I took screenshots of the error message.

Image Image Image

The agent app is as follows. The markdown tool would generate a file object. I check the app works on dify cloud, but failed in version 0.15.3 .
I wonder what caused this problem. Are there any simple method to avoid it.

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @chenly15 on GitHub (May 30, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I'm using an old version 0.15.3. When I try to call tool which would return file object, the web page crashed. The message shows "Application error: a client-side exception has occurred (see the browser console for more information).". I took screenshots of the error message. <img width="817" alt="Image" src="https://github.com/user-attachments/assets/0830c631-6207-4b95-b66d-40a5c1a12fc3" /> <img width="314" alt="Image" src="https://github.com/user-attachments/assets/a3ab3a13-d415-429b-99a4-fa9891af2b82" /> <img width="983" alt="Image" src="https://github.com/user-attachments/assets/ef4a0818-90ac-4462-a1af-00e6b2a9b6b3" /> The agent app is as follows. The markdown tool would generate a file object. I check the app works on dify cloud, but failed in version 0.15.3 . I wonder what caused this problem. Are there any simple method to avoid it. <img width="1478" alt="Image" src="https://github.com/user-attachments/assets/727b9cb3-f87d-4d56-9922-091d7c1d833f" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the outdated label 2026-02-21 19:16:46 -05:00
yindo closed this issue 2026-02-21 19:16:46 -05:00
Author
Owner

@crazywoola commented on GitHub (May 30, 2025):

This should be fixed in later versions. Afaik, we do not have a plan to fix it for 0.15.x.

@crazywoola commented on GitHub (May 30, 2025): This should be fixed in later versions. Afaik, we do not have a plan to fix it for 0.15.x.
Author
Owner

@dosubot[bot] commented on GitHub (May 30, 2025):

The crash you’re seeing when calling a tool that returns a file object in Dify 0.15.3 is caused by a frontend bug: the code tries to call .split('/') on the plugin_id field of a tool collection, but this field can be undefined, null, or an empty string for certain tool types—including file-related tools. When this happens, you get the TypeError: Cannot read properties of undefined (reading 'split') and the web page crashes.

This issue is in the provider-list.tsx file, where the code checks if plugin_id exists but doesn’t ensure it’s a string before calling .split('/'). If the backend omits or nulls plugin_id (which can happen with file tools or custom/workflow tools), the error occurs during rendering and crashes the page. This is a known risk for file object handling and dynamic tool execution scenarios in this version of Dify [source].

To fix this in your current setup, you need to add a type check or input validation before using .split('/') on plugin_id. For example, you can update the relevant code to:

org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '',
name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name,

This ensures .split() is only called on valid strings containing a /, preventing the crash.

Since you’re self-hosting with Docker, you’ll need to rebuild the frontend after making this change. If you’re not comfortable editing the code, consider upgrading to a newer version of Dify, as this kind of bug may have been addressed in later releases.

If you can share more details about the specific tool or the backend logs when the crash occurs, I can help further pinpoint the issue. No official patches or documentation for this specific bug exist in 0.15.3, so a code fix or upgrade is the best path forward.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (May 30, 2025): <!-- Answer --> The crash you’re seeing when calling a tool that returns a file object in Dify 0.15.3 is caused by a frontend bug: the code tries to call `.split('/')` on the `plugin_id` field of a tool collection, but this field can be undefined, null, or an empty string for certain tool types—including file-related tools. When this happens, you get the `TypeError: Cannot read properties of undefined (reading 'split')` and the web page crashes. This issue is in the `provider-list.tsx` file, where the code checks if `plugin_id` exists but doesn’t ensure it’s a string before calling `.split('/')`. If the backend omits or nulls `plugin_id` (which can happen with file tools or custom/workflow tools), the error occurs during rendering and crashes the page. This is a known risk for file object handling and dynamic tool execution scenarios in this version of Dify [[source]](https://github.com/langgenius/dify/blob/1d9c90089c7bc7ac7ab83c982c8889ee268f962e/web/app/components/tools/provider-list.tsx). To fix this in your current setup, you need to add a type check or input validation before using `.split('/')` on `plugin_id`. For example, you can update the relevant code to: ```js org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '', name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name, ``` This ensures `.split()` is only called on valid strings containing a `/`, preventing the crash. Since you’re self-hosting with Docker, you’ll need to rebuild the frontend after making this change. If you’re not comfortable editing the code, consider upgrading to a newer version of Dify, as this kind of bug may have been addressed in later releases. If you can share more details about the specific tool or the backend logs when the crash occurs, I can help further pinpoint the issue. No official patches or documentation for this specific bug exist in 0.15.3, so a code fix or upgrade is the best path forward. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f378d49a-7009-4de5-aeda-dc31c18a02ba?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20500)
Author
Owner

@chenly15 commented on GitHub (May 30, 2025):

@dosu @crazywoola I will take times to upgrade dify. Which script does the bug locate in for 0.15.3 ? I try to edit the code first. It seems there is no code about "split()" in provider-list.tsx for 0.15.3 ?

@chenly15 commented on GitHub (May 30, 2025): @dosu @crazywoola I will take times to upgrade dify. Which script does the bug locate in for 0.15.3 ? I try to edit the code first. It seems there is no code about "split()" in provider-list.tsx for 0.15.3 ?
Author
Owner

@dosubot[bot] commented on GitHub (May 30, 2025):

The bug is in the file web/app/components/tools/provider-list.tsx in Dify 0.15.3. The problematic code is on lines 119 and 120, where .split('/') is called on collection.plugin_id without ensuring it's a string. This can cause a TypeError if plugin_id is undefined or not a string, which matches the error you saw in the browser console. You can see the relevant code here:

org: collection.plugin_id ? collection.plugin_id.split('/')[0] : '',
name: collection.plugin_id ? collection.plugin_id.split('/')[1] : collection.name,

To fix the crash, update these lines to check that plugin_id is a string and contains a / before calling .split('/'):

org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '',
name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name,

After making this change, rebuild the frontend. If you still can't find the code, make sure you're looking at the correct file and version in your source tree.
Reference: provider-list.tsx in Dify 0.15.3

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (May 30, 2025): <!-- Answer --> The bug is in the file `web/app/components/tools/provider-list.tsx` in Dify 0.15.3. The problematic code is on lines 119 and 120, where `.split('/')` is called on `collection.plugin_id` without ensuring it's a string. This can cause a TypeError if `plugin_id` is undefined or not a string, which matches the error you saw in the browser console. You can see the relevant code here: ```js org: collection.plugin_id ? collection.plugin_id.split('/')[0] : '', name: collection.plugin_id ? collection.plugin_id.split('/')[1] : collection.name, ``` To fix the crash, update these lines to check that `plugin_id` is a string and contains a `/` before calling `.split('/')`: ```js org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '', name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name, ``` After making this change, rebuild the frontend. If you still can't find the code, make sure you're looking at the correct file and version in your source tree. Reference: [provider-list.tsx in Dify 0.15.3](https://github.com/langgenius/dify/blob/1d9c90089c7bc7ac7ab83c982c8889ee268f962e/web/app/components/tools/provider-list.tsx) <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20500)
Author
Owner

@chenly15 commented on GitHub (May 30, 2025):

The bug is in the file web/app/components/tools/provider-list.tsx in Dify 0.15.3. The problematic code is on lines 119 and 120, where .split('/') is called on collection.plugin_id without ensuring it's a string. This can cause a TypeError if plugin_id is undefined or not a string, which matches the error you saw in the browser console. You can see the relevant code here:

org: collection.plugin_id ? collection.plugin_id.split('/')[0] : '',
name: collection.plugin_id ? collection.plugin_id.split('/')[1] : collection.name,
To fix the crash, update these lines to check that plugin_id is a string and contains a / before calling .split('/'):

org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '',
name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name,
After making this change, rebuild the frontend. If you still can't find the code, make sure you're looking at the correct file and version in your source tree. Reference: provider-list.tsx in Dify 0.15.3

To reply, just mention my name @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosu can you switch tag to 0.15.3 first,and then check the bug location again?

@chenly15 commented on GitHub (May 30, 2025): > The bug is in the file `web/app/components/tools/provider-list.tsx` in Dify 0.15.3. The problematic code is on lines 119 and 120, where `.split('/')` is called on `collection.plugin_id` without ensuring it's a string. This can cause a TypeError if `plugin_id` is undefined or not a string, which matches the error you saw in the browser console. You can see the relevant code here: > > org: collection.plugin_id ? collection.plugin_id.split('/')[0] : '', > name: collection.plugin_id ? collection.plugin_id.split('/')[1] : collection.name, > To fix the crash, update these lines to check that `plugin_id` is a string and contains a `/` before calling `.split('/')`: > > org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '', > name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name, > After making this change, rebuild the frontend. If you still can't find the code, make sure you're looking at the correct file and version in your source tree. Reference: [provider-list.tsx in Dify 0.15.3](https://github.com/langgenius/dify/blob/1d9c90089c7bc7ac7ab83c982c8889ee268f962e/web/app/components/tools/provider-list.tsx) > > _To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e851dab7-f324-409f-9fd8-3b45aa93c273?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20500) @dosu can you switch tag to 0.15.3 first,and then check the bug location again?
Author
Owner

@dosubot[bot] commented on GitHub (May 30, 2025):

I have checked the Dify 0.15.3 codebase and confirmed that the bug is in web/app/components/tools/provider-list.tsx on lines 119 and 120. The code calls .split('/') on collection.plugin_id without verifying it is a string, which can cause the TypeError you saw:

org: collection.plugin_id ? collection.plugin_id.split('/')[0] : '',
name: collection.plugin_id ? collection.plugin_id.split('/')[1] : collection.name,

To fix this, update those lines to:

org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '',
name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name,

If you cannot find this code, make sure you have checked out the correct tag. You can do this with:

git fetch --all --tags
git checkout tags/v0.15.3

Then look for provider-list.tsx in web/app/components/tools/. After editing, rebuild the frontend to apply the fix.

This matches the upstream 0.15.3 code and the bug is confirmed in that location. If you still can't find it, there may be a discrepancy in your local files—let me know if you need help verifying your setup.

Reference: provider-list.tsx in Dify 0.15.3

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (May 30, 2025): <!-- Answer --> I have checked the Dify 0.15.3 codebase and confirmed that the bug is in `web/app/components/tools/provider-list.tsx` on lines 119 and 120. The code calls `.split('/')` on `collection.plugin_id` without verifying it is a string, which can cause the TypeError you saw: ```js org: collection.plugin_id ? collection.plugin_id.split('/')[0] : '', name: collection.plugin_id ? collection.plugin_id.split('/')[1] : collection.name, ``` To fix this, update those lines to: ```js org: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[0] : '', name: typeof collection.plugin_id === 'string' && collection.plugin_id.includes('/') ? collection.plugin_id.split('/')[1] : collection.name, ``` If you cannot find this code, make sure you have checked out the correct tag. You can do this with: ```sh git fetch --all --tags git checkout tags/v0.15.3 ``` Then look for `provider-list.tsx` in `web/app/components/tools/`. After editing, rebuild the frontend to apply the fix. This matches the upstream 0.15.3 code and the bug is confirmed in that location. If you still can't find it, there may be a discrepancy in your local files—let me know if you need help verifying your setup. Reference: [provider-list.tsx in Dify 0.15.3](https://github.com/langgenius/dify/blob/1d9c90089c7bc7ac7ab83c982c8889ee268f962e/web/app/components/tools/provider-list.tsx) <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3abb806f-8824-4a25-b4ec-718ca467bf6e?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20500)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14337