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

Error when update PAC from Geosite #2986

Closed
samirmhsnv opened this issue Oct 12, 2020 · 8 comments
Closed

Error when update PAC from Geosite #2986

samirmhsnv opened this issue Oct 12, 2020 · 8 comments
Assignees

Comments

@samirmhsnv
Copy link

samirmhsnv commented Oct 12, 2020

Error: The given key was not present in the dictionary

image

OS: Windows 10 19041.508
Client version: 4.2.1.0
.Net version >= 4.7
VS2015 installed

Error shows that AZ locale is not configured. But the questions is why Client not using fallback locale (EN) ?

2020-10-12 21:54:15.2351|INFO|Shadowsocks.Controller.I18N|Current language is: az-Latn-AZ
2020-10-12 21:54:15.2586|INFO|Shadowsocks.Controller.I18N|Translation for az-Latn-AZ not found
2020-10-12 21:54:15.6200|ERROR|Shadowsocks.Program|System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Shadowsocks.Controller.GeositeUpdater.MergeAndWritePACFile(String group, Boolean blacklist)
   at Shadowsocks.Controller.PACDaemon.TouchPACFile()
   at Shadowsocks.Controller.PACDaemon..ctor(Configuration config)
   at Shadowsocks.Controller.ShadowsocksController.Reload()
   at Shadowsocks.Controller.ShadowsocksController.Start(Boolean regHotkeys)
   at Shadowsocks.Program.Main(String[] args)
2020-10-12 21:59:02.8149|INFO|Shadowsocks.Controller.I18N|Current language is: az-Latn-AZ
2020-10-12 21:59:02.8399|INFO|Shadowsocks.Controller.I18N|Translation for az-Latn-AZ not found
2020-10-12 21:59:03.1659|ERROR|Shadowsocks.Program|System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Shadowsocks.Controller.GeositeUpdater.MergeAndWritePACFile(String group, Boolean blacklist)
   at Shadowsocks.Controller.PACDaemon.TouchPACFile()
   at Shadowsocks.Controller.PACDaemon..ctor(Configuration config)
   at Shadowsocks.Controller.ShadowsocksController.Reload()
   at Shadowsocks.Controller.ShadowsocksController.Start(Boolean regHotkeys)
   at Shadowsocks.Program.Main(String[] args)
2020-10-12 22:03:07.9780|INFO|Shadowsocks.Controller.I18N|Current language is: az-Latn-AZ
2020-10-12 22:03:07.9940|INFO|Shadowsocks.Controller.I18N|Translation for az-Latn-AZ not found

@ghost

This comment has been minimized.

@ghost ghost assigned database64128 Oct 12, 2020
@ghost ghost changed the title Fallback language is not configured Error when update PAC from Geosite Oct 12, 2020
@ghost
Copy link

ghost commented Oct 12, 2020

Can you post gui-config.json here with sensitive information masked?

@database64128
Copy link
Contributor

First of all, you have not provided enough information to help diagnose the issue.

Second, I have just finished dozens of tests. The only case where your issue can happen, is when you delete pac.txt and manually change geositeGroup to some invalid group in gui-config.json.

Improvements are coming very soon to prevent the crash and show a message box telling the user they have misconfigured the geosite group. But I wouldn't call it a bug, as it can only happen when the user changes the configuration file without knowing what they have done can lead to undefined behaviors. For now, I'm closing the issue.

@samirmhsnv
Copy link
Author

try v4.2.0.1

the same result happens

@samirmhsnv
Copy link
Author

samirmhsnv commented Oct 13, 2020

First of all, you have not provided enough information to help diagnose the issue.

Second, I have just finished dozens of tests. The only case where your issue can happen, is when you delete pac.txt and manually change geositeGroup to some invalid group in gui-config.json.

Improvements are coming very soon to prevent the crash and show a message box telling the user they have misconfigured the geosite group. But I wouldn't call it a bug, as it can only happen when the user changes the configuration file without knowing what they have done can lead to undefined behaviors. For now, I'm closing the issue.

@database64128 I didn't edit any source file. You can test the bug with this steps:

  1. Download version 4.2.1.0 from Releases
  2. Use Windows 10 >= v19041.508
  3. Change language to Azerbaijan (Latin) on Region Format > Current format

image

  1. Open the Application and that error will happen.

Currently I handled it with changing default locale to English (US) and everything is OK now.

@database64128
Copy link
Contributor

Thanks for the steps! A quick fix is coming.

@database64128
Copy link
Contributor

@samirmhsnv
Copy link
Author

@database64128

Just tested and v4.2.0.54 is working as expected 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants