alvr / ASFui

User Interface for JustArchi/ArchiSteamFarm
https://www.steamgifts.com/discussion/eT97I/
37 stars 16 forks source link

keys get eaten without being used #10

Closed SoulReaver closed 7 years ago

SoulReaver commented 7 years ago

I've tried redeeming multiple keys with your UI. Earlier it worked, but after some updates your UI seems to be eating keys. For you to be able to debug the bug ( :) ) you can try to check the code, what is happening, when you put multiple keys for single title to redeem on single bot (i.e. first key should be activated, rest should have "Already Owned" status. So only the first key should be removed from the text box. In my case, removed was first and ... unknown key. 8 keys in, 6 keys out in messed up order (2nd to last key was placed as 2nd, not sure why this app changes order of keys).

KlappPc commented 7 years ago

I tried to reproduce it, but with 5 keys (and setting remove duplicated):

Key: XXXX-XXXX-EH0LD | Status: DuplicatedKey | Items: [XXXX] Key: XXXX-XXXX-EH0La | Status: InvalidKey Key: XXXX-XXXX-EH0Lb | Status: InvalidKey Key: XXXX-XXXX-EH0Lc | Status: InvalidKey Only the first key got removed and the rest stayed in the same order. Have you checked the response from ASF? Maybe some key was invalid and you have checked to remove invalid keys? From looking at the code, only right codes can be removed (depending on the answer from ASF). About the order I am not 100% sure, but if I remeber lists and arrays in C# correct, the order of the remaining keys can litteraly not change. Did you had every key in a seperate line or some in the same line, seperated with ","? Edit: There seems to be a bug, when the last key would be removed, which should not happen (from looking at the code) as well, so maybe there is a part in the code responsible for that, which I missed.
SoulReaver commented 7 years ago

For the reorder part - it happened to me much earlier, but it did not matter. I haven't checked your code yet (and am not sure if I will ;) ), but if you simply remove items from lists/arrays, then you are right, in C# it never happened to me, that items were reordered and to my knowledge they shouldn't.

But for other stuff, which is far more important ... I can only hope it was the only time it happened :/ It happened to me twice (or more times, not sure now), during the same session, it was with the same bundle of keys. In the end, I tried activating them one by one, all were correct and not used before (except for those, that were activated on first/second try). Later, at that point I was comparing ASF log with the output/actual result on each account and everything was ok. If I'll get another bundle, where I'll be able to try this again (maybe running with VS debugger, If I'll be able to compile project), then I can tell you if this will happen again. For now, I don't have any keys to use :)

KlappPc commented 7 years ago

Well it's not my code ;->

But jeha the array gets split to lines, the key is removed and the remaining lines are combined back.

But for the other Problem (see the other issue) that should not happen as well ^^. But I only looked into the responsible code very broadly.

Don't know, when I will have more time.