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

Fix Invalid Client Version Error with BVG API #323

Closed
wants to merge 1 commit into from

Conversation

timvonwerne
Copy link
Contributor

Issue: When running the example or making any request, the BVG API returns an error related to an invalid client version:

{
  isHafasError: true,
  code: null,
  isCausedByServer: false,
  hafasCode: 'CLIENTVERSION',
  url: 'https://bvg-apps-ext.hafas.de/bin/mgate.exe?',
  hafasMessage: 'HCI Core: Invalid client version'
}

Resolution: This issue occurs because the AID (presumably App ID?) value in the base.json file is outdated. I have updated the AID to the value currently used in the BVG FahrInfo app on iOS. This change resolves the client version error, allowing requests to be processed correctly.

Testing: I have tested the updated AID with multiple requests, and they now work as expected without returning the error.

Copy link

@FredNandrin FredNandrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to propose the same fix with another key.
LGTM

@behring5
Copy link

Wow. Nice Catch.

And yes I was totally wrong and mixed the APIs

Copy link
Member

@derhuerst derhuerst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution, it indeed fixes the access problems.

However, given that the integration tests include full bodies or recorded requests, their fixtures will have to be adapted.

@derhuerst derhuerst self-assigned this Sep 25, 2024
@derhuerst derhuerst closed this in 3c8bb90 Sep 25, 2024
@derhuerst
Copy link
Member

@timvonwerne Do you want to be mentioned in contributors in package.json? If you do, how? As Tim von Werne <[email protected]>?

@derhuerst
Copy link
Member

Published as [email protected]. 🎉

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

Successfully merging this pull request may close these issues.

4 participants