OneBusAway / onebusaway-iphone

OBA development has moved!
https://github.com/OneBusAway/OBAKit
Apache License 2.0
219 stars 117 forks source link

Bus Departing ~1,440 minutes early #661

Closed aaronbrethorst closed 8 years ago

aaronbrethorst commented 8 years ago

Expected behavior

Buses should not ever report themselves as being a day early.

Actual behavior

Sometimes you'll see a bus reporting itself as departing approximately 1,440 minutes early, which happens to be roughly the number of minutes in one day (24 * 60).

Steps to reproduce the behavior

Unclear, but I have finally managed to grab JSON from the server for a circumstance when this happened, so that I can at least nail down whether it's a client or server issue.

This happened at 9:12AM Pacific Time on August 24, 2016. JSON data is attached.

Archive.zip

barbeau commented 8 years ago

Interesting, users have reported this a few times on Android as well. I've chalked it up to device clock issues in the past as I've never seen it myself, but seems like it might be a server issue if we're seeing it on both platforms?

On Aug 24, 2016 12:18 PM, "Aaron Brethorst" notifications@github.com wrote:

Expected behavior

Buses should not ever report themselves as being a day early. Actual behavior

Sometimes you'll see a bus reporting itself as departing approximately 1,440 minutes early, which happens to be roughly the number of minutes in one day (24 * 60). Steps to reproduce the behavior

Unclear, but I have finally managed to grab JSON from the server for a circumstance when this happened, so that I can at least nail down whether it's a client or server issue.

This happened at 9:12AM Pacific Time on August 24, 2016. JSON data is attached.

Archive.zip https://github.com/OneBusAway/onebusaway-iphone/files/435150/Archive.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-iphone/issues/661, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4pLT5VYQjhANbZsWCBkUuNJ0j4J30dks5qjG7ygaJpZM4JsMOV .

aaronbrethorst commented 8 years ago

Which regions have you seen reports of this occurring in? Only Puget Sound?

Sent from my iPhone

On Aug 24, 2016, at 9:29 AM, Sean Barbeau notifications@github.com wrote:

Interesting, users have reported this a few times on Android as well. I've chalked it up to device clock issues in the past as I've never seen it myself, but seems like it might be a server issue if we're seeing it on both platforms?

On Aug 24, 2016 12:18 PM, "Aaron Brethorst" notifications@github.com wrote:

Expected behavior

Buses should not ever report themselves as being a day early. Actual behavior

Sometimes you'll see a bus reporting itself as departing approximately 1,440 minutes early, which happens to be roughly the number of minutes in one day (24 * 60). Steps to reproduce the behavior

Unclear, but I have finally managed to grab JSON from the server for a circumstance when this happened, so that I can at least nail down whether it's a client or server issue.

This happened at 9:12AM Pacific Time on August 24, 2016. JSON data is attached.

Archive.zip https://github.com/OneBusAway/onebusaway-iphone/files/435150/Archive.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-iphone/issues/661, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4pLT5VYQjhANbZsWCBkUuNJ0j4J30dks5qjG7ygaJpZM4JsMOV .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

barbeau commented 8 years ago

I think so - only Puget Sound. It might be a GTFS scheduled arrival time issue. I'll see if I can dig into the JSON.

barbeau commented 8 years ago

Alright, after looking at 1_11190.json in the zip file that @aaronbrethorst attached to this issue in the initial post (captured at 1472055140749 - Wednesday August 24, 2016 09:12:21 am - PDT), it looks like it's a real-time prediction error in Puget Sound - the scheduled times in the response look correct.

Here's a snippet of JSON:

"arrivalsAndDepartures":[  
            {  
               "arrivalEnabled":true,
               "blockTripSequence":4,
               "departureEnabled":true,
               "distanceFromStop":1072.7762336411688,
               "frequency":null,
               "lastUpdateTime":1472054957000,
               "numberOfStopsAway":2,
               "predicted":true,
               "predictedArrivalInterval":null,
               "predictedArrivalTime":1471968867000, // Tuesday August 23, 2016 09:14:27 (am - PDT) (Incorrect)
               "predictedDepartureInterval":null,
               "predictedDepartureTime":1471968867000, // Tuesday August 23, 2016 09:14:27 (am - PDT) (Incorrect)
               "routeId":"1_100447",
               "routeLongName":"",
               "routeShortName":"49",
               "scheduledArrivalInterval":null,
               "scheduledArrivalTime":1472055211000,  // Wednesday August 24, 2016 09:13:31 (am - PDT) (Correct)
               "scheduledDepartureInterval":null,
               "scheduledDepartureTime":1472055211000,  // Wednesday August 24, 2016 09:13:31 (am - PDT) (Correct)
               "serviceDate":1472022000000,
               "situationIds":[  ],
               "status":"default",
               "stopId":"1_11190",
               "stopSequence":6,
               "totalStopsInTrip":20,
               "tripHeadsign":"University District Broadway",
               "tripId":"1_30937119",

timestamp to human-readable time conversions done with http://www.epochconverter.com/, using "America/Los Angeles" (PDT) time zone.

@sheldonabrown Could you please take a look at this in the Puget Sound source real-time feeds?

Link to the offending stop: http://api.pugetsound.onebusaway.org/api/where/arrivals-and-departures-for-stop/1_11190.json?key=TEST

sheldonabrown commented 8 years ago

Certainly -- this has been seen across all interfaces, so I'm happy to have an example

On Wed, Aug 24, 2016 at 1:56 PM, Sean Barbeau notifications@github.com wrote:

Alright, after looking at 1_11190.json in the zip file that @aaronbrethorst https://github.com/aaronbrethorst attached to this issue in the initial post (captured at 1472055140749 - Wednesday August 24, 2016 09:12:21 am - PDT), it looks like it's a real-time prediction error in Puget Sound - the scheduled times in the response look correct.

Here's a snippet of JSON:

"arrivalsAndDepartures":[ { "arrivalEnabled":true, "blockTripSequence":4, "departureEnabled":true, "distanceFromStop":1072.7762336411688, "frequency":null, "lastUpdateTime":1472054957000, "numberOfStopsAway":2, "predicted":true, "predictedArrivalInterval":null, "predictedArrivalTime":1471968867000, // Tuesday August 23, 2016 09:14:27 (am - PDT) (Incorrect) "predictedDepartureInterval":null, "predictedDepartureTime":1471968867000, // Tuesday August 23, 2016 09:14:27 (am - PDT) (Incorrect) "routeId":"1_100447", "routeLongName":"", "routeShortName":"49", "scheduledArrivalInterval":null, "scheduledArrivalTime":1472055211000, // Wednesday August 24, 2016 09:13:31 (am - PDT) (Correct) "scheduledDepartureInterval":null, "scheduledDepartureTime":1472055211000, // Wednesday August 24, 2016 09:13:31 (am - PDT) (Correct) "serviceDate":1472022000000, "situationIds":[ ], "status":"default", "stopId":"1_11190", "stopSequence":6, "totalStopsInTrip":20, "tripHeadsign":"University District Broadway", "tripId":"1_30937119",

timestamp to human-readable time conversions done with http://www.epochconverter.com/, using "America/Los Angeles" (PDT) time zone.

@sheldonabrown https://github.com/sheldonabrown Could you please take a look at this in the Puget Sound source real-time feeds?

Link to the offending stop: http://api.pugetsound.onebusaway.org/api/where/ arrivals-and-departures-for-stop/1_11190.json?key=TEST

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OneBusAway/onebusaway-iphone/issues/661#issuecomment-242153738, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9JHROlUdZlH565Rb-T7eyqLrgLXZzqks5qjIXSgaJpZM4JsMOV .

aaronbrethorst commented 8 years ago

@sheldonabrown is there an issue that can or should be opened up against the server project? Is there any other action that I can take at this time?

sheldonabrown commented 8 years ago

@aaronbrethorst we are already tracking this issue in a non-public bug tracking system. You are certainly welcome to open a bug up on the public wiki as well.

So far we've found KCM is providing an invalid timestamp in the trip updates which may be causing OBA to infer the wrong stop time update to apply the delay to. We should have a code fix shortly but the deploy to production may take a while. I will concurrently work with KCM to see if they can fix the timestamp issue.

aaronbrethorst commented 8 years ago

@sheldonabrown I'll go ahead and close this for now. Thanks for the info and I'm happy to hear it's being tracked :)

barbeau commented 7 years ago

@sheldonabrown Has the fix for this been deployed in Puget Sound?

sheldonabrown commented 7 years ago

Not yet. It's in QA now though so soon.

Sent from my mobile device (I'll be brief)

On Oct 6, 2016, at 4:14 PM, Sean Barbeau notifications@github.com wrote:

@sheldonabrown Has the fix for this been deployed in Puget Sound?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.