langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.16k stars 7.37k forks source link

Application error: a client-side exception has occurred (see the browser console for more information). #2541

Closed yanzu888 closed 8 months ago

yanzu888 commented 8 months ago

Self Checks

Dify version

0.5.6

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Access your own application by sharing the address and start a new conversation. Opening a new window to access will have a very high probability of popping up this error message. It seems that this malfunction is easy to occur in chat applications with historical conversations. Amazingly, if you keep refreshing the page after opening F12, this error will not occur.

image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 8 months ago

🤖

Hey @yanzu888, nice to see you back here! Hope you're doing well.

Based on the information you've provided, it seems like you're encountering a client-side exception when trying to start a new conversation in your self-hosted Dify version 0.5.6 application, especially in chat applications with historical conversations. Unfortunately, without specific error messages or details about the client-side exception, it's challenging to provide a specific solution.

However, I can suggest some general steps to debug and potentially resolve the issue:

  1. Check the browser console for error messages: When the exception occurs, the browser console might display error messages that could provide clues about what's causing the issue.

  2. Review the code related to starting a new conversation: In the provided context, this seems to be handled by the handleStartChat function. Ensure that all necessary data is available and correctly handled when this function is called.

  3. Ensure the state of the application is correctly updated: When starting a new conversation, several state variables are updated in the handleStartChat function, such as setCurrInputs, setChatStarted, and setChatList.

  4. Review the code related to fetching and handling historical conversations: If the issue only occurs in chat applications with historical conversations, it might be related to how these conversations are loaded or handled.

You can refer to the source code here: web/app/components/share/chatbot/index.tsx

Also, I found some similar issues that were resolved in the past:

  1. Refresh error after updating dify 0.5.6
  2. Shared web app can not be opened again in the same browser
  3. Application error: a client-side exception has occurred (see the browser console for more information)

These issues were resolved by a pull request: fix: config not exists

If the issue persists, could you please provide more details about the exception and the specific circumstances in which it occurs? This could help in identifying a more specific solution.

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. If you want to continue the conversation, start your reply with @dosu-bot.
crazywoola commented 8 months ago

Fixed in this pr https://github.com/langgenius/dify/pull/2513, we haven't release the new version. It should be fixed in v0.5.7.

Upcreat commented 6 months ago

Fixed in this pr #2513, we haven't release the new version. It should be fixed in v0.5.7.

The same problem occurred with version 0.6.7

AlexSu1108 commented 4 months ago

The same problem occurred with version 0.6.12-fix1(current version) and 0.6.9