Bump for visibility, also getting this.
Bump for visibility, also getting this. Hopefully it’s being looked into
10 Replies
Hi @cloudkite. We are not observing any issues related to auth in Vectorize. Could you please share some details about the way you are sending requests to Vectorize? I am looking for your mode of connecting to Vectorize (HTTP, Worker Bindings or Wrangler), any details on the auth headers that you are sending, as well as the permissions that you have included (if you are using an API token). Feel free to DM me those details if you would find that preferable.
I am using . About 80% of requests fail but if I retry enough times a few will succeed
the other people who have observed this mentioned using it locally so I assume they are also using it with the experimental flag
one thing I have observed is that it will work for a length of time. Then fail consistently for a certain length of time. Dont know how wrangler is authenticating when using that flag. But maybe its renewing its auth/refresh token at certain intervals?
in terms of auth using
I also experience this bug intermittently.. It's a hard one to debug. I'm using vectorize via bindings in a Pages/Workers app so auth shouldnt be a problem, although i am loggin in via the wrangler CLI. It seems to happen to me more when i navigate between pages that query vectorize frequently. Possibly a different edge case causing it, but nothing i've been able to debug myself.
Hey @cloudkite. We are working on trying to repro the issue internally, do you have an estimate for the time interval after you start observing the error? Any details that you can share would be useful (including the index name, stack traces and code snippets). Please feel free to DM me with those details if you'd prefer that.
Also, you will always need to pass the
--experimental-vectorize-bind-to-prod
flag to work with Vectorize indexes when using wrangler dev, so that steps seems correct.
Hey @Astro. Are you observing this error in the dev mode too?Yes i am.. more common in local dev because thats where i spend most of my time.. Im unsure just how noticeable it is on production, but i've definitely seen it a few times
heres the stack trace
binding
vectorize = [{ binding = "VECTOR_INDEX", index_name = "sources-index-dev" }]
code snippet Mine is very similar, instead of querying for a search this is for recommendations. Same error message as cloudkite is seeing.
Wrangler.toml:
And do you observe the error in the local dev mode? After a delay?
I see it in dev mode yes. I notice it mostly when Vite hot refreshes after I make a change (Remix app - so this will cause my loader function to refresh data)
I have a gut feeling it only happens when I first put a vector into the database. Like when i create a vector for the video, then I go to that video's page, which should query vectorize for similar videos (for recommendations) is when this happens. I'm testing my whole embedding flow right now so i'll give this a bit more testing to hopefully get to the bottom of it
Update on this behavior: a couple days ago i started seeing some
address already in use
error that would timeout my Remix app being caused by wrangler.. seeing this, i logged out via wrangler logout
, then realized i couldnt actually log back in because i code via SSH, and clicking the oauth url to sign in will redirect to localhost, which is NOT where the CLI was initiated from.. I was able to login via a "CLOUDFLARE_API_TOKEN" env variable on the remote system (not ideal - but technically worked) but now i'm consistently getting the 10000 errors from vectorize for "Authentication error".
Here's the code thats consistently causing this error
And here are the console logs when executing this code (showing where in the process it errors out)
The line erroring here is
Very weird behavior - but im now experiencing the 10000 error everywhere in my app in local dev mode, not just on that code.
anywhere i use vectorize i see this error
*** important to note im still able to access other bindings without issue, such as D1Hey @Astro. Thank you for providing these details. We will pass them on to the team that looks after Wrangler auth.
I do want to inform you that Vectorize does not operate in a "true" local mode, since each request will hit your "remote" Vectorize index and go through the Vectorize service. That might explain why you're able to work with other bindings and not Vectorize.
Also wanted to check if your API token includes the "Vectorize Edit" Permissions since that is needed to insert vectors in a Vectorize index.