error using plugin Text Embedding Inference : TypeError: Cannot read properties of null (reading 'zh_Hans') or 'en_US' #7638

Closed
opened 2026-02-21 18:21:36 -05:00 by yindo · 1 comment
Owner

Originally created by @pipiaha on GitHub (Jan 9, 2025).

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

1.0.0-beta.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

0. update to latest main branch

1. use latest .env.example

CONSOLE_API_URL=http://192.168.1.6:11500

# ...

# ------------------------------
# Docker Compose Service Expose Host Port Configurations
# ------------------------------
EXPOSE_NGINX_PORT=11500
EXPOSE_NGINX_SSL_PORT=11501

# ...

# ------------------------------
# Plugin Daemon Configuration
# ------------------------------

DB_PLUGIN_DATABASE=dify_plugin
EXPOSE_PLUGIN_DAEMON_PORT=11502
PLUGIN_DAEMON_PORT=5002
PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi
PLUGIN_DAEMON_URL=http://plugin_daemon:5002
PLUGIN_MAX_PACKAGE_SIZE=52428800
PLUGIN_PPROF_ENABLED=false

PLUGIN_DEBUGGING_HOST=0.0.0.0
PLUGIN_DEBUGGING_PORT=5003
EXPOSE_PLUGIN_DEBUGGING_HOST=192.168.1.6
EXPOSE_PLUGIN_DEBUGGING_PORT=11503

PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1
PLUGIN_DIFY_INNER_API_URL=http://api:5001

ENDPOINT_URL_TEMPLATE=http://localhost/e/{hook_id}

MARKETPLACE_ENABLED=true
MARKETPLACE_API_URL=https://marketplace-plugin.dify.dev

2. restart docker compose

sudo docker compose down
sudo docker compose pull
sudo docker compose up -d

3. add plugin Text Embedding Inference from marketplace

4. open settings -> model provider

image
image
image

✔️ Expected Behavior

model provider of settings can be shown without Application error page.

Actual Behavior

error page and error info:

Cannot read properties of null (reading 'en_US') 
# i got same error page when dify language=zh_Hans 
Originally created by @pipiaha on GitHub (Jan 9, 2025). ### 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 1.0.0-beta.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ## 0. update to latest `main` branch ## 1. use latest `.env.example` ``` CONSOLE_API_URL=http://192.168.1.6:11500 # ... # ------------------------------ # Docker Compose Service Expose Host Port Configurations # ------------------------------ EXPOSE_NGINX_PORT=11500 EXPOSE_NGINX_SSL_PORT=11501 # ... # ------------------------------ # Plugin Daemon Configuration # ------------------------------ DB_PLUGIN_DATABASE=dify_plugin EXPOSE_PLUGIN_DAEMON_PORT=11502 PLUGIN_DAEMON_PORT=5002 PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi PLUGIN_DAEMON_URL=http://plugin_daemon:5002 PLUGIN_MAX_PACKAGE_SIZE=52428800 PLUGIN_PPROF_ENABLED=false PLUGIN_DEBUGGING_HOST=0.0.0.0 PLUGIN_DEBUGGING_PORT=5003 EXPOSE_PLUGIN_DEBUGGING_HOST=192.168.1.6 EXPOSE_PLUGIN_DEBUGGING_PORT=11503 PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 PLUGIN_DIFY_INNER_API_URL=http://api:5001 ENDPOINT_URL_TEMPLATE=http://localhost/e/{hook_id} MARKETPLACE_ENABLED=true MARKETPLACE_API_URL=https://marketplace-plugin.dify.dev ``` ## 2. restart docker compose ``` sudo docker compose down sudo docker compose pull sudo docker compose up -d ``` ### 3. add plugin `Text Embedding Inference` from marketplace ### 4. open `settings -> model provider` ![image](https://github.com/user-attachments/assets/f6dc9624-615f-4443-88fc-9b273ec4c43b) ![image](https://github.com/user-attachments/assets/7ce81597-03cf-4952-8478-0b1b42b9ab20) ![image](https://github.com/user-attachments/assets/a2cd158a-b26a-416c-8362-664c08a19480) ### ✔️ Expected Behavior `model provider` of `settings` can be shown without Application error page. ### ❌ Actual Behavior error page and error info: ``` Cannot read properties of null (reading 'en_US') # i got same error page when dify language=zh_Hans ```
yindo added the 🐞 bug👻 feat:rag labels 2026-02-21 18:21:36 -05:00
yindo closed this issue 2026-02-21 18:21:36 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 9, 2025):

Hello, @pipiaha! I'm here to help you with any bugs, questions, or contributions. Let's work together to resolve your issue.

The error you're encountering, "TypeError: Cannot read properties of null (reading 'zh_Hans') or 'en_US'," seems to be related to language settings and localization in the Dify platform. This issue might occur if the language configuration is not properly set up or if there is a missing translation file for the specified language.

To address this issue, you can try the following steps:

  1. Check Language Configuration: Ensure that the language settings in your Dify configuration are correctly set. Verify that the language codes used (e.g., en_US, zh_Hans) are supported and properly configured in the Dify platform.

  2. Verify Translation Files: Make sure that the translation files for the specified languages are present and correctly formatted. Missing or improperly formatted translation files can lead to such errors.

  3. Update to Latest Version: Since you are using version 1.0.0-beta.1, consider checking if there are any updates or patches available that might address this issue. Sometimes, bugs related to localization are fixed in newer releases.

  4. Check for Similar Issues: Look for any similar issues or discussions in the Dify repository that might provide additional insights or solutions. For example, there is a similar unsolved discussion titled "Help! can not access set up model provider" that might be related [1].

If these steps do not resolve the issue, you might need to delve deeper into the code or configuration files to identify any discrepancies related to language settings.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 9, 2025): <!-- Greeting --> Hello, @pipiaha! I'm here to help you with any bugs, questions, or contributions. Let's work together to resolve your issue. <!-- Answer --> The error you're encountering, "TypeError: Cannot read properties of null (reading 'zh_Hans') or 'en_US'," seems to be related to language settings and localization in the Dify platform. This issue might occur if the language configuration is not properly set up or if there is a missing translation file for the specified language. To address this issue, you can try the following steps: 1. **Check Language Configuration**: Ensure that the language settings in your Dify configuration are correctly set. Verify that the language codes used (e.g., `en_US`, `zh_Hans`) are supported and properly configured in the Dify platform. 2. **Verify Translation Files**: Make sure that the translation files for the specified languages are present and correctly formatted. Missing or improperly formatted translation files can lead to such errors. 3. **Update to Latest Version**: Since you are using version 1.0.0-beta.1, consider checking if there are any updates or patches available that might address this issue. Sometimes, bugs related to localization are fixed in newer releases. 4. **Check for Similar Issues**: Look for any similar issues or discussions in the Dify repository that might provide additional insights or solutions. For example, there is a similar unsolved discussion titled "Help! can not access set up model provider" that might be related <sup>[[1]](https://github.com/langgenius/dify/discussions/10858)</sup>. If these steps do not resolve the issue, you might need to delve deeper into the code or configuration files to identify any discrepancies related to language settings. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a66b28cc-b59c-4321-8319-10c672149d9e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a66b28cc-b59c-4321-8319-10c672149d9e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a66b28cc-b59c-4321-8319-10c672149d9e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a66b28cc-b59c-4321-8319-10c672149d9e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a66b28cc-b59c-4321-8319-10c672149d9e?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/a66b28cc-b59c-4321-8319-10c672149d9e?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7638