Open barbeau opened 8 years ago
FYI, if the Android app is set to the Atlanta region and if you search for 431 and click on the route "GRTA_431 - BrandsMart/Stockbridge to Midtown", the app throws an error at the user. I suspect it is the same problem (in this case a route instead of a stop).
Thanks @sharadagarwal! Good to know - given Atlanta is a production region I'll try to move this up in priority.
Here are all known routes that suffer from the forward slash problem - they are all in Atlanta region (from @sharadagarwal - thanks!):
GRTA_411 - Hamilton Mill/Mall of Georgia to Midtown GRTA_413 - Hamilton Mill/Mall of Georgia to Downtown GRTA_414 - Ham. Mill/Mall of GA/Sugarloaf Mills to Mid GRTA_419 - Snellville/Hewatt Rd/Stone Mtn to Downtown GRTA_423 - E Conyers/W Conyers/Panola Road to Midtown GRTA_426 - E Conyers/W Conyers/Panola Road to Downtown GRTA_428 - West Conyers/Panola Road to Perimeter GRTA_431 - BrandsMart/Stockbridge to Midtown GRTA_432 - BrandsMart/Stockbridge to Downtown GRTA_440 - Hampton/Jonesboro to Downtown/Midtown GRTA_441 - Jonesboro to Downtown/Midtown GRTA_453 - Newnan/Union City to Downtown/Midtown GRTA_463 - W Douglas/Douglasville to Downtown/Midtown GRTA_476 - Hiram/Powder Springs to Downtown/Midtown GRTA_480 - Acworth/Town Center (Big Shanty) to Downtown GRTA_483 - Woodstock/Town Center(Big Shanty) to Midtown
Summary:
If you tap on a stop that has a
/
in thestopId
, the app crashes with:java.lang.IllegalArgumentException: Unknown URI: content://com.joulespersecond.oba/stops/1_Forge Park / 495
...once the ArrivalsListFragment calls
setUserInfo()
and the URI is queried inOBAProvider.queryInternal()
. This particular URI falls through the switch statement which filters query types and generates anIllegalArgumentException
.Seems like client-side we should probably escape
/
as%2F
- see http://stackoverflow.com/questions/2992231/slashes-in-url-variables.Just opened server issue here as well - it's not clear that even if we escape the
/
client-side that servers can accept this in a REST API paramater : https://github.com/OneBusAway/onebusaway-application-modules/issues/182Steps to reproduce:
stop_code
=Forge Park / 495
I'm also guessing that even tapping on the stop in the search list will generate the exception (before you can show it on the map).
It has the following stopId:
1_Forge Park / 495
...and it can be seen in the list of stops returned in this stops-for-location query: http://developer.onebusaway.org/mbta-api/api/where/stops-for-location.json?lat=42.078482127189595&lon=-71.43382396548986&latSpan=0.08702002322407765&lonSpan=0.07993753999471664&version=2&key=TEST
Expected behavior:
Not crash and show arrival times for that stop
Encoded ID should be
1_Forge%20Park%20%2%20495
Observed behavior:
Crash
Device and Android version:
N/A