Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to make this starter project work #23

Closed
namn-grg opened this issue May 26, 2023 · 7 comments
Closed

Not able to make this starter project work #23

namn-grg opened this issue May 26, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@namn-grg
Copy link

namn-grg commented May 26, 2023

Bug report

Describe the bug

I followed the exact same steps to locally deploy this starter project but it gives an error

A clear and concise description of what the bug is.
I added my OpenAI key and supabase keys, started my docker and then supabase. I can see the embeddings in the supabase and the openAI API is also working as I can see the usage increasing in the dashboard.

I am not able to get the response as in the screenshot attached -
Screenshot 2023-05-26 at 1 25 03 PM

The error is -
CustomEvent {isTrusted: false, data: '{"error":"There was an error processing your request"}', source: SSE, detail: null, type: 'error', …}

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Clone this repo
Did npm i to install dependencies
Got the API keys and added them to .env
Set up docker and supabase
then run pnpm dev

Expected behavior

Recieve an error like I am getting

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

I am not much familiar with supabase and openAI so not sure about this error. Would really appreciate help on this. Also if there is discord support available I can hop there too. I am building a project with very same usecase. Followed @gregnr 's video on youtube

@namn-grg namn-grg added the bug Something isn't working label May 26, 2023
@thorwebdev
Copy link
Contributor

This seems to be an error within the vercel edge function. Can you check the logs in your vercel Dashboard please?

@musashi-garami
Copy link
Contributor

Yeah I'm getting same behaviour on the 'Deploy direct to vercel starter version' and definitely getting some errors with the edge function "/api/vector-search"

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at (vc/edge/function:50126:3123)
at (vc/edge/function:120:10949)

@thorwebdev
Copy link
Contributor

Can you try running the project locally and see if that renders any more helpful error messages?

If you need some help with the local development steps, can follow the video guide: https://www.youtube.com/watch?v=xmfNUCjszh4

@bajajerk
Copy link

bajajerk commented Jun 6, 2023

i am facing the similar issue on deploying

@cbtham
Copy link

cbtham commented Jun 8, 2023

I encountered this exact error and realized my role key and anon key is missing. Do this:-

  1. Run supabase start
  2. Run supabase status
  3. Copy the service role key and anon key into your env file.
  4. Run pnpm dev, it should work now

I am running a local version, not the cloud deploy

@KalebKloppe
Copy link

KalebKloppe commented Jun 14, 2023

Using the supabase keys from supabase status in the .env I am seeing the same errors.

:3000/api/vector-search:1 
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

client.js:1
{
    "isTrusted": false,
    "data": "{\"error\":\"There was an error processing your request\"}",
    "source": {...},
        "payload": "{\"query\":\"what are embeddings?\"}",
        "method": "POST",
        "withCredentials": false,
        "FIELD_SEPARATOR": ":",
        "listeners": {...},
        "xhr": null,
        "readyState": 2,
        "progress": 0,
        "chunk": ""
    }
}
[TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))]
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (1673kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
[TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))]

Edit: The issue was the OpenAI.

Despite having given them my payment info and generated an API key, I needed to enable the api by

@thorwebdev
Copy link
Contributor

Thanks for outlining the resolution steps. Closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants