-
Notifications
You must be signed in to change notification settings - Fork 451
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
Versions newer than 1.32.0 report wrong version in User-Agent on Android #892
Comments
did you mean newer than 1.32.0? If it's older, upgrading is a fix. |
You're right, I fixed the title, sorry for the confusion. |
https://github.com/googleapis/google-api-java-client/pull/1425/files might be related @abelthefirst Can you reproduce this using only google-http-java-client? Any chance this is coming from some other library (where we made recent changes around this header) |
#806 is probably the culprit |
suspect we can change
to
but I need a test case first. |
This may also be failing in GAX |
The original implementation of `getVersion` used the implementation version of the package of the declaring class, however there is differing behavior between Android and openjdk based jvms. In order to be consistent across platforms we will now always resolve the value from the `google-http-client.properties` file that is generated during the build. This method should be stable as it based on loading a classpath resource which has cross jvm support. Fixes #892
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
I'm using 1.33.0, but the version reported is 0.0.
User-Agent: Google-HTTP-Java-Client/0.0 (gzip)
The reason is the implementation of the
BaseDexClassLoader.getPackage(String name)
- https://android.googlesource.com/platform/libcore/+/refs/heads/master/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java#305The text was updated successfully, but these errors were encountered: