Skip to content

Supabase Rpc function sliently failing #1792

@Rohit10701

Description

@Rohit10701

Describe the bug

I am making a local first logistic mobile app in expo, so for that i am calling supabase function at start of the day to fetch all the delivery for that function and store it locally so even in area with no internet app works ( have logs for all the steps fetching data from backend, if it throws supabase error, if it throw custom error from my backend logic, log if there is any issue while inserting the data to sqlite etc )

what i have seen sometime , i get only partial data from supabase so we have b2b delivery and b2c, basically sometime we dont even get any b2b ( happend 3 time in span of weeks ), and for that when we check supabase logs ( in logs & analystics under api gateway inside collections ) its nothing there from where we have done after first time, we are daily doing it on two devices and most of the days both devices successfully get the data and supabase logs have both of those api call logged there, but when sometime it misses it just give one person half the data and for other person it works fine ( and even sometime i dont change my code that same data works jsut fine when i impersonate the user in backend and fetch data function same supabase rpc function )

I don't know the exact reason why its happening, but it seems to be happening while we fetch stuff.

according to me -> this isnt frontend issue as if there were any issue from data insertion in sqlite like to rpc call failure or timeout i would have got logs or didnt get data at all, and this might also not be function logic issue as it works fine again if we immediately fetch it again it same function and since supabase is not generating logs, so i guess it sliently failing and returning data so from this it means that edge case doesnt throw any error or anything and hence doesnt create logs in backend.

Library affected

supabase-js

Reproduction

No response

Steps to reproduce

No response

System Info

System:
    OS: macOS 26.0.1
    CPU: (8) arm64 Apple M2
    Memory: 137.66 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - /Users/rohit/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.2.4 - /Users/rohit/.nvm/versions/node/v20.11.1/bin/npm
    bun: 1.1.26 - /Users/rohit/.bun/bin/bun
  Browsers:
    Chrome: 141.0.7390.108
    Edge: 141.0.3537.85
    Firefox: 143.0.4
    Safari: 26.0.1
  npmPackages:
    @supabase/supabase-js: ^2.46.1 => 2.74.0 



    "expo": "~52.0.47",
    "react-native": "0.76.9",
    "@supabase/supabase-js": "^2.46.1",

Used Package Manager

bun

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrepro neededIssue is missing a reproduction example.supabase-jsRelated to the supabase-js library.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions