Skip to content

[Bug] NoSuchMethodErrorMetadataUtils.attachHeaders during PineconeConnection init #22

@serodriguez68

Description

@serodriguez68

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

I updated my io.grpc.stub dependency from 1.57.2 to 1.58.0 and in the process the code interacting with the pinecone client broke because it is no longer able to instantiate a connection the same way it used to do. The code in question is:

val realPineconeClient = PineconeClient(clientConfig) # succeeds
val realPineconeConnection = realPineconeClient.connect(config.indexName) # fails with NoSuchMethodError

I believe the problem is caused by this line of code inside .<init>(PineconeConnection.java:48)
image

The core of the issue seems to be that attachHeaders does not exist in io.grpc.stub v 1.58.0 and you have a dependency on 1.53.0

Expected Behavior

It should work with no error.

Steps To Reproduce

  1. With io.grpc.stub v 1.58.0 pinned
  2. Create a pineconeConnection using a valid config
  3. You should see the come up

Relevant log output

Relevant part of the stack trace


'io.grpc.stub.AbstractStub io.grpc.stub.MetadataUtils.attachHeaders(io.grpc.stub.AbstractStub, io.grpc.Metadata)'
java.lang.NoSuchMethodError: 'io.grpc.stub.AbstractStub io.grpc.stub.MetadataUtils.attachHeaders(io.grpc.stub.AbstractStub, io.grpc.Metadata)'
	at io.pinecone.PineconeConnection.<init>(PineconeConnection.java:48)
	at io.pinecone.PineconeClient.connect(PineconeClient.java:37)
	at io.pinecone.PineconeClient.connect(PineconeClient.java:27)


### Environment
```markdown
- **OS**: MacOS 13.5.2 
- **Language version**: kotlin("jvm") version "1.9.10"
- **Pinecone client version**: 0.2.3, through to 0.4.0

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions