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

handleDMVRedirect is broken #6

Open
shockey opened this issue May 27, 2017 · 2 comments
Open

handleDMVRedirect is broken #6

shockey opened this issue May 27, 2017 · 2 comments

Comments

@shockey
Copy link

shockey commented May 27, 2017

Getting this error:

→ node poll.js 
Checking every 3 minutes, at DMV offices 25 miles from 90021
Will text [redacted] when a match is found.
/Users/kyle/ca-dmv-poller/poll.js:218
          var elements = window.document.forms[0].elements;
                                                 ^

TypeError: Cannot read property 'elements' of undefined
    at Object.done (/Users/kyle/ca-dmv-poller/poll.js:218:50)
    at process.nextTick (/Users/kyle/node_modules/jsdom/lib/jsdom.js:271:18)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Here's my config:

{
    "behindTheWheelTest": false,
    "maxDistanceMiles":   25,
    "checkEveryMinutes":  3,
    "secondsBetweenRequests": 1,
    "findAppointmentWithinDays": 7,
    "home":       "90021",
    "textOnFind": true,
    "textNumber": "xxxxxxxxxx",
    "appointmentInfo": {
        "firstName":  "Kyle",
        "lastName":   "Shockey",
        "telArea":    "xxx",
        "telPrefix":  "xxx",
        "telSuffix":  "xxxx",
        "_comment":
            "ONLY HAVE TO FILL BELOW FOR BEHIND THE WHEEL TEST, two digit day/month",
        "dlNumber":   "",
        "birthMonth": "",
        "birthDay":   "",
        "birthYear":  ""
    },
    "dayOfWeeks": [
        {
            "name":       "Sunday",
            "allowed":    true,
            "startHour":  9,
            "endHour":    17

        },
        {
            "name":       "Monday",
            "allowed":    true,
            "startHour":  9,
            "endHour":    17
        },
        {
            "name":       "Tuesday",
            "allowed":    true,
            "startHour":  9,
            "endHour":    17
        },
        {
            "name":       "Wednesday",
            "allowed":    true,
            "startHour":  9,
            "endHour":    17
        },
        {
            "name":       "Thursday",
            "allowed":    true,
            "startHour":  9,
            "endHour":    17
        },
        {
            "name":        "Friday",
            "allowed":     true,
            "startHour":  9,
            "endHour":    17
        },
        {
            "name":       "Saturday",
            "allowed":    true,
            "startHour":  9,
            "endHour":    17
        }
    ]
}

@nsnitesh7
Copy link

I am also getting the same error. Did you find out the fix for this error?

@shockey
Copy link
Author

shockey commented Jun 1, 2017

I haven't - but it looks like the DMV is blocking JavaScriptless browsers now, and I don't see any flags for enabling JSDom's (dangerous) script execution options.

@vartan, any thoughts?

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

2 participants