-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix a bug that fails to create multiple giveaways for the same game in Multiple Giveaway Creator #332
Comments
This is one of those issues that is very hard to test. What do you mean by "remade to a vagon"? |
I meant the process of editing the descriptions to make vagons from the giveaways. It is what you can see in the screenshot. |
Has it happened again? How often does it happen? |
I have seen it more times. But it is not very often. Maybe once per several hundreds giveaways. This issue has two parts, though. The first is the main problem - why it is red when it is OK and the second is why there is not written the error. Try to fix the second one and it may help to identify the main problem. Maybe to put there something like this (it's for PHP just to write it for javascript):
|
I just pushed a commit that adds some logging which will make it easier to understand what is going on. Can you install it and check the console once it happens again? The error appears if the resulting URL after creating a giveaway is "/giveaways/new" because that means the giveaway was not created and returned to the new page. A successful creation would result in a "/giveaway/XXXXX/" URL. So there is something going on that is making the script detect a "/giveaways/new" URL somehow. |
OK, I will check it and let you know. Hopefully, it will occur soon. |
Any luck? |
No luck. It occurs like once per 10 trains so it will take some time. |
Closing this to unclutter the issues page. Let me know when/if it happens again. |
Only the red giveaways had different positions? Do you still have the tab open? Can you post all the final positions of the red giveaways if it's not too much trouble? That could somehow be connected. |
Yes I still have it open. But sorry, it seems it is not true with the wrong position. In fact it really didn't make the giveaways that were red. I was wrong however I found the real problem. The problem is that I put there the games twice and it created a giveaway only from one of them. One of the imported giveaways was written as "name-of-game cd-key" and the second "cd-key name-of-game". So the script instead of making one giveaway with two keys (I had Group adjacent keys for the same game. enabled), it made just one giveaway with one key and the other key ignored and marked it as red. |
Yes, I think so. Edit: ESGST feature Search keys found it for me. Without it I would never be able to find it. Nice. :) |
I think there two problems and both should be fixed:
|
Wait, there were other games between the same games? Well, there's no issue then. The option is for adjacent keys, which means they must be one after the other. Portal XXXXX-XXXXX-XXXXX The above will never create 1 Portal giveaway for 2 copies, regardless of whether the option to group adjacent keys is enabled or not. If you want 1 Portal giveaway for 2 copies they have to be adjacent: Portal XXXXX-XXXXX-XXXXX |
I'll see if I can spot anything that could lead to issue #2, but I think I remember creating multiple giveaways for Portal when I was testing the feature and it never failed to create more giveaways for identical games. Unfortunately I'm short on giveaway slots, so I can't test it. Perhaps you could test it? If it's not too much trouble to you, of course. |
Yes, exactly, there were some games between them. I thought the script would recognize it. I think it could work like that, couldn't it? It would be good if it worked like that. Do it please if it is not a problem. I can test the 2 but I think it is quite sure thing there is the problem because all the red giveaways really was for games that already were there. Tell me how exactly do you want me to test it and I will do it. |
I added another option to make it work like that (#642). We still need to figure out why it happens that way. It would be helpful to check the logs (I believe the log you posted before was not for the red giveaway, since that giveaway was actually created). So search for all ocurrences of the game in the console log, not just the first one. Well, we could start with something small. Like, if you have 2 copies of the same game you could add them to the creator (as 2 separate giveaways) and see if the creation process fails. |
I just tried to make 3 giveaways where one giveaway was there twice and the other once. Like this:
I had the option "Group adjacent keys for the same game." enabled and "Create train" disabled. It created giveaways just for the first two and the third was red. |
Ah, I had forgotten about this lock. SG has a lock that prevents you from creating 2 separate giveaways for the same game in a time span of 2 minutes. There was a bug in how ESGST handled that, but now you should see a popup saying "Waiting 2 minutes to create another identical giveaway... Please do not close this popup. If you do not want this waiting period, create a single multiple-copy giveaway for the game." if you try the experiment above again. Then after the 2 minutes all giveaways should be created successfully. Also, in case you weren't aware, if you click the "Create" button again after some giveaways failed, it will try to re-create those failed giveaways. |
OK but I don't want to wait because mostly, I don't want to make more giveaways for the same games. I put there the games just by accident. It would be good if the import window could detect that I already imported the same games so that I could cut the game with the key before it is added to the queue. It could also ask me if I want to add the key to a previously created giveaway. |
Well, then you can just enable the new option "Group all keys for the same game." (#642). That takes care of everything. |
It happened more times to me. I imported some games, clicked on create and one of the giveaways was red although there was not a problem with it. The giveaway was created successfully and then remade to a vagon. No errors in console.
The text was updated successfully, but these errors were encountered: