themeparks icon indicating copy to clipboard operation
themeparks copied to clipboard

Receiving error "Cannot read property 'date' of undefined

Open fischgeek opened this issue 6 years ago • 3 comments

Park WDW Florida

Context

  • themeparks version used: 5.1.28
  • Operating System: Windows Server 2012

How to find your themeparks version: Installed latest with npm | npm list | find "themeparks"

Describe the bug Running into an issue where the date roll-over might be the culprit. I was going smooth until the parks time of day rolled over to the next day (12:00am) and I was still on the previous day (1hr timezone difference). All calls failed on line 96 of disneyworldapibase.js.

fischgeek avatar Nov 02 '19 04:11 fischgeek

Can you share a little about your setup? Are you keeping the NodeJS process running between requests and making sure the database cache file isn't deleted each time an update it requested?

cubehouse avatar Nov 02 '19 10:11 cubehouse

Sure. I don't keep the NodeJS process running. I run a script on demand and the database is not deleted each time. I can tell because when it pulls from cache it's faster.

Again, this only seems to happen at night when the park hours have rolled over to the next day and I'm still on the previous day. I will try again tonight and update you if so.

fischgeek avatar Nov 02 '19 19:11 fischgeek

Crap. Fell asleep. Maybe if we just put a bail out in there if GetCurrentParkSchedule() returns null?

fischgeek avatar Nov 03 '19 18:11 fischgeek