-
Notifications
You must be signed in to change notification settings - Fork 159
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
EDSM Plugin sent wrong credit balance when switching accounts #1134
Comments
Switching back from account 2 to account 1. EDSM has recorded account 2's location into account 1, earning a distance badge for account 1 |
|
Logging in to my steam account (main is frontier), when I hadn't yet added EDSM: 2021-06-04 10:07:00.224 - ERROR - 4824:13092:13092 plug.Plugin.get_prefs:113: Failed for Plugin "EDSM"
Traceback (most recent call last):
File "C:\Users\Athan\Documents\Devel\EDMarketConnector\plug.py", line 108, in get_prefs
frame = plugin_prefs(parent, cmdr, is_beta)
File "C:\Users\Athan\Documents\Devel\EDMarketConnector\plugins\edsm.py", line 235, in plugin_prefs
prefs_cmdr_changed(cmdr, is_beta)
File "C:\Users\Athan\Documents\Devel\EDMarketConnector\plugins\edsm.py", line 249, in prefs_cmdr_changed
cred = credentials(cmdr)
File "C:\Users\Athan\Documents\Devel\EDMarketConnector\plugins\edsm.py", line 334, in credentials
return (config.get_list('edsm_usernames')[idx], config.get_list('edsm_apikeys')[idx])
IndexError: list index out of range |
The precise sequence for the above was:
|
@jmbox given the bug I found and fixed... could you please supply us with both plain and debug log files as per https://github.com/EDCD/EDMarketConnector/wiki/Troubleshooting#debug-log-files |
Both cmdrs and edsm_cmdrs contain: edsm_apikeys has the keys in the correct order |
Some notes on the code flow:
Does EDSM actually check that the commanderName is correct for the given API Key ? |
This has also been happening to me. Note for @jmbox: this has ALSO been confusing my flight log entries in EDSM, and I've had to delete some of them. EDMC versions - 5.1.1, now 5.1.2. Windows 10. One copy of EDMC running at a time. I don't usually restart EDMC unless I'm changing a plugin. No other sending tools. I got the most recent one with EDMC debug logging on, unfortunately not with In the registry, both cmdrs and edsm_cmdrs contain the following, and edsm_apikeys has the keys in the correct order.
I'll attach both of today's Journals, they're short: Journal.210803080400.01.log Here's And here's |
OK! I logged an incorrect EDSM request via event=LoadGame event=Location |
@chennin how much of the data is wrong in that ? Materials we know a way for it to be wrong. But if anything else is we need to know. |
Oh, hang on... if it's using the cmdr name/apikey from the first event it processes to be sent out, then the mis-treatment of Materials could mean it uses the previous cmdr for all the events sent in this batch, so it could indeed be affecting everything else, including LoadGame and its Credits value. |
No, scratch that. The For login I think it's the So only the |
Given the |
Ugh, yeah, I'm just going to have to sort out using my main and steam alt accounts to test this myself to be sure of what's going on. |
* trace-on 'edsm-cmdr-events' for how Commanders, their API keys and using them are handled. See #1134 * trace-on 'edsm-locations' for what was commented-out logging to do with ensuring code reacted correctly to any change of system. * mypy/types-* seem to have had changes causing extra carping, so addressing that.
There's a fix for this in |
@jmbox @chennin Please test https://github.com/EDCD/EDMarketConnector/releases/tag/Release%2F5.1.3-beta1 - it should fix the problem. |
I tried several times with 5.1.3b1 and wasn't able to replicate the problem |
And the data sent to EDSM on any account looks correct and complete otherwise ? |
Correct, there wasn't any confusion of credits or ships |
OK, I''ll consider this issue closed then. The fix will be in 5.1.3 which should be out Monday latest (I want to check if anything else should go into it). |
@chennin note that you won't get offered the update from 5.1.3-beta1 to 5.1.3 due to some crapness in how that check is done. So grab 5.1.3 from https://github.com/EDCD/EDMarketConnector/releases/tag/Release%2F5.1.3 and install it manually. |
I have 2 Elite accounts, and 2 EDSM accounts, with separate keys set correctly in EDMC.
Now I've switched many times without anything untoward happening that I've noticed. EDSM records jumps and other Badge earning achievements correctly per account.
Today, running EDMC 5.0.4+2ba8cf1, when switching from account 1 to account 2, it sent the credit balance from account 1 to EDSM for account 2.
Account 1 has 5.5bn credits. Account 2 has 1.7bn credits. EDSM awarded the 4bn+ Cr Badge to Account 2.
Ath suggested "we can at least add logging to state which Journal Commander we're sending for, and to which EDSM account."
The text was updated successfully, but these errors were encountered: