duckduckgo search does not work #3981

Closed
opened 2026-02-21 18:04:13 -05:00 by yindo · 5 comments
Owner

Originally created by @harrywang on GitHub (Jun 4, 2024).

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).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.3.21

Cloud or Self Hosted

Cloud

Steps to reproduce

not working:
Screenshot 2024-06-04 at 7 26 38 PM

✔️ Expected Behavior

can search and return results

Actual Behavior

not working

Originally created by @harrywang on GitHub (Jun 4, 2024). ### 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] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.3.21 ### Cloud or Self Hosted Cloud ### Steps to reproduce not working: <img width="1230" alt="Screenshot 2024-06-04 at 7 26 38 PM" src="https://github.com/langgenius/dify/assets/595772/69fb20a8-6c25-4ea0-a354-783219db8549"> ### ✔️ Expected Behavior can search and return results ### ❌ Actual Behavior not working
yindo added the 🐞 bug label 2026-02-21 18:04:13 -05:00
yindo closed this issue 2026-02-21 18:04:13 -05:00
Author
Owner

@harrywang commented on GitHub (Jun 4, 2024):

Screenshot 2024-06-04 at 7 31 04 PM
@harrywang commented on GitHub (Jun 4, 2024): <img width="2559" alt="Screenshot 2024-06-04 at 7 31 04 PM" src="https://github.com/langgenius/dify/assets/595772/7e2dbd0c-93a3-4a9f-b0af-e8ecce10de2c">
Author
Owner

@dosubot[bot] commented on GitHub (Jun 4, 2024):

To resolve the issue with the DuckDuckGo search functionality in Dify version 0.3.21, follow these steps:

  1. Check Credentials: Ensure that the credentials being used are correct and valid. The _validate_credentials method in the DuckDuckGoProvider class validates the credentials by making a test query. If the credentials are invalid, it raises a ToolProviderCredentialValidationError.

  2. Review Error Messages: The specific error message being logged when the DuckDuckGo search tool fails is:

    "No good DuckDuckGo Search Result was found"
    

    This message is returned if the search results from DuckDuckGo are None [1].

  3. Access Logs: To diagnose the issue further, access and review the logs for the DuckDuckGo search tool:

    • Navigate to the left navigation of the Dify application.
    • Select the Logs page to view interaction records between users and AI. Click on a log entry to open the log details panel and review the interactions [2].
  4. Update Dependencies: If the issue persists, consider updating the duckduckgo-search library to the latest version. This can be done by updating the dependency in your project's dependency file (e.g., requirements.txt or Pipfile). Additionally, ensure that the duckduckgo-search library is upgraded in the Docker containers api-1 and worker-1 [3].

By following these steps, you should be able to resolve the issue with the DuckDuckGo search functionality in Dify.

@takatost, this issue seems to require your specialized expertise to address effectively.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 4, 2024): <!-- Answer --> To resolve the issue with the DuckDuckGo search functionality in Dify version 0.3.21, follow these steps: 1. **Check Credentials**: Ensure that the credentials being used are correct and valid. The `_validate_credentials` method in the `DuckDuckGoProvider` class validates the credentials by making a test query. If the credentials are invalid, it raises a `ToolProviderCredentialValidationError`. 2. **Review Error Messages**: The specific error message being logged when the DuckDuckGo search tool fails is: ```python "No good DuckDuckGo Search Result was found" ``` This message is returned if the search results from DuckDuckGo are `None` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/duckduckgo/tools/duckduckgo_search.py)</sup>. 3. **Access Logs**: To diagnose the issue further, access and review the logs for the DuckDuckGo search tool: - Navigate to the left navigation of the Dify application. - Select the **Logs** page to view interaction records between users and AI. Click on a log entry to open the log details panel and review the interactions <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/features/logs.md)</sup>. 4. **Update Dependencies**: If the issue persists, consider updating the `duckduckgo-search` library to the latest version. This can be done by updating the dependency in your project's dependency file (e.g., `requirements.txt` or `Pipfile`). Additionally, ensure that the `duckduckgo-search` library is upgraded in the Docker containers `api-1` and `worker-1` <sup>[[3]](https://github.com/langgenius/dify/issues/3076)</sup>. By following these steps, you should be able to resolve the issue with the DuckDuckGo search functionality in Dify. @takatost, this issue seems to require your specialized expertise to address effectively. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Jun 4, 2024):

@Yash-1511 Hello could you take a look at this tool?

@crazywoola commented on GitHub (Jun 4, 2024): @Yash-1511 Hello could you take a look at this tool?
Author
Owner

@XiaoLey commented on GitHub (Jun 5, 2024):

I also encountered this problem. I always thought it was only happening to me, but it turns out that no one can use it.

@XiaoLey commented on GitHub (Jun 5, 2024): I also encountered this problem. I always thought it was only happening to me, but it turns out that no one can use it.
Author
Owner

@hjlarry commented on GitHub (Jun 5, 2024):

I also encountered the problem of duckduckgo.

In https://cloud.dify.ai/ , It raise this error:
20240605141231

In my local windows dev env, it blocked entire process.

I upgrade the duckduckgo-search pkg verison to 6.1.5 can resolve the problem, the 6.x version use a new request library pyreqwest_impersonate which is written in RUST.

I will take a PR later.

@hjlarry commented on GitHub (Jun 5, 2024): I also encountered the problem of duckduckgo. In `https://cloud.dify.ai/` , It raise this error: ![20240605141231](https://github.com/langgenius/dify/assets/25834719/c865c1f2-3de8-4740-ba2b-a3df4cf50149) In my local windows dev env, it blocked entire process. I upgrade the `duckduckgo-search` pkg verison to 6.1.5 can resolve the problem, the 6.x version use a new request library `pyreqwest_impersonate` which is written in RUST. I will take a PR later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3981