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

1.0.0-dev.8 : Calling RPC functions returns 'No API key found in request' #221

Closed
cgestes opened this issue Sep 23, 2022 · 4 comments · Fixed by #226
Closed

1.0.0-dev.8 : Calling RPC functions returns 'No API key found in request' #221

cgestes opened this issue Sep 23, 2022 · 4 comments · Fixed by #226
Labels
bug Something isn't working postgrest This issue or pull request is related to postgrest

Comments

@cgestes
Copy link

cgestes commented Sep 23, 2022

Describe the bug
Calling RPC functions returns 'No API key found in request'

(this is using a local supabase no idea what happens with the hosted version)

To Reproduce
Call a rpc function.

Expected behavior
works the same as with 0.3.3

Tried both on macos and iphonesimulator.

I made it work by specifying the apiKey in the headers list of supabase.initialize()

btw: both rpc() and rpc().execute() have the same issue.

All others requests works properly without specifying the apiKey header.

Normal request (from the same session but not using rpc):

flutter: HTTP: GET http://localhost:4221/rest/v1/workspace_ops?select=%2A&offset=0&limit=1000&order=created_at.desc.nullslast - 
{
  X-Client-Info: supabase-flutter/1.0.0-dev.8, 
  apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs, 
  Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNjYzOTQwNTM1LCJzdWIiOiI0NjlkNmFlZS00YTdhLTQzN2UtODhhOC04ZGI0ZDMyY2MzOTMiLCJlbWFpbCI6ImdAZy5nIiwicGhvbmUiOiIiLCJhcHBfbWV0YWRhdGEiOnsicHJvdmlkZXIiOiJlbWFpbCIsInByb3ZpZGVycyI6WyJlbWFpbCJdfSwidXNlcl9tZXRhZGF0YSI6e30sInJvbGUiOiJhdXRoZW50aWNhdGVkIiwic2Vzc2lvbl9pZCI6ImY1NDY2YThhLWI5NTYtNDAxZi05ZDEyLWNiZmU5NDI5Nzk2YyJ9.pM89QjBn0neRgDvGiVRFvgqXxogIxRk5IDDn5v6KesM, 
  Prefer: count=exact, 
  Accept-Profile: public
}

rpc request:

flutter: HTTP: POST http://localhost:4221/rest/v1/rpc/push_ws - 
{
  X-Client-Info: supabase-flutter/1.0.0-dev.8, 
  Prefer: count=exact,count=exact, 
  Content-Type: application/json; charset=utf-8
}
@cgestes cgestes added the bug Something isn't working label Sep 23, 2022
@dshukertjr dshukertjr added the postgrest This issue or pull request is related to postgrest label Sep 24, 2022
@ajonno
Copy link

ajonno commented Sep 25, 2022

Same problem

@Vinzent03
Copy link
Collaborator

This is already fixed in supabase/supabase-dart#143 , but it's not released yet.

@ajonno
Copy link

ajonno commented Sep 26, 2022

awesome! any eta for the release ?

@dshukertjr
Copy link
Member

@ajonno supabase-flutter containing this update should be released in the next day or two!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgrest This issue or pull request is related to postgrest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants