You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change introduces an import error with respect to the crypto library when conntecting to secured instances with TLS: 51e34b2
When attempting to instantiate a new instance of the postgres client a worker boot error is thrown:
Uncaught SyntaxError: The requested module './_wasm/mod.ts' does not provide an export named 'DigestAlgorithm'
at https://deno.land/[email protected]/crypto/crypto.ts:108:14
InvalidWorkerCreation: worker boot error
at async Function.create (ext:sb_user_workers/user_workers.js:84:15)
at async Server.<anonymous> (file:///home/deno/main/index.ts:110:24)
at async Server.#respond (https://deno.land/[email protected]/http/server.ts:220:24)
To Reproduce
Steps to reproduce the behavior:
With a new supabase project:
$ supabase functions new test
Modify the file test/index.ts
// ./supabase/functions/test/index.ts
import { serve } from "https://deno.land/[email protected]/http/server.ts"
import * as postgres from "https://deno.land/x/postgres/mod.ts"
const databaseUrl = Deno.env.get('SUPABASE_DB_URL')
serve(async (req) => {
const client = new postgres.Client(databaseUrl);
client.connect();
const data = {
message: `Booted!`,
}
return new Response(
JSON.stringify(data),
{ headers: { "Content-Type": "application/json" } },
)
})
Start the endpoint $ supabase functions serve test
Get the auth token for the next command, both the anon key and service_role key will work $ supabase status
Call the endpoint $ curl -v http://localhost:54321/functions/v1/test --header 'Authorization: Bearer <anon or service_role key>'
Expected behavior
An http 200 response is returned with the content: { "message": "Booted!" }
Describe the bug
This change introduces an import error with respect to the crypto library when conntecting to secured instances with TLS: 51e34b2
When attempting to instantiate a new instance of the postgres client a worker boot error is thrown:
To Reproduce
Steps to reproduce the behavior:
With a new supabase project:
$ supabase functions new test
Modify the file test/index.ts
Start the endpoint
$ supabase functions serve test
Get the auth token for the next command, both the
anon key
andservice_role key
will work$ supabase status
Call the endpoint
$ curl -v http://localhost:54321/functions/v1/test --header 'Authorization: Bearer <anon or service_role key>'
Expected behavior
An http 200 response is returned with the content:
{ "message": "Booted!" }
Actual Behavior
Server
Client
Additional context
If applicable, add any other context about the problem here.
The text was updated successfully, but these errors were encountered: