weaviate / weaviate/typescript-client

Can't connect by Deno

Open
#309 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
101
Forks
38
Avg merge
4d 12h
Merged PRs (30d)
2

Description

I tried this programm with Node and weaviate-client 3.5.2

import weaviate from 'weaviate-client';

async function connectToLocalWeaviate() {
  const client = await weaviate.connectToLocal();
  console.log("hello");
}

connectToLocalWeaviate();

and it succeeds like:

$ node test.js
hello

I tried the similar programm with Deno (adding npm:-specifier)

import weaviate from 'npm:weaviate-client';

async function connectToLocalWeaviate() {
  const client = await weaviate.connectToLocal();
  console.log("hello");
}

connectToLocalWeaviate();

and It fails with:

$ deno run --allow-all test.js
error: Uncaught (in promise) WeaviateStartUpError: Weaviate startup failed with message: Weaviate failed to startup with message: Weaviate makes use of a high-speed gRPC API as well as a REST API.
      Unfortunately, the gRPC health check against Weaviate could not be completed.

      This error could be due to one of several reasons:
        - The gRPC traffic at the specified port is blocked by a firewall.
        - gRPC is not enabled or incorrectly configured on the server or the client.
            - Please check that the server address and port: localhost:50051 are correct.
        - your connection is unstable or has a high latency. In this case you can:
            - increase init-timeout in weaviate.connectToLocal({timeout: {init: X}})'
            - disable startup checks by connecting using 'skipInitChecks=true'

Any idea? Is it a Deno problem?
Both ports (8080 and 50051) are port forwarded from a kubernetes cluster.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the weaviate.connectToLocal entry point and reproduce the TypeScript example under Deno using the npm: specifier, with ports 8080 and 50051 forwarded from Kubernetes. Compare the Node and Deno connection paths and gRPC health-check behavior; done means the Deno example connects successfully or the incompatibility and required configuration are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, grpc, kubernetes, typescript
Domain
api, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.