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

Tink is not compatible with protobuf-java to v4.26.0 #31

Closed
lily-es opened this issue Mar 21, 2024 · 2 comments
Closed

Tink is not compatible with protobuf-java to v4.26.0 #31

lily-es opened this issue Mar 21, 2024 · 2 comments
Assignees

Comments

@lily-es
Copy link

lily-es commented Mar 21, 2024

Describe the bug:

Tink is not compatible with protobuf-java v4.26.0 due to a class being renamed. Attempting to initialize Tink when using protobuf v4.26.0 results in this error

java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: com/google/protobuf/GeneratedMessageV3
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at com.google.crypto.tink.hybrid.EciesAeadHkdfPublicKeyManager.<init>(EciesAeadHkdfPublicKeyManager.java:43)
	at com.google.crypto.tink.hybrid.HybridConfig.<clinit>(HybridConfig.java:44)
	... 83 more

What version of Tink are you using?
1.12.0

@lily-es lily-es changed the title Update protobuf-java to v4.26.0 Tink is not compatible with protobuf-java to v4.26.0 Mar 21, 2024
@morambro morambro self-assigned this May 28, 2024
copybara-service bot pushed a commit that referenced this issue May 28, 2024
#31

PiperOrigin-RevId: 638040988
Change-Id: I5edbf2133f33044eb6815f33a5ce8d47dfe1e4ec
@pkoenig10
Copy link
Contributor

pkoenig10 commented Jul 7, 2024

By upgrading to protobuf-java 4.x, Tink is no longer compatible with protobuf-java 3.x. Most of the Java ecosystem is still using protobuf-java 3.x due to binary breaking changes in protobuf-java 4.x.

It seems like protobuf-java has committed to preserving backwards compatibility in order to allow consumers to upgrade, but this work is not yet complete.

protocolbuffers/protobuf#16452

protocolbuffers/protobuf#17247

Can we downgrade protobuf-java to the latest 3.x until this work is complete? Otherwise consumers will likely be prevented from taking Tink upgrades.

copybara-service bot pushed a commit that referenced this issue Jul 18, 2024
Protobuf 4.x introduced a breaking change. Version 27.2 introduced a set of stubs to make proto backward compatible (https://github.com/protocolbuffers/protobuf/releases/tag/v27.2) but this seems to be incomplete (protocolbuffers/protobuf#17247).

#31

PiperOrigin-RevId: 653514325
Change-Id: I10ac3cab3a8856864052619569e6be0492dca274
morambro added a commit to morambro/tink-java-1.14.1 that referenced this issue Jul 18, 2024
Protobuf 4.x introduced a breaking change. Version 27.2 introduced a set of stubs to make proto backward compatible (https://github.com/protocolbuffers/protobuf/releases/tag/v27.2) but this seems to be incomplete (protocolbuffers/protobuf#17247).

tink-crypto#31

PiperOrigin-RevId: 653514325
Change-Id: I10ac3cab3a8856864052619569e6be0492dca274
(cherry picked from commit 9fdb4e2)
@morambro
Copy link
Contributor

morambro commented Aug 6, 2024

We released the tink-java@v1.14.1 patch release which downgrades Protobuf to 25.3.

@morambro morambro closed this as completed Aug 6, 2024
@morambro morambro reopened this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants