ra-supabase icon indicating copy to clipboard operation
ra-supabase copied to clipboard

Running examples broken with `Array(1200)` for `generateContactNotes`

Open AntonOfTheWoods opened this issue 10 months ago • 1 comments

I had to reduce to Array(500) or

    console.log('Updating contacts status...');
    await Promise.all(
        persistedContactNotes
            .sort(
                (a, b) =>
                    new Date(a.date).valueOf() - new Date(b.date).valueOf()
            )
            .map(note => {
                return supabase.from('contacts').update({
                    ...persistedContacts.find(
                        contact => contact.id === note.contact_id
                    ),
                    status: note.status,
                });
            })
    );

Causes errors that breaks the subsequent calls to supabase. Initially it appeared (from the supabase help) that it should be update().eq(...) rather than simply update(), but even with other fixes I wasn't able to get Array(1200) to work. Interestingly, it appears that it isn't stable working at Array(500) either, though it appears to mostly work.

Maybe it's something invalid that gets generated and over about 500 the chance of the invalid entry getting generated goes above a threshold?

AntonOfTheWoods avatar Mar 29 '24 11:03 AntonOfTheWoods

Though it obviously might be related, I am also getting errors after logging in, and many broken screens:

GET http://localhost:54321/rest/v1/sales?select=id%2Cfirst_name%2Clast_name&email=ilike.anton%40melser.org 406 (Not Acceptable)
console.js:213  Error
    at getIdentity (authProvider.ts:13:19)
    at async Object.getIdentity (authProvider.ts:164:34)

The contacts, companies and deals all fail with 4x the first error, then 1x the final error in the browser console

AntonOfTheWoods avatar Mar 29 '24 12:03 AntonOfTheWoods

I can't reproduce the issue. If it still exists, can you give enough details to reproduce it (version, browser, OS, instructions)?

fzaninotto avatar Sep 02 '24 10:09 fzaninotto

I guess you only support the SAAS version of Supabase, so I guess forget about it

AntonOfTheWoods avatar Sep 02 '24 14:09 AntonOfTheWoods