Closed robkainz closed 2 years ago
I tried modifying the dependency resolution in my gradle file, but wasn't able to get it to work. Here's one of the things I tried:
configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> if ( details.requested.group == "com.google.protobuf" && details.requested.name == "protobuf-javalite" ) { details.useTarget("com.google.protobuf:protobuf-java:3.21.1") } } }
As mentioned in the PR, I don't know if we really can change this dependency because it's a breaking change.
Could we publish an alternative SDK which doesn't use protobuf lite as an alternative ? Or, can you suggest a work around with the gradle configuration to resolve the conflict ?
Description
I'm not able to start my spring boot server in a Google Cloud environment after upgrading to a recent Hedera SDK (2.14.0-beta.1 was used at the time, but I am quite sure the problem still exists with the latest SDK.) I first noticed the problem when some unit tests failed.
@gregscullard quickly determined that the reason was protobuf-javalite is incompatible with Google's google-cloud-secretmanager:2.0.2, which we heavily depend on, and I imagine others will as well.
According to this discussion Greg sent to me, protobuf-javalite was only meant to be used in an Android environment, though I don't think that is 100% confirmed. However, it is clear from Google's documentation according to the discussion that it is not usable with GCP libraries:
https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues/587
Here is the specific exception I saw when starting up my server on Google Cloud:
Here is the exception I saw when running my unit tests, this specific one simply moves hbar from my testnet faucet account to the one I use for testing:
Part of the stack trace showing that it is a protobuf dependency issue:
I suspect that lite version of protobuf dependency for the Hedera sdk must be replaced with the full version.
Steps to reproduce
Additional context
No response
Hedera network
mainnet, testnet
Version
2.14.0-beta.1
Operating system
macOS