googleapis / googleapis/google-cloud-java
Java VerifyError occurs when using com.google.cloud libraries-bom > 26.31.0
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 1.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 154
Description
#### Environment details
1. API tested: `CloudFilestoreManagerClient.create()`, `SubscriptionAdminClient.create()`
2. OS type and version: CentOS 7 docker
3. Java version: Java 17
4. Version(s):
```
com.google.cloud
libraries-bom
26.37.0
pom
import
com.google.cloud
google-cloud-monitoring
com.google.cloud
google-cloud-compute
com.google.cloud
google-cloud-storage
com.google.cloud
google-cloud-filestore
com.google.protobuf
protobuf-java-util
4.26.1
```
#### Code example
```java
private CloudFilestoreManagerClient createClient() {
try {
return CloudFilestoreManagerClient.create();
} catch (Exception e) {
logger.get().error("{} Error when creating client for CloudFilestoreManagerClient : {}",
this.getClass().getSimpleName(), e.getMessage());
}
return null;
}
```
#### Stack trace
```
java.lang.VerifyError: Bad return type
Exception Details:
Location:
com/google/cloud/filestore/v1/Instance.internalGetMapFieldReflection(I)Lcom/google/protobuf/MapFieldReflectionAccessor; @24: areturn
Reason:
Type 'com/google/protobuf/MapField' (current frame, stack[0]) is not assignable to 'com/google/protobuf/MapFieldReflectionAccessor' (from method signature)
Current Frame:
bci: @24
flags: { }
locals: { 'com/google/cloud/filestore/v1/Instance', integer }
stack: { 'com/google/protobuf/MapField' }
Bytecode:
0000000: 1bab 0000 0000 0018 0000 0001 0000 0009
0000010: 0000 0013 2ab7 0004 b0bb 001d 59bb 001e
0000020: 59b7 001f 1220 b600 211b b600 22b6 0023
0000030: b700 24bf
Stackmap Table:
same_frame(@20)
same_frame(@25)
at com.google.cloud.filestore.v1.stub.GrpcCloudFilestoreManagerStub.(GrpcCloudFilestoreManagerStub.java:88)
at com.google.cloud.filestore.v1.stub.CloudFilestoreManagerStubSettings.createStub(CloudFilestoreManagerStubSettings.java:494)
at com.google.cloud.filestore.v1.CloudFilestoreManagerClient.(CloudFilestoreManagerClient.java:517)
at com.google.cloud.filestore.v1.CloudFilestoreManagerClient.create(CloudFilestoreManagerClient.java:499)
at com.google.cloud.filestore.v1.CloudFilestoreManagerClient.create(CloudFilestoreManagerClient.java:490)
```
Another one:
```
java.lang.VerifyError: Bad return type
Exception Details:
Location:
com/google/pubsub/v1/Subscription.internalGetMapFieldReflection(I)Lcom/google/protobuf/MapFieldReflectionAccessor; @24: areturn
Reason:
Type 'com/google/protobuf/MapField' (current frame, stack[0]) is not assignable to 'com/google/protobuf/MapFieldReflectionAccessor' (from method signature)
Current Frame:
bci: @24
flags: { }
locals: { 'com/google/pubsub/v1/Subscription', integer }
stack: { 'com/google/protobuf/MapField' }
Bytecode:
0000000: 1bab 0000 0000 0018 0000 0001 0000 0009
0000010: 0000 0013 2ab7 0007 b0bb 0069 59bb 006b
0000020: 59b7 006d 126e b600 701b b600 74b6 0077
0000030: b700 7bbf
Stackmap Table:
same_frame(@20)
same_frame(@25)
at com.google.cloud.pubsub.v1.stub.GrpcSubscriberStub.(GrpcSubscriberStub.java:78)
at com.google.cloud.pubsub.v1.stub.SubscriberStubSettings.createStub(SubscriberStubSettings.java:376)
at com.google.cloud.pubsub.v1.SubscriptionAdminClient.(SubscriptionAdminClient.java:544)
at com.google.cloud.pubsub.v1.SubscriptionAdminClient.create(SubscriptionAdminClient.java:526)
at com.google.cloud.pubsub.v1.SubscriptionAdminClient.create(SubscriptionAdminClient.java:517)
```
#### Any additional information below
Issue only occurs when we use 26.32.0 onwards. 26.31.0 works fine.
Unit tests seem to be working fine for all versions, but not sure what is happening in the docker image.
Contributor guide
Assessment
This issue has not been assessed yet.