Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OEBB: Parser error: root.svcResL.svcResL.res.common.rtSrcL.rtSrcL.type #233

Closed
gaudes opened this issue Jun 24, 2021 · 19 comments · Fixed by public-transport/transport-apis#96

Comments

@gaudes
Copy link

gaudes commented Jun 24, 2021

Hi Janis,

first errors coming in to Sentry with new version on npm:

Problem occurs with OEBB, message is always Parser error: root.svcResL.svcResL.res.common.rtSrcL.rtSrcL.type

Error occured on following journeys:
from 1240815 to 8100013
from 1230611 to 1291201

Also with following departures:
1240815

Thanks and regards,

Ralf

@derhuerst
Copy link
Member

Currently can't reproduce this error. I will set up a script that runs this periodically.

@gaudes
Copy link
Author

gaudes commented Aug 22, 2021

Hi @derhuerst

any news concerning this issue ?

I have 315 errors the last 30 days from different users.

Problem only occurs with ÖBB profile.

Thanks and regards,

Ralf

@asuender
Copy link

asuender commented Aug 22, 2021

Hello,

I am also struggling with this bug. Interestingly, it seems that this error is not thrown at every request. Sometimes it works, sometimes it doesn’t.

@derhuerst
Copy link
Member

Huh, I just noticed that the script I wrote to find this bug wasn't working properly, sorry. I have fixed it now, let's see if it finds the error.

Again, if you could give me a request that reproduces this error (by running with the DEBUG=hafas-client environment variable), I could probably start fixing it right away.

@derhuerst derhuerst added the bug label Aug 23, 2021
@gaudes
Copy link
Author

gaudes commented Sep 19, 2021

Hi @derhuerst

any news concerning this case ? Did the error occur in your script ?

Thanks and regards, Ralf

@derhuerst
Copy link
Member

Yes, this error has appeared in the logs 14k times.

@derhuerst
Copy link
Member

I don't know how to solve this though. Maybe we can adapt hafas-client's ÖBB profile to re-try the request when this error appears.

@gaudes
Copy link
Author

gaudes commented Feb 19, 2022

Hi @derhuerst ,

any news concerning this error ? It happens only with OEBB, but here multiple times a day.

@derhuerst
Copy link
Member

I don't have any news, unfortunately.

From the top of my head, I haven't tried this, the profile would have to look like this:

const {request: defaultRequest} = require('../../lib/default-request')

const rtSrcLTypeParserErrorMessage = 'Parser error: root.svcResL.svcResL.res.common.rtSrcL.rtSrcL.type'

const requestRetryingOnRtSrcLTypeParserError = async (...args) => {
	for (let attempt = 0; true; attempt++) {
		try {
			return await defaultRequest(...args)
		} catch (err) {
			// retry 3 times on rtSrcL.type parser error, throw otherwise
			// todo: clarify if this actually matches the error
			if (err.message !== rtSrcLTypeParserErrorMessage || attempt >= 2) throw err
		}
	}
}

const oebbProfile = {
	// other stuff…

	request: requestRetryingOnRtSrcLTypeParserError,
}

A PR would be very welcome!

@derhuerst
Copy link
Member

Closing this, please re-open if you encounter this problem again.

@derhuerst derhuerst closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2023
@jstsmthrgk
Copy link

I have also had this error with a very specific train, if that train was included it failed, if it wasnt, it didn't fail.

Station: 8100013 Linz/Donau Hbf

Train: (I don't know any id): IC 460 to Freilassing 23:30 (18.05.2023)

I adjusted opts.results to include/don't include that train, if it was in it failed, if it wasn't it didn't.

@jstsmthrgk
Copy link

jstsmthrgk commented Jun 28, 2023

Ok, it is a server side error, this is the exact response:

{"ver":"1.41","lang":"deu","id":"","err":"PARSE","errTxt":"Parser error: root.svcResL.svcResL.res.common.rtSrcL.rtSrcL.type()"}

@jstsmthrgk
Copy link

I did not create this issue, could someone please re-open it? @derhuerst @gaudes

@derhuerst
Copy link
Member

@jstsmthrgk With the response only, I can't do much unforunately. Please provide the corresponding request that caused the error response.

@derhuerst
Copy link
Member

derhuerst commented Jul 15, 2024

#318 (comment) sounds like it's about this error, too...
cc @CuzImMartin

@CuzImMartin
Copy link

i've got the same version and error of it like the response about you

@Lotteriemeister
Copy link

Lotteriemeister commented Sep 17, 2024

I ran into a similar Error:

Error: HCI Core: Error occurs : HCI Core: An ENUM value was used that is not available in the requested version/extension : root.svcResL.svcResL.res.common.rtSrcL.rtSrcL.type.type

I managed to fix it by updating the version in hafas-client/p/oebb/base.json from 1.41 to 1.80, as that is the version listed in the menu tab on: https://fahrplan.oebb.at/webapp/

@derhuerst
Copy link
Member

I managed to fix it by updating the version […] from 1.41 to 1.80, as that is the version listed in the menu tab on: https://fahrplan.oebb.at/webapp/

Thanks for the hint! Updating to 1.45 was sufficient, so I did that.

@derhuerst
Copy link
Member

derhuerst commented Dec 17, 2024

Updating [ver] to 1.45 was sufficient, so I did that.

I have published this change (31c4f17) as [email protected]. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

6 participants