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

zh-CH global setting not fully effective #2544

Closed
7 tasks done
luyu911 opened this issue Mar 22, 2022 · 10 comments
Closed
7 tasks done

zh-CH global setting not fully effective #2544

luyu911 opened this issue Mar 22, 2022 · 10 comments
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developers. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list.

Comments

@luyu911
Copy link

luyu911 commented Mar 22, 2022

Checklist

ASF version

Latest stable release

ASF variant

docker-linux/amd64

Bug description

When I use the zh-CH global setting, everything works fine at the beginning of startup, if you add an enable: true bot, the log will normally display Chinese, but when I start this bot for the second time, it will start to show English. In fact, I started to encounter this problem on version 5.2.2.5. But this problem remains in 5.2.3.7.

Expected behavior

Chinese is displayed all the time

Actual behavior

At first the log showed Chinese, but when I started a robot, it showed english

Steps to reproduce

  1. Start an asf docker container, using the "CurrentCulture": "zh-CN" global setting
  2. Add a robot set to enable
  3. All of the above will show Chinese normally
  4. But when I stop the bot and start it again, the logs start to show up in English

Possible reason/solution

No response

Can you help us with this bug report?

Somehow, I can test and offer feedback, but can't code

Full log.txt recorded during reproducing the problem

Session terminated, killing shell...�]0;ArchiSteamFarm V5.2.3.7 (linux-x64/4fe6586f-d76c-4b9d-85d1-8572770bfc1f | .NET 6.0.2; debian.11-x64; Linux 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020)�2022-03-22 13:52:03.9255|INFO|ASF|InitCore() ArchiSteamFarm V5.2.3.7 (linux-x64/4fe6586f-d76c-4b9d-85d1-8572770bfc1f | .NET 6.0.2; debian.11-x64; Linux 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020)
2022-03-22 13:52:03.9852|INFO|ASF|InitCore() Copyright © 2015-2022 JustArchiNET
2022-03-22 13:52:04.3888|WARN|ASF|InitGlobalConfigAndLanguage() 配置文件 config/ASF.json 将会迁移到最新格式……
2022-03-22 13:52:04.4195|ERROR|ASF|Write()
2022-03-22 13:52:04.4201|INFO|ASF|InitGlobalConfigAndLanguage() 完成!
2022-03-22 13:52:14.6204|INFO|ASF|Start() 正在启动 IPC 服务……
2022-03-22 13:52:15.1381|INFO|ASF|Start() IPC 服务已就绪!
2022-03-22 13:52:15.2248|WARN|ASF|Load() 您 'luyu121' 的 Steam 密码似乎很弱。请考虑选择更强的密码来增强安全性,详情 :Add another word or two.  Uncommon words are better.
2022-03-22 13:52:15.2692|INFO|luyu121|InitStart() 您已在配置文件中禁用此机器人,该实例将不会启动!
2022-03-22 13:52:33.6203|INFO|luyu121|Start() Starting...
2022-03-22 13:52:33.6247|INFO|luyu121|Connect() Connecting...
2022-03-22 13:52:33.9711|INFO|luyu121|OnConnected() Connected to Steam!
2022-03-22 13:52:33.9846|INFO|luyu121|OnConnected() Logging in...
2022-03-22 13:52:34.7218|WARN|luyu121|OnLoggedOn() Unable to login to Steam: RateLimitExceeded/RateLimitExceeded
2022-03-22 13:52:34.7342|INFO|luyu121|OnDisconnected() Disconnected from Steam!
2022-03-22 13:52:34.7555|INFO|luyu121|OnDisconnected() Rate limit exceeded, we will retry after 25 minutes of cooldown...

Global ASF.json config file

{
  "CurrentCulture": "zh-CN",
  "Headless": true,
  "IPCPassword": "***",
  "LoginLimiterDelay": 3,
  "SteamOwnerID": 76561198395619669,
  "UpdateChannel": 0
}

BotName.json config of all affected bot instances

No response

Additional info

No response

@JustArchi JustArchi added 💭 Acknowledged Issues marked with this label were acknowledged, but weren't verified yet, waiting for confirmation. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. and removed 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels Mar 22, 2022
@JustArchi
Copy link
Member

@Abrynos can you check if this could be related to our handling of user language in IPC calls? I have a gut feeling telling me that something here changes the thread culture and doesn't put it back on.

@Abrynos
Copy link
Contributor

Abrynos commented Mar 22, 2022

@luyu911 How are you stopping the bot? Are you using ASF-ui (or any other IPC integration) or are you using commands in steam chat?

@luyu911
Copy link
Author

luyu911 commented Mar 22, 2022

@Abrynos ASF-ui

@Abrynos
Copy link
Contributor

Abrynos commented Mar 22, 2022

Thank you. Which language did you configure in your browser? And which one (if any) did you configure in ASF-ui?

@luyu911
Copy link
Author

luyu911 commented Mar 22, 2022

@Abrynos all chinese

@JustArchi
Copy link
Member

JustArchi commented Mar 22, 2022

@luyu911 please open dev tools in your web browser (usually F12 button on your keyboard should do that), then navigate to "network tab".

Open ASF-ui now, network tab should be filled with various entries, find asf call on the list:

obraz

Then copy-paste for us the value of Accept-Language from request headers:

obraz

In my example above it's Accept-Language | pl,en-US;q=0.9,en;q=0.8.

@luyu911
Copy link
Author

luyu911 commented Mar 22, 2022

@JustArchi Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6

@JustArchi
Copy link
Member

Thanks, that should be enough for now in order for us to reproduce and tackle it down.

@JustArchi JustArchi added ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developers. and removed 💭 Acknowledged Issues marked with this label were acknowledged, but weren't verified yet, waiting for confirmation. labels Mar 22, 2022
@JustArchi
Copy link
Member

JustArchi commented Mar 24, 2022

If you'd like to you can check ASF pre-release version V5.2.4.2 (or newer), the issue should no longer happen.

Also thank you for supporting our OSS initiative 😎

@luyu911
Copy link
Author

luyu911 commented Mar 25, 2022

@JustArchi @Abrynos Cool, this error no longer appears, thank you for your patience and quick fix.👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. ✔️ Confirmed Issues marked with this label were acknowledged and confirmed by the developers. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list.
Projects
None yet
Development

No branches or pull requests

3 participants