flightplan-tool / flightplan

Search for award inventory using Node.js and Headless Chrome!
Apache License 2.0
140 stars 41 forks source link

AC Search failing: Missing form element: tripTypeRoundTrip #58

Closed mogurah closed 4 years ago

mogurah commented 4 years ago

Running a search from the command line, it was running fine yesterday but I now get the following error:

[AC] error Unexpected error occurred while searching!
Error: Evaluation failed: Error: Missing form element: tripTypeRoundTrip
    at __puppeteer_evaluation_script__:6:19
    at ExecutionContext._evaluateInternal (/usr/lib/node_modules/flightplan-tool/node_modules/puppeteer/lib/ExecutionContext.js:122:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  -- ASYNC --
    at ExecutionContext.<anonymous> (/usr/lib/node_modules/flightplan-tool/node_modules/puppeteer/lib/helper.js:111:15)
    at DOMWorld.evaluate (/usr/lib/node_modules/flightplan-tool/node_modules/puppeteer/lib/DOMWorld.js:112:20)
  -- ASYNC --
    at Frame.<anonymous> (/usr/lib/node_modules/flightplan-tool/node_modules/puppeteer/lib/helper.js:111:15)
    at Page.evaluate (/usr/lib/node_modules/flightplan-tool/node_modules/puppeteer/lib/Page.js:827:43)
    at Page.<anonymous> (/usr/lib/node_modules/flightplan-tool/node_modules/puppeteer/lib/helper.js:112:23)
    at module.exports.fillForm (/usr/lib/node_modules/flightplan-tool/src/Searcher.js:160:17)
    at module.exports.search (/usr/lib/node_modules/flightplan-tool/src/engines/ac/searcher.js:72:18)

Which is weird since I can find the form element in the url set in the engines/ac/index.js file:

<input id="tripTypeRoundTrip1" name="tripTypeRoundTrip" type="radio" value="Round-Trip"> Running version 0.3.51, installed using the setup docs and everything was working fine yesterday.

mogurah commented 4 years ago

Fixed now not sure what went wrong but it's working again.