Skip to content
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

builtin provider not found when importing #4515

Open
4 tasks done
AndyMik90 opened this issue May 19, 2024 · 1 comment
Open
4 tasks done

builtin provider not found when importing #4515

AndyMik90 opened this issue May 19, 2024 · 1 comment
Assignees
Labels
🐞 bug Something isn't working

Comments

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

Dify version

0.6.8

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

When importing a tool where you don't have setup authentication for that tool, you get toast error "builtin provider X not found". And you remain in the same import window, this makes so the user is confused if the error made the import fail or not.

✔️ Expected Behavior

Maybe redirect anyways to the studio, or prompt the user to authenticate for the tool(s) right away.

❌ Actual Behavior

Error, but it imports the app anyways when hard refreshing the site.

Copy link

dosubot bot commented May 19, 2024

To address the issue of encountering a "builtin provider X not found" error during import in Dify version 0.6.8, and improving the overall user experience, consider the following steps:

  1. Ensure Immediate Authentication: Implement @login_required and @account_initialization_required decorators on API endpoints related to importing or accessing provider data. This will prompt users to authenticate immediately if they haven't already, preventing the error due to unauthenticated access.

  2. Redirect Users Post-Import: Modify the import process to include a redirection to the studio upon successful completion. This can be done by returning a HTTP redirect response from the API endpoint handling the import, guiding users directly to the studio without confusion.

  3. Improve Error Handling: Enhance error handling to provide clear feedback when encountering the "builtin provider X not found" error. Ensure the provider's existence is checked before attempting the import and return a meaningful error message if the provider is not found. Implement a frontend mechanism to display these error messages clearly to the user.

  4. Fix Session Management: Address the issue where the import appears successful after a hard refresh by ensuring the session state is correctly updated upon successful import. This may involve setting session variables or using client-side scripts to update the UI accordingly, eliminating the need for a hard refresh.

By implementing these recommendations, you can streamline the import process, ensuring users are promptly authenticated, clearly informed of any errors, and smoothly redirected post-import, enhancing the overall user experience.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label May 19, 2024
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

No branches or pull requests

2 participants