cubehouse / themeparks

Unofficial API for accessing ride wait times and schedules for Disneyland, Disney World, Universal Studios, and many more parks
MIT License
542 stars 125 forks source link

UniversalStudiosSingapore not working #168

Closed jeanmatthieud closed 5 years ago

jeanmatthieud commented 5 years ago

Park UniversalStudiosSingapore

Context

Describe the bug The UniversalStudiosSingapore don't work : the server cannot be reached.

Output

THEMEPARKS 25644: UniversalStudiosSingapore: Running Universal Studios Singapore
THEMEPARKS 25644: Making request to http://cma.rwsentosa.com/Service.svc/GetUSSContent
THEMEPARKS 25644: Calling get:http://cma.rwsentosa.com/Service.svc/GetUSSContent
THEMEPARKS 25644: Network request failed attempt 0/3 for URL http://cma.rwsentosa.com/Service.svc/GetUSSContent
THEMEPARKS 25644: { Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketCloseListener (_http_client.js:364:25)
    at Socket.emit (events.js:194:15)
    at TCP.Socket._destroy._handle.close (net.js:597:12) code: 'ECONNRESET' }

...

THEMEPARKS 25644: Making request to http://www.rwsentosa.com/Homepage/Attractions/UniversalStudiosSingapore
THEMEPARKS 25644: Calling get:http://www.rwsentosa.com/Homepage/Attractions/UniversalStudiosSingapore
THEMEPARKS 25644: Network request failed attempt 0/3 for URL http://www.rwsentosa.com/Homepage/Attractions/UniversalStudiosSingapore
THEMEPARKS 25644: { Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketCloseListener (_http_client.js:364:25)
    at Socket.emit (events.js:194:15)
    at TCP.Socket._destroy._handle.close (net.js:597:12) code: 'ECONNRESET' }
jeanmatthieud commented 5 years ago

Linked to #78

cubehouse commented 5 years ago

I suspect the server was down, appears to be working now?

Calendar seems to be borked, but ride times are returning.

jeanmatthieud commented 5 years ago

I suggest to let this issue open. I will try to check if everything is OK or submit a PR.

BTW, congrats for your wedding!

I discovered that the format of our files differs, even if we are both using eslint. I'm sadly not an expert on eslint...

jeanmatthieud commented 5 years ago

OK, the mentioned http timeout issue is closed. However, if the current implementation is working on my dev station, my server return the 'Unable to parse Universal Studios Singapore wait times response' error string (lib\universal\universalstudiossingapore.js:76). I don't have a clue why it's doing that. My environment are quite different (OS and node version).

jeanmatthieud commented 5 years ago

I launched the testonline of this park on my server, and it's working fine. No idea why it's not working when used as a library...

cubehouse commented 5 years ago

Hmm! I'll have to investigate later, that is a weird one!

cubehouse commented 5 years ago

I fixed this in 5.x - the solution is... weird. I don't really understand what's going on, but the format of the response is completely different when used as a required library. So I've written a parser that tries to wrangle the data into the same format regardless of which way it arrives, seems to be doing the job. Depending on how smoothly 5.x gets out the door, I may backport the fix to 4.x (unless somebody else wants to port it over - b6ee068d855c45513f1c781caad6e3e641fda990 )

cubehouse commented 5 years ago

This is now fixed in 5.x branch, which generally seems to be going well, so I won't be backporting this myself (will take a look at a pull request if you need to be on 4.x for some reason)