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

Log out after 600 refresh #123

Open
Helinate opened this issue Aug 5, 2021 · 12 comments
Open

Log out after 600 refresh #123

Helinate opened this issue Aug 5, 2021 · 12 comments

Comments

@Helinate
Copy link

Helinate commented Aug 5, 2021

Hello

I get logged out after 600 refresh, I have read other posts but mine seems to happen on the number every time.
Any ideas?
Thanks

@HKG2301
Copy link

HKG2301 commented Aug 5, 2021

You beat me to it, Helinate! I have also been logged out several times now, on the 600th refresh.

I'm going to reduce the refresh rate to every 10 or 15 secs for now, just for duration / coverage. Otherwise I'm scared I'm going to miss out on a large dump of December dates, due out soon...

@Anwere
Copy link

Anwere commented Aug 6, 2021

Yep me three, just had it happen now

@mouarg
Copy link

mouarg commented Aug 8, 2021

Yes I can confirm this as well :S

@mquinn023
Copy link

The process is bombing out consistently now after 600 refreshes. Terminal output is below:

Welcome to the MIQ Booking Assistance!
A new browser window should appear. Please navigate to "Secure your allocation" page.
Found "Secure your allocation" page! Wait for beep sound, confirm the date selected is what you want, then do the reCAPTCHA and click 'next' to continue booking.
Checked MIQ: 600 times, last checked at: 07/08/2021, 22:00:46
/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509
const timeoutError = new Errors_js_1.TimeoutError(waiting for ${options.title} failed: timeout ${options.timeout}ms exceeded);

TimeoutError: waiting for selector #accommodation failed: timeout 30000ms exceeded
at new WaitTask (miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)
at DOMWorld.waitForSelectorInPage (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)
at Object.internalHandler.waitFor (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)
at DOMWorld.waitForSelector (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)
at Frame.waitForSelector (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)
at Page.waitForSelector (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2252:33)
at prepareAndCheckPage (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/miq-assistance.js:119:16)
at prepareAndCheckPage (/miq-nz-booking-tools-master-9/MIQ-Booking-Assistance/miq-assistance.js:138:15)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)

@cummins070
Copy link

Also having the same issue. Wonder if there would be a way that the program could reset it's self after 590 refreshes or something and just start form 0?

@sebjamesfd
Copy link

I was just watching this happen on the 600th refresh. As far as I can tell it is actually the MIQ website that is ending the session here not this booking tool.

@mquinn023
Copy link

The only workaround I can see at the moment as mentioned above is to increase the timeout value from 1000 in miq-assistance.js:

await page.waitForTimeout(secondsTillRefresh * 1000);

1500 just ran for around 4-5 hours with 1527 refreshes.

@Ghostfinder
Copy link

Hi everyone, having this same issue. What effect does increasing the timeout value have? Does it increase the refresh rate set in the main part of the tool?

@shoey123
Copy link

Hi there, first time poster on github/ only just registered with sole purpose to download this script and run it, to try and get a spot in NZ MIQ. What a ball-ache. Thank you to everyone who have been helpful in comments and above to the authors of the script.

I just downloaded and was getting booted after 600 refreshes.

I changed the:

<<await page.waitForTimeout(secondsTillRefresh * 1000);>>

to 1500 as suggested by @mquinn023 to try and avoid any issues. So far so good.

In the miq-assistance.js file, on line 16, it says: "But if you like you can prefill credentials instead. To do this you have to change the option to "login", run the script and login. Afterwards you need to switch back to "login-done" and restart the script"

I followed these instructions, but after logging out and logging back in, I still had to enter in my login credentials. I am assuming this part does not work/ apply anymore as on the login screen on the MIQ page you have to the recaptcha and select the box that "you are not a robot".

Any advice is greatly appreciated.

Thank you.


Update - I got to 424 refreshes and then I was logged out. I am not sure if this was because I was temporarily blocked from too many refreshes (I did not get a warning message etc stating that), OR was it due to inactivity. If it was due to inactivity, is there way to edit the code such that this is avoided?

@GaryBartlett
Copy link

The login feature automates the population of the login fields just fine. Just add your email and password, set it to login (rather than login-done) and leave it like that.

@shoey123
Copy link

Thanks @GaryBartlett, appreciate it!

@jvolker
Copy link
Owner

jvolker commented Aug 23, 2021

await page.waitForTimeout(secondsTillRefresh * 1000);

1500 just ran for around 4-5 hours with 1527 refreshes.

You don't need to change the code for that. Just change page refresh time in the user interface to 7.5 (default is 5 multiplied by 1.5)

image

What effect does increasing the timeout value have? Does it increase the refresh rate set in the main part of the tool?

Yes, it's the same.

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