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

New app failed #4207

Open
4 tasks done
flyice8 opened this issue May 9, 2024 · 2 comments
Open
4 tasks done

New app failed #4207

flyice8 opened this issue May 9, 2024 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@flyice8
Copy link

flyice8 commented May 9, 2024

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.6

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Actually mine has a choice, but the problem is the same.
Whether I select "assistant" or "Text Generator," the result is the same, "Please select a template."
123123123

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Copy link

dosubot bot commented May 9, 2024

It looks like the issue you're encountering with the "Please select a template" message during the app creation process in Dify might be related to a few key areas in the codebase, particularly around template selection and state management.

Firstly, the handling of template selection is managed in the NewAppDialog component, specifically in the NewAppDialog.tsx file. This involves fetching available templates and managing user selections through state variables like isWithTemplate and selectedTemplateIndex. If these variables aren't correctly updated or if there's an issue with fetching the templates, it could lead to the problem you're experiencing.

The creation of an app with a selected template is executed in the onCreate function, which checks if a template has been selected based on the state variables. If the conditions indicating a template selection are not met due to any reason, such as a bug in state management or in the template fetching process, the application might prompt you to select a template even if you already did.

The Dify codebase also relies on external libraries and dependencies that could influence the UI and data fetching processes, including React, useSWRInfinite for data fetching, and several others for UI building and internationalization. Any issues or updates in these libraries might impact the functionality related to template selection.

If you're looking into this issue further, I recommend checking the fetchAppTemplates function for any issues in fetching templates, the state management logic around isWithTemplate and selectedTemplateIndex for any bugs, and the onCreate function for how it handles app creation with template details.

Unfortunately, without specific error messages or more detailed behavior descriptions, pinpointing the exact cause can be challenging. However, these areas are where I suggest focusing your investigation. If you have more details or specific error messages, those could be very helpful in narrowing down the issue.

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 9, 2024
@takatost
Copy link
Collaborator

takatost commented May 9, 2024

From your screenshot, it doesn't seem to be 0.6.6. Please confirm if the frontend and backend versions are consistent.

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