Skip to content

[Bug] NoSuchMethodErrorMetadataUtils.attachHeaders during PineconeConnection init #22

Closed

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

Activity

  1. added
    bug
    on Sep 14, 2023
  2. rohanshah18 commented on Oct 2, 2023

    @rohanshah18
    Contributor

    @serodriguez68 I've updated the gRPC version to v1.58.0, the latest released java-sdk v0.5.1 should've the updates. Would you please let me know if this resolves your issue?

  3. rohanshah18 commented on Oct 6, 2023

    @rohanshah18
    Contributor

    Closing this issue since I haven't heard back, assuming this is working fine for you.

  4. serodriguez68 commented on Oct 18, 2023

    @serodriguez68
    Author

    Sorry for the late reply. I updated the client to v0.6.0 and I can confirm that this particular problem went away. I'll file a different issue if I encounter any other problems.

    Thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions