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

Closed
opened 2026-02-21 18:10:08 -05:00 by yindo · 3 comments
Owner

Originally created by @0sengseng0 on GitHub (Aug 27, 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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.16

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I started the service in a new project directory, it worked fine. But when I open it again the next day, I get this error. If I reinstall it in a new directory, it works at the time, but on the third day it gets this error.
Not sure if some directories in dify/docker/ are contaminated for some reason?
For some special reason, dify's nginx is configured to port 19980, and then we map port 80 to 19980 in another Nginx.
Like I said at the beginning, our setup was fine at the beginning, it worked. But the error occurs the next day
image

✔️ Expected Behavior

https://ip:80/apps can be used normally

Actual Behavior

The web page is not accessible

Originally created by @0sengseng0 on GitHub (Aug 27, 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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.16 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I started the service in a new project directory, it worked fine. But when I open it again the next day, I get this error. If I reinstall it in a new directory, it works at the time, but on the third day it gets this error. Not sure if some directories in dify/docker/ are contaminated for some reason? For some special reason, dify's nginx is configured to port 19980, and then we map port 80 to 19980 in another Nginx. Like I said at the beginning, our setup was fine at the beginning, it worked. But the error occurs the next day ![image](https://github.com/user-attachments/assets/9300d007-506c-4aa0-9f0b-afd6959e562e) ### ✔️ Expected Behavior https://ip:80/apps can be used normally ### ❌ Actual Behavior The web page is not accessible
yindo added the 🐞 bug🤔 cant-reproducestale labels 2026-02-21 18:10:08 -05:00
yindo closed this issue 2026-02-21 18:10:08 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 27, 2024):

I found some similar issues and discussions that might help you resolve the client-side exception error you're encountering:

  1. Similar Issues and Discussions:

  2. Potential Solutions:

    • Clear Browser Cache: Ensure that the browser cache is cleared to avoid loading outdated or corrupted files.
    • Rebuild the Application: Run the build script again to ensure all files are correctly generated.
      npm run build
      
    • Check Deployment: Verify that all build files are correctly deployed to the server and that there are no missing or corrupted files.
    • Check for Syntax Errors: Ensure there are no syntax errors in the codebase that might have been introduced after the initial setup.
    • Verify Environment Configuration: Ensure that the environment variables are correctly set up. Create a .env.local file in the current directory and copy the contents from .env.example, modifying the values according to your requirements. For example:
      NEXT_PUBLIC_DEPLOY_ENV=PRODUCTION
      NEXT_PUBLIC_EDITION=SELF_HOSTED
      NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
      NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api
      
  3. Nginx Configuration:

    • Ensure the container is running and update the Nginx configuration with the correct IP addresses of the containers.
    • Run the following command to get the IP addresses of the containers:
      docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
      
    • Update the Nginx configuration with the correct IP addresses for the api and web services. Replace http://api:5001 with http://<api-container-ip>:5001 and http://web:3000 with http://<web-container-ip>:3000. Restart the Nginx container or reload the configuration.

By following these steps, you should be able to resolve the client-side exception error and ensure the Dify application runs smoothly [4][5].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 27, 2024): <!-- Answer --> I found some similar issues and discussions that might help you resolve the client-side exception error you're encountering: 1. **Similar Issues and Discussions**: - [Application error: a client-side exception has occurred (see the browser console for more information)](https://github.com/langgenius/dify/discussions/3934) <sup>[[1]](https://github.com/langgenius/dify/discussions/3934)</sup> - [The website cannot be accessed using caddy reverse](https://github.com/langgenius/dify/discussions/4104) <sup>[[2]](https://github.com/langgenius/dify/discussions/4104)</sup> - [Application error: a client-side exception has occurred (see the browser console for more information)](https://github.com/langgenius/dify/issues/6765) <sup>[[3]](https://github.com/langgenius/dify/issues/6765)</sup> 2. **Potential Solutions**: - **Clear Browser Cache**: Ensure that the browser cache is cleared to avoid loading outdated or corrupted files. - **Rebuild the Application**: Run the build script again to ensure all files are correctly generated. ```bash npm run build ``` - **Check Deployment**: Verify that all build files are correctly deployed to the server and that there are no missing or corrupted files. - **Check for Syntax Errors**: Ensure there are no syntax errors in the codebase that might have been introduced after the initial setup. - **Verify Environment Configuration**: Ensure that the environment variables are correctly set up. Create a `.env.local` file in the current directory and copy the contents from `.env.example`, modifying the values according to your requirements. For example: ```env NEXT_PUBLIC_DEPLOY_ENV=PRODUCTION NEXT_PUBLIC_EDITION=SELF_HOSTED NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api ``` 3. **Nginx Configuration**: - Ensure the container is running and update the Nginx configuration with the correct IP addresses of the containers. - Run the following command to get the IP addresses of the containers: ```bash docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ``` - Update the Nginx configuration with the correct IP addresses for the `api` and `web` services. Replace `http://api:5001` with `http://<api-container-ip>:5001` and `http://web:3000` with `http://<web-container-ip>:3000`. Restart the Nginx container or reload the configuration. By following these steps, you should be able to resolve the client-side exception error and ensure the Dify application runs smoothly <sup>[[4]](https://github.com/langgenius/dify/blob/main/web/package.json)</sup><sup>[[5]](https://github.com/langgenius/dify/blob/main/web/README.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@0sengseng0 commented on GitHub (Aug 27, 2024):

I started with docker, and with a reinstallation, workflow worked normally for quite some time.

@0sengseng0 commented on GitHub (Aug 27, 2024): I started with docker, and with a reinstallation, workflow worked normally for quite some time.
Author
Owner

@crazywoola commented on GitHub (Aug 28, 2024):

I suggest upgrade to 0.7.1 to see if this is resolved, the image you provided is not enough to see what's really going on.

@crazywoola commented on GitHub (Aug 28, 2024): I suggest upgrade to 0.7.1 to see if this is resolved, the image you provided is not enough to see what's really going on.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5259