Giter Club home page Giter Club logo

Comments (32)

jpchip avatar jpchip commented on July 17, 2024 2

OK, I think I really got it now. Not only does Amazon seem to have two different box areas, but also two different ways they show the result text, and also two different video entry pages! I added code to handle both versions as best as I could. I had to kill and restart it a whole bunch to make it go into one or the other so I could make sure both ways worked. What a pain.

from giveaway-grabber.

KryptoNova avatar KryptoNova commented on July 17, 2024 1

I am getting this too.

If I can duplicate it again, I will see about trying to adapt the code to click the button if it finds it. If I am successful, I will do a pull request with an update.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Screenshot_20190415_231108
giveaway 21 is blacklisted [for women].
giveaway 22 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 23 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 24 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
lets try that again.
waiting for box...
could not find box?
could not get result, oh well. Moving on!
Next Page!
Page 6 Start:
giveaway 1 is ready!

Last couple versions have been unusable. Downgraded to 2.7.0

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

Let me know if you still run into this in the older version because I've never seen it present a sign in button like this before, seems to be something new

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Never saw it on older version which is working fine...might be related to the "switch account" changes made. I had to restart it several times today till I finally gave up and downloaded older (after researching how to download older version)

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Well it just happened on older version. It's possible it's because I copied 2.7.0 over the newer version. I'm going to do a "clean install" and try again.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

..and it just occured on a clean install of 2.7.0 so this is something Amazon has changed. That's not good.

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

This will always be a race to keep up with changes Amazon makes, and we'll always be a few steps behind them unfortunately. Already had to redo all the selectors once (ie. v2) when they totally redesigned the pages at that time.

I will work on catching this today if I have time.

As for new versions being "unusable", I'm trying my best to catch the edge cases you bring up, but it seems as though every time I fix one it brings to light two more. :( I'm glad you were able to roll things back.

I would love to be working on all the cool feature requests instead of trying to fix bugs, especially given my limited time to work on this project. Please be patient as I try to keep making this thing better, and thanks for your support.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Whoa....me saying the last two versions were unusable (for me) was in no way an attack on you in any way. The simple fact was the issues was happening over and over for me then I would have to restart at page 1 because I couldn't be sure what sweeps got ignored so I never made it past page 33 in the 24 hour period hence "unusable". Keep up the good work at YOUR pace.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Even when I don't hit the sign in page I'm still running into page after page of this when looking in the window shows me it's not recognizing the box or if I click the box manually that I didn't win:

waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 19 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 20 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 21 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 22 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 23 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 24 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
Next Page!
Page 83 Start:
giveaway 1 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 2 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 3 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 4 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 5 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 6 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 7 cannot be entered.
giveaway 8 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 9 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 10 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 11 is blacklisted [toddlers].
giveaway 12 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 13 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 14 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 15 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 16 is ready!
waiting for box...
could not find box?
could not get result, oh well. Moving on!
giveaway 17 is ready!
waiting for box...

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

oh man. :( I have been running it myself (v2.7.2) since my last comment and I have yet to see the "sign in" button show up, let along this problem. I've gone through a few pages and one captcha without any problems.

When it's doing what you just described, which page is it sitting on?

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

It was on page 82 when I killed it and posted the above non signin issue. If you want me to run some debug code post the modded src and I'll drop it in....have you tried running it with 2FA to see if it's an interaction?

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

grabber.log

I've attached the full console log..you'll see where it starts with a clean install and downloading chrome. The only files copied from old version were my .env and the patchfile i use to modify giveaways.js so it waits 50 seconds instead of 30. I've included that as well.

timeout60.patch.txt

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

if you restart on the page where it started failing does it start working again? From your logs it looks like the last giveaway that it successfully entered was on page 31. After that it was all "could not find video" or "could not find box" for every one.

I have done a clean install with 2FA enabled and have run through a bunch of pages and still have not run into this problem or seen the "sign on" button, so that's a huge bummer. Not sure what I'm missing. :(

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

I went to page 100...not one I've reached last couple of days so should be "new"....worked as expected at the moment.....will report how far it gets.

[email protected] prestart /home/famewolf/giveaway-grabber-2.7.0
npm install --production

[email protected] start /home/famewolf/giveaway-grabber-2.7.0
node index.js "--2FA" "--page=100"

Page 100 Start:
giveaway 1 is blacklisted [kindle edition].
giveaway 2 is ready!
waiting for video (~15 secs)...
Rudi, you didn't win
giveaway 3 is ready!
waiting for box...
Rudi, you didn't win
giveaway 4 cannot be entered.
giveaway 5 already entered.
giveaway 6 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 7 cannot be entered.
giveaway 8 is ready!
waiting for box...
Rudi, you didn't win
giveaway 9 already entered.
giveaway 10 is ready!
waiting for box...
Rudi, you didn't win

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Well it didn't get very far at all....think I'm gonna give up on it for now.

[email protected] prestart /home/famewolf/giveaway-grabber-2.7.0
npm install --production

[email protected] start /home/famewolf/giveaway-grabber-2.7.0
node index.js "--2FA" "--page=100"

Page 100 Start:
giveaway 1 is blacklisted [kindle edition].
giveaway 2 is ready!
waiting for video (~15 secs)...
Rudi, you didn't win
giveaway 3 is ready!
waiting for box...
Rudi, you didn't win
giveaway 4 cannot be entered.
giveaway 5 already entered.
giveaway 6 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 7 cannot be entered.
giveaway 8 is ready!
waiting for box...
Rudi, you didn't win
giveaway 9 already entered.
giveaway 10 is ready!
waiting for box...
Rudi, you didn't win
(node:27548) UnhandledPromiseRejectionWarning: TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded
at Promise.then (/home/famewolf/giveaway-grabber-2.7.0/node_modules/puppeteer/lib/LifecycleWatcher.js:143:21)
at
-- ASYNC --
at Frame. (/home/famewolf/giveaway-grabber-2.7.0/node_modules/puppeteer/lib/helper.js:108:27)
at Page.waitForNavigation (/home/famewolf/giveaway-grabber-2.7.0/node_modules/puppeteer/lib/Page.js:676:49)
at Page. (/home/famewolf/giveaway-grabber-2.7.0/node_modules/puppeteer/lib/helper.js:109:23)
at navigateToGiveaway (/home/famewolf/giveaway-grabber-2.7.0/src/giveaways.js:158:35)
at asyncForEach (/home/famewolf/giveaway-grabber-2.7.0/src/giveaways.js:302:10)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:27548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:27548) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

OK, I'm seeing the problem today. Amazon must do some kind of A/B testing where they roll out changes to some users before others, because it is definetly different today then it was yesterday. Anyways, I am working on a fix!

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

Published release that fixes the could not find box issue

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

Ack, nope, it seems to switch back and forth between having a "#box_click_target" or ".box-click-area". Guess I need to check for both. 🙄

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

With Amazon having so many servers and locations I wonder if it's a case of some being updated as they are "free" while others have not.

from giveaway-grabber.

KryptoNova avatar KryptoNova commented on July 17, 2024

Bad news, I just cloned the master branch of the repository. I got the sign in button and it wasn't able to be clicked. Then when I manually clicked it, then the program handled the user selection. However, when it got back to the sweep entry it didn't know how to handle it. It kept saying "giveaway 5 did not exist?" and counting higher.

I'm thinking this is still broke.

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

Yeah, I never fixed the original bug this ticket reported, still haven't reproduced it myself! If you want to take a stab at it that would be great.

I just got the whole thing running correctly with the two possible versions Amazon throws at you now.

from giveaway-grabber.

KryptoNova avatar KryptoNova commented on July 17, 2024

OK. I will take a stab at it, but probably won't be able to get to it till Friday or Saturday. I seem to be getting it quite regularly though.

from giveaway-grabber.

jpchip avatar jpchip commented on July 17, 2024

I finally had this happen to me! Looks like the sign in button has a class of .sign-in. I saved the page for reference:

signin.zip

Note that it then took me to the switch account page, at least this time, so probably should run that check too. Then it goes back to the item page.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Every single time it's happened to me (10+) it's always taken me to the switch account screen where I just clicked on my account.
Update Having said that it just took me to some intermediate page...I think I clicked back then sign in again and it went to the switch account.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

This seems to be biggest issue/bug at the moment because once the "sign in" issue occurs any sweep after that point is skipped/"box not found. Moving on!"

It didn't happen all day yesterday but did happen last night/early morning to me. In this case all giveaways were missing after "signin".

waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 16 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 17 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 18 is ready!
waiting for box...
could not find box?
Enter for a chance to win!
giveaway 19 is ready!
waiting for box...
could not find box?
Enter for a chance to win!
giveaway 20 did not exist?
giveaway 21 did not exist?
giveaway 22 did not exist?
giveaway 23 did not exist?
giveaway 24 did not exist?
No more pages! Goodbye!

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

On a manual sign in and clicking on the switch account choice it returns you to the item you were viewing that showed sign in but will now say "You didn't win" or whatever state it is in for your amazon profile...meanwhile the program is looking for the box and eventually fails with box not found....I would expect it at that time to go back to list of sweeps and try next one but it seems to just keep sitting on that item screen and that is when the giveaway does not exist starts....I manually hit back in the browser until it was back to the list of sweeps and it continued as "normal" for further giveaways. Hope some of this helps.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

The recent fix to stay signed in seems to have the same issue the "signed in fix" has. It recently timed out so I restarted it on the last page it was on and had it set to save the session info. It seemed to run ok including telling me I didn't win....I came back about 20 minutes later to find it skipping all the ones still unentered with "can't find box, moving on!"...I don't know if it had a "sign in" attempt while I was gone or not since I didn't save the log. Of note is the fact it's NOT waiting 15 seconds to determine "no box found"..at most it's 2 seconds after it says "waiting for video". I killed it at restarted it on the same beginning page and it did the "can't find video Moving on" thing right away.

giveaway 9 is blacklisted [kindle edition].
giveaway 10 is ready!
waiting for video (~15 secs)...
could not find video, oh well. Moving on!
giveaway 11 is blacklisted [kindle edition].
giveaway 12 already entered.

from giveaway-grabber.

KryptoNova avatar KryptoNova commented on July 17, 2024

I wonder if the poor internet connection is the factor in this equation. I cannot duplicate, but I have a thought. I wonder if the waiting timeouts between situation checks is not long enough in your case.

I will take a look to see if there is a setting in Puppeteer to wait till the page/DOM loads before checking the page contents. I think I stumbled across one. Sometime this weekend I will see if I can do something with that setting, if it exists, and maybe you can give it a test. Plus, I suspect this would make the program a little more stable too.

If you could create a new issue and outline the problem so it is separate from this one, I would appreciate it. That way I can code against it.

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

While I'm willing to test whatever and also willing to create an issue I'm not sure what it should say. I'm not sure internet speed is an issue since the program is giving up on waiting for the video long before the 15 seconds is up...if speed was an issue wouldn't it be taking LONGER than 15 seconds and not as short as 2 seconds? I just started the program from page 1 and it appears at the moment to be working....if I'm the only one seeing the issue then perhaps it can wait till someone else see's it or it might go away with the future changes you mentioned.

from giveaway-grabber.

KryptoNova avatar KryptoNova commented on July 17, 2024

Ok. Sounds like a plan.

I think the waits are only a half of a second. If the content that the event is looking for doesn't exist, then it will not see the video or box until it is too late. It isn't really related to the video playing or not, but having the tag content being loaded for the video roughly about 1 second after loading the page with the sweep. That would make it appear random on a slow connection. At least that's my theory. :-)

from giveaway-grabber.

famewolf avatar famewolf commented on July 17, 2024

Well I can confirm the video IS on the screen when it gives up on it.

from giveaway-grabber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.