schildbach / public-transport-enabler

Unleash public transport data in your Java project.
https://groups.google.com/forum/#!forum/public-transport-enabler-discuss
GNU General Public License v3.0
388 stars 133 forks source link

RuntimeException for transportnsw #252

Closed Moult closed 1 month ago

Moult commented 5 years ago

Please see stack trace from the Transportr app below:

screenshot_20190104-091036

schildbach commented 5 years ago

The stack trace doesn't seem to show the root cause. Can you copy & paste the entire stack trace? Thanks.

Moult commented 5 years ago

java.lang.RuntimeException: uncategorized problem while processing https://transportnsw.info/web/XML_TRIP_REQUEST2?outputFormat=XML&language=en&stateless=1&coordOutputFormat=WGS84&sessionID=0&requestID=0&coordListOutputFormat=STRING&type_origin=coord&name_origin=151.067368%3A-33.781010%3AWGS84&type_destination=coord&name_destination=151.067127%3A-33.781026%3AWGS84&itdDate=20190104&itdTime=1653&itdTripDateTimeDepArr=dep&calcNumberOfTrips=6&ptOptionsActive=1&itOptionsActive=1&routeType=LEASTTIME&changeSpeed=normal&includedMeans=checkbox&inclMOT_0=on&inclMOT_0=on&inclMOT_1=on&inclMOT_2=on&inclMOT_3=on&inclMOT_4=on&inclMOT_5=on&inclMOT_6=on&inclMOT_7=on&inclMOT_9=on&inclMOT_8=on&inclMOT_10=on&trITMOTvalue100=10&locationServerActive=1&useRealtime=1&nextDepsPerLeg=1&inclMOT_11=on&inclMOT_13=on&inclMOT_14=on&inclMOT_15=on&inclMOT_16=on&inclMOT_17=on de.schildbach.pte.AbstractEfaProvider$7.onSuccessful(AbstractEfaProvider.java:2039) de.schildbach.pte.util.HttpClient.getInputStream(HttpClient.java:233) de.schildbach.pte.util.HttpClient.getInputStream(HttpClient.java:163)

If you want to report this error, please report it to public-transport-enabler directly and attach a screenshot.

Moult commented 5 years ago

That's a fresh copy-paste. It seems OK if I visit the website directly. Could it be a problem on Transportr's end?

schildbach commented 5 years ago

I don't know. The exception doesn't tell anything meaningful. I suspect there is a chained exception (aka "root cause") that is hidden by Transportr.

schildbach commented 5 years ago

@grote Do you have any idea?

Can you please clarify in Transportr to not attach the screenshot of stacktraces but only attach a screenshot if you want to show a data problem. Stacktraces should always be attached as a text file.

Moult commented 5 years ago

I should mention that the link in the screenshot to the public-transport-enabler issue tracker doesn't work either :) the URL is wrong.

grote commented 5 years ago

@Moult would you mind creating one ticket for Transportr with these issues? Thanks!

Moult commented 5 years ago

Is it possible for any dev to replicate this issue? I assume then they can get a stack trace :)

ghost commented 5 years ago

I have a similar issue, but I think my situation is different from @Moult. I get the following using Transportr version 2.0.6

java.lang.RuntimeException: uncategorized problem while processing https://transportnsw.info/web/XML_TRIP_REQUEST2?outputFormat=XML&language=en&stateless=1&coordOutputFormat=WGS84[DD.ddddd]&coordOutputFormatTail=7&sessionID=0&requestID=0&coordListOutputFormat=string&type_origin=stop&name_origin=10101127&type_destination=stop&name_destination=10101101&itdDate=20190510&itdTime=2228&itdTripDateTimeDepArr=dep&calcNumberOfTrips=6&ptOptionsActive=1&itOptionsActive=1&routeType=LEASTTIME&changeSpeed=normal&includedMeans=checkbox&inclMOT_0=on&inclMOT_0=on&inclMOT_1=on&inclMOT_2=on&inclMOT_3=on&inclMOT_4=on&inclMOT_5=on&inclMOT_6=on&inclMOT_7=on&inclMOT_9=on&inclMOT_8=on&inclMOT_10=on&trITMOTvalue100=10&locationServerActive=1&useRealtime=1&nextDepsPerLeg=1&inclMOT_11=on&inclMOT_13=on&inclMOT_14=on&inclMOT_15=on&inclMOT_16=on&inclMOT_17=on
de.schildbach.pte.AbstractEfaProvider$7.onSuccessful(AbstractEfaProvider.java:2040)
de.schildbach.pte.util.HttpClient.getInputStream(HttpClient.java:297)
de.schildbach.pte.util.HttpClient.getInputStream(HttpClient.java:230)
Cause: de.schildbach.pte.SydneyProvider.parseLine(SydneyProvider.java:128)
de.schildbach.pte.AbstractEfaProvider.processPublicLeg(AbstractEfaProvider.java:2460)
de.schildbach.pte.AbstractEfaProvider.queryTrips(AbstractEfaProvider.java:2302)

If you want to report this error, please report it to public-transport-enabler directly and attach a screenshot.

From what I can tell, the issue in my situation is that the T9 Northern Line [0] is now showing up in the XML file, but the parseLine method doesn't know about it, and thus throws an exception. [1]

The T1 Northern Line has been renamed to the T9 Northern Line.

An example to repeat this is to set the following using the 'Transport NSW' network.

[0] https://en.wikipedia.org/wiki/Northern_Line_(Sydney) [1] https://github.com/schildbach/public-transport-enabler/blob/master/enabler/src/de/schildbach/pte/SydneyProvider.java#L128

Moult commented 4 years ago

Happy almost anniversary bugreport! I am able to trigger this still.

But an update: I now see that if I use the search fields, I can get a route successfully. If, instead, I just long press on the transportr app and it attempts to geoencode the latlongs into an address, this runtime exception occurs. Hopefully that helps with the debug procedure.

java.lang.RuntimeException: uncategorized problem while processing https://transportnsw.info/web/XML_TRIP_REQUEST2?outputFormat=XML&language=en&stateless=1&coordOutputFormat=WGS84[DD.ddddd]&coordOutputFormatTail=7&sessionID=0&requestID=0&coordListOutputFormat=string&type_origin=coord&name_origin=151.1192330%3A-33.7764700%3AWGS84%5BDD.ddddd%5D&type_destination=coord&name_destination=151.0668090%3A-33.7790630%3AWGS84%5BDD.ddddd%5D&itdDate=20191227&itdTime=2003&itdTripDateTimeDepArr=dep&calcNumberOfTrips=6&ptOptionsActive=1&itOptionsActive=1&routeType=LEASTTIME&changeSpeed=normal&includedMeans=checkbox&inclMOT_0=on&inclMOT_0=on&inclMOT_1=on&inclMOT_2=on&inclMOT_3=on&inclMOT_4=on&inclMOT_5=on&inclMOT_6=on&inclMOT_7=on&inclMOT_9=on&inclMOT_8=on&inclMOT_10=on&trITMOTvalue100=10&locationServerActive=1&useRealtime=1&nextDepsPerLeg=1&inclMOT_11=on&inclMOT_13=on&inclMOT_14=on&inclMOT_15=on&inclMOT_16=on&inclMOT_17=on de.schildbach.pte.AbstractEfaProvider.lambda$queryTrips$8$AbstractEfaProvider(AbstractEfaProvider.java:2024) de.schildbach.pte.-$$Lambda$AbstractEfaProvider$jCpHTMjRbCiVoDnWKo1dEuT46BU.onSuccessful(lambda) de.schildbach.pte.util.HttpClient.getInputStream(HttpClient.java:281) Cause: com.google.common.base.Preconditions.checkArgument(Preconditions.java:217) de.schildbach.pte.dto.Location.(Location.java:57) de.schildbach.pte.dto.Location.(Location.java:68)

If you want to report this error, please report it to public-transport-enabler directly.

yue-dongchen commented 3 years ago

@Moult Have you tried the AustraliaProvider (based on Navitia)? The EFA API from TfNSW isn't officially supported anymore (they don't have any information on the API's existence). The Navitia one works much better (stop discovery also works).

Dispatch9001 commented 1 year ago

This is still broken, 4 years later. Is there any FOSS Transport app for NSW?

schildbach commented 1 month ago

The EFA API that was in use years ago has been shut down by the operator. So I'm closing this.