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

App crashing because it cannot find an HTML element ('form_next') #136

Open
danicriss opened this issue Aug 31, 2021 · 0 comments
Open

App crashing because it cannot find an HTML element ('form_next') #136

danicriss opened this issue Aug 31, 2021 · 0 comments

Comments

@danicriss
Copy link

Describe the bug
Getting an exception because an HTML element is not found

To Reproduce
Steps to reproduce the behavior:

  1. npm start
  2. log in
  3. go through the 2-3 clicks until the last page (last click is 'secure your allocation')
  4. instead of the page with the calendars, I get the exception

Expected behavior
The page with the dates appears and keeps refreshing until a spot is available

Screenshots

~/work/miq-nz-booking-tools/MIQ-Booking-Assistance> npm start 

> [email protected] start
> npx run-func miq-assistance.js start

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.
/home/danicriss/work/miq-nz-booking-tools/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:217
            throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
                  ^

Error: Evaluation failed: TypeError: Cannot read property 'scrollIntoView' of null
    at __puppeteer_evaluation_script__:3:18
    at ExecutionContext._evaluateInternal (/home/danicriss/work/miq-nz-booking-tools/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:217:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/home/danicriss/work/miq-nz-booking-tools/MIQ-Booking-Assistance/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:106:16)
    at async findAvailability (/home/danicriss/work/miq-nz-booking-tools/MIQ-Booking-Assistance/miq-assistance.js:148:12)
    at async prepareAndCheckPage (/home/danicriss/work/miq-nz-booking-tools/MIQ-Booking-Assistance/miq-assistance.js:126:9)
    at async /home/danicriss/work/miq-nz-booking-tools/MIQ-Booking-Assistance/miq-assistance.js:96:13
exit 1

Your system (please complete the following information):

  • Operating System: Linux (Manjaro); shouldn't matter though; using the vanilla app (incl. Puppeteer's built-in Chromium) + customised dates;
  • Version: I used to be some commits behind (at 56e22b7), updated, same problem; yesterday worked, today's the first day when I saw the behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant