https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • b

    bhaskar

    07/27/2022, 9:25 PM
    Hi team, i am getting
    Copy code
    Email signups are disabled
    for newer signup. i have it enabled on the settings. not sure why it still show this up.
    d
    • 2
    • 2
  • u

    7seas3c

    07/28/2022, 6:20 AM
    Hey guys I have this payload
    Copy code
    js
    ...
    processActivity = [
       {
                    processActivityId: "2220c7a1-1111-429f-9381-b6327f3082e3",
                    commandType: "CREATE",
                    nodeType: "ACTIVITY",
                    targetTable: "ORDER",
                    status: "PENDING",
                    to: [{
                        id: "2220c7a1-2222-429f-9381-b6327f3082e3",
                    }],
                    from: [{
                        id: "2220c7a1-aaaa-429f-9381-b6327f3082e3",
                    }],
                    logic: "",
                    commandPayload: {
                        order_id: v4(),
                    },
                    eventPayload: "",
                    isCompleted: false,
                },
    ...
    ]
    i have problem upon
    to
    and
    from
    creation and this is how i did it for both
    Copy code
    js
    ...
    to: {
      connectOrCreate: activity.to?.map(t => {
        return {
            where: {id: t.id},
            create: {toNodeId: t.toNodeId}
        }
      })
    }
    the inserts was success but the values are wrong. in db it uploads the processActivityId instead in that
    to
    and
    from
    field, rather than to value assigned in the payload. How can I do it ya ?
    • 1
    • 3
  • r

    RyanCaoDev

    07/28/2022, 7:12 AM
    https://github.com/ryanccn/moddermore I am currently having problems with this project where sometimes Supabase returns no rows for a perfectly valid
    id
    and causes a 404 in my application. GitHub Discussions and Support have been not very helpful so far...
    j
    • 2
    • 5
  • u

    $VINIT$

    07/28/2022, 10:19 AM
    i passed name of file in getPublicUrl method but it says no route matched with those value
    g
    • 2
    • 1
  • g

    garyaustin

    07/28/2022, 2:12 PM
    i passed name of file in getPublicUrl
  • l

    looni

    07/28/2022, 2:17 PM
    I am trying to deploy my Svelte-Kit app to Vercel for the first time, but I am now getting this error
    Copy code
    2022-07-28T11:45:56.041Z    21833103-4ba1-4045-bdfb-91b39c47f985    ERROR    Unhandled Promise Rejection     {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: Dynamic require of \"events\" is not supported","reason":{"errorType":"Error","errorMessage":"Dynamic require of \"events\" is not supported","stack":["Error: Dynamic require of \"events\" is not supported","    at file:///var/task/index.js:12:9","    at node_modules/websocket/lib/utils.js (file:///var/task/index.js:14834:41)","    at __require2 (file:///var/task/index.js:18:50)","    at node_modules/websocket/lib/WebSocketServer.js (file:///var/task/index.js:16609:18)","    at __require2 (file:///var/task/index.js:18:50)","    at node_modules/websocket/lib/websocket.js (file:///var/task/index.js:17597:17)","    at __require2 (file:///var/task/index.js:18:50)","    at node_modules/websocket/index.js (file:///var/task/index.js:17613:22)","    at __require2 (file:///var/task/index.js:18:50)","    at node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js (file:///var/task/index.js:18450:23)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: Dynamic require of \"events\" is not supported","    at process.<anonymous> (file:///var/runtime/index.mjs:775:15)","    at process.emit (node:events:539:35)","    at emit (node:internal/process/promises:140:20)","    at processPromiseRejections (node:internal/process/promises:274:27)","    at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
    Unknown application error occurred
    s
    • 2
    • 3
  • l

    looni

    07/28/2022, 2:17 PM
    So the error originates from the supabase dependency that uses websocket. Websocket uses dynamic imports in its utils.js file and that is giving me an error Any ideas how to fix this?
  • a

    Azura

    07/28/2022, 2:21 PM
    [supabase-community / auth-helpers / NextJS] I'm trying to set `withMiddlewareAuth`'s redirectTo parameter to point to
    https://www.google.com
    but it does not work as expected. **Expectation**: redirects to
    https://www.google.com
    **Result**: redirects to
    localhost:3000/https://www.google.com
    Is there any way I could achieve the expectation scenario using Supabase's Nextjs Middleware Helper?
    • 1
    • 1
  • r

    robertdenirosbiro

    07/28/2022, 2:45 PM
    Oh, so simply upgrading Supabase to the latest version fixed that.
  • s

    silentworks

    07/28/2022, 2:53 PM
    I am trying to deploy my Svelte Kit app
  • a

    anderjaska

    07/28/2022, 5:40 PM
    So, I did sorta a dumb thing. I ran this sql query, to keep things secure, and now I can't upload anything to my buckets:
    Copy code
    REVOKE ALL PRIVILEGES ON DATABASE "postgres" FROM "anon";
    REVOKE ALL PRIVILEGES ON SCHEMA "public" FROM "anon";
    REVOKE ALL PRIVILEGES ON SCHEMA "storage" FROM "anon";
    REVOKE ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA "public" FROM "anon";
    REVOKE ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA "storage" FROM "anon";
    REVOKE ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA "public" FROM "anon";
    REVOKE ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA "storage" FROM "anon";
    REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA "public" FROM "anon";
    REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA "storage" FROM "anon";
    REVOKE ALL ON ALL ROUTINES IN SCHEMA public FROM PUBLIC;
    How can I reverse this for
    storage
    specifically?
  • a

    anderjaska

    07/28/2022, 5:40 PM
    Should setting policies override this?
  • a

    anderjaska

    07/28/2022, 5:42 PM
    Feel free to judge
  • a

    anderjaska

    07/28/2022, 5:57 PM
    Was p simple:
    Copy code
    GRANT ALL PRIVILEGES ON SCHEMA "storage" TO "anon";
    GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA "storage" TO "anon";
    GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA "storage" TO "anon";
    GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA "storage" TO "anon";
  • s

    sudoramen

    07/28/2022, 7:55 PM
    Hi All, I'm having trouble running a rpc on any of my defined functions with the js client. I can call them via SQL and cURL just fine but running the generated js code
    Copy code
    let { data, error } = await supabase
      .rpc('get_customer_home')
    
    if (error) console.error(error)
    else console.log(data)
    results in
    Copy code
    {
      message: 'Could not find the public.get_customer_home() function or the public.get_customer_home function with a single unnamed json or jsonb parameter in the schema cache',
      code: 'PGRST202',
      details: null,
      hint: 'If a new function was created in the database with this name and parameters, try reloading the schema cache.'
    }
    g
    • 2
    • 19
  • h

    HorseShoe

    07/29/2022, 1:02 AM
    How to redirect to a different url than site url My site url is localhost:3000 and I want supabase to redirect to localhost:3000/auth/login after oauth. I have given the
    redirectTo
    option in the second object of the signIn method but it still doesn't work. Only when I change the site url it changes
  • g

    garyaustin

    07/29/2022, 1:23 AM
    Did you also set the redirect urls to exactly match in the Auth settings in your dashboard
  • u

    ﮼كميل razsagul

    07/29/2022, 2:22 AM
    Hello, all. Does anyone know how I can pass data from a multiselection of items?
  • g

    garyaustin

    07/29/2022, 2:28 AM
    Can you provide more info on what you are looking to do? Not really clear.
  • u

    ﮼كميل razsagul

    07/29/2022, 2:44 AM
    I want to send a list of items to my db
    g
    • 2
    • 13
  • u

    ﮼كميل razsagul

    07/29/2022, 2:49 AM
    Every selection I want to pass it as an array to my db
  • a

    Azura

    07/29/2022, 3:18 AM
    Is anyone having the same issue?
  • g

    garyaustin

    07/29/2022, 3:23 AM
    Have you generated an issue in auth-helpers github? Also you might get more views in general thread versus here, as javascript channel gets hard to read as it does not use threads. Not saying that will help, as I don't know how narrow of scope your issue is to the user base. Github would be seen by the devs doing auth-helpers though. I'll also say in general redirectTo at least for supabase-js is the redirect address back to your site and has to match an address set in your auth settings in the dashboard.
  • k

    Kurooo

    07/29/2022, 5:31 AM
    is it possible to create a table through code not in the dashboard? more like schema in mongo
    g
    • 2
    • 3
  • u

    𝐢𝐚𝐦𝐦𝐚𝐫𝐤𝐩𝐬

    07/29/2022, 12:26 PM
    How to disconnect realtime socket in useEffect cleanups?
    j
    • 2
    • 1
  • u

    𝐢𝐚𝐦𝐦𝐚𝐫𝐤𝐩𝐬

    07/29/2022, 12:26 PM
    it is promise so im not sure if i can just run it
  • u

    𝐢𝐚𝐦𝐦𝐚𝐫𝐤𝐩𝐬

    07/29/2022, 12:27 PM
    Copy code
    ts
      return () => {
          const disconnect = async () => await socket.disconnect()
          disconnect()
        }
  • u

    𝐢𝐚𝐦𝐦𝐚𝐫𝐤𝐩𝐬

    07/29/2022, 12:27 PM
    is this the proper way to do it?
  • g

    garyaustin

    07/29/2022, 2:02 PM
    is it possible to create a table through
  • h

    HorseShoe

    07/29/2022, 3:01 PM
    Yes..
1...767778...81Latest