AlphaSoundZ
04/16/2023, 5:42 PMthis.supabase.from('tags').select('id').not('id', 'in', tags)
I have an array called tags which contains ids that should be excluded from the select. But why doesnt it work? The results are just emptymoarwick
04/16/2023, 6:17 PMFyl
04/16/2023, 6:32 PMven
04/16/2023, 7:27 PManurag
04/16/2023, 9:40 PMfailed to create pg.columns: must be owner of event trigger pgsodium_trg_mask_update
I found this issue and the solution is mentioned that change the postgres user to superuser temporarily but I don't have superuser permission for some reason even as the owner of the project.
https://github.com/orgs/supabase/discussions/6326
When I ran query to check the usesuper
as true there's a user called supabase_admin
who is this user?
I need to release a feature and I'm blocked because of this, would really appreciate any helpDomcario
04/16/2023, 9:42 PMsupabase/functions
directory at root level. but im getting so many errors...why?!
https://cdn.discordapp.com/attachments/1097275777243938887/1097275777524965437/image.pngβΎ
nahtnam
04/16/2023, 11:43 PMrefresh_token
request fails and logs the user out. I was wondering:
1. Where does the refresh token logic sit? Does the createClient
function inject a setTimeout
?
2. Is there any way I can tell supabase to not immediately log the user out on failed refresh? I'd rather control that or at least try a few times before the user is forcefully logged out. (Or optimistically never log the user out unless a live endpoint returns 401)
One thing I tried was to set autoRefreshToken: false
but it seems like when I refresh the page, the createClient
function sees that token is expired and logs the user out without trying to refresh. Logs of the local storage
[supabase] gotItem {key: 'sb-xxx-auth-token', value: '{"access_token":"xxx"},"expires_at":1681688258}'}
instrument.ts:132
[supabase] removeItem {key: 'sb-xxx-auth-token'}key: "sb-xxx-auth-token"[[Prototype]]: Object
instrument.ts:132
[supabase] gotItem {key: 'sb-xxx-auth-token', value: undefined}
and I don't see a refresh token request in the networkπ·ππππππππ
04/16/2023, 11:46 PMhttps://cdn.discordapp.com/attachments/1097307179511447704/1097309030441033798/image.pngβΎ
https://cdn.discordapp.com/attachments/1097307179511447704/1097309030684299295/image.pngβΎ
angusmiguel
04/16/2023, 11:59 PMhttps://cdn.discordapp.com/attachments/1097310435084075028/1097310435226701916/image.pngβΎ
π·ππππππππ
04/17/2023, 1:03 AMquintin
04/17/2023, 1:34 AMπ·ππππππππ
04/17/2023, 2:21 AMhttps://cdn.discordapp.com/attachments/1097345974101360760/1097345974285914214/image.pngβΎ
https://cdn.discordapp.com/attachments/1097345974101360760/1097345974495613078/image.pngβΎ
darick
04/17/2023, 2:54 AMbkyerv
04/17/2023, 4:01 AM{
session: Session;
} | {
session: null;
} | {
session: null;
}
Later on, when the authentication state changes, I reset the session, but the type of the session returned by the .onAuthStateChange method is different from the type of the session that was initially set. Type of the session returned by .onAuthStateChange is Session
Is this an issue with my implementation, or is it a known behavior that serves a purpose?Sinon
04/17/2023, 4:23 AMscrubdaddy
04/17/2023, 4:27 AMJinni
04/17/2023, 4:46 AMAndy
04/17/2023, 4:48 AMgtims123
04/17/2023, 5:33 AMRecon1st
04/17/2023, 6:22 AMAmbidextrousMoose
04/17/2023, 6:56 AMMuphet
04/17/2023, 8:57 AMquery = query.filter("CAST(priceValue as INTEGER)", "gte", filterByMin);
but that always results in column CAST does not exist. any way of achieving this?Cadavreux
04/17/2023, 10:12 AMalias
04/17/2023, 10:27 AMhttps://cdn.discordapp.com/attachments/1097468281050386443/1097468281255899247/Screenshot_2023-04-17_at_5.25.39_PM.pngβΎ
https://cdn.discordapp.com/attachments/1097468281050386443/1097468281562071150/Screenshot_2023-04-17_at_5.27.06_PM.pngβΎ
Roko
04/17/2023, 10:50 AMOlly
04/17/2023, 12:07 PMshnoman
04/17/2023, 12:24 PM@riverpod
Stream<List<Message>> chatStream(ChatStreamRef ref) async* {
final messages = <Message>[];
final supaClient = Supabase.instance.client;
final supaStream = supaClient
.from('messages')
.stream(primaryKey: ['id'])
.order('createdAt')
.limit(20)
.map<List<Message>>((event) {
final messages = event
.map(
(e) => Message(
id: '121232',
message: e['content'],
//parse string to datetime
createdAt: DateTime.parse(e['createdAt']),
sendBy: '2',
),
)
.toList();
return messages;
});
await for (var event in supaStream) {
messages.addAll([...event]);
yield messages;
}
//on supabase disconnect
}
When I tried to use the realtime channel, it is not a stream, don't understand how it works.
@riverpod
Stream<List<Message>> chatStreamChannel(ChatStreamChannelRef ref) async* {
final channel = Supabase.instance.client.channel('Channel:channel-25330478');
final messages = <Message>[];
channel.on(
RealtimeListenTypes.postgresChanges,
ChannelFilter(
event: '*',
schema: 'public',
table: 'messages',
), (payload, [ref]) {
final message = Message(
id: '123',
message: payload['new']['content'],
createdAt: DateTime.parse(payload['new']['createdAt']),
sendBy: '2',
);
});
channel.subscribe(
(payload, [_]) async {
ref.state = const AsyncData([]);
},
);
ref.onDispose(() {
channel.unsubscribe();
});
}
Simon Vanesse
04/17/2023, 12:39 PMvincelwt
04/17/2023, 12:58 PMsupabase functions serve ingest-website
but I'm getting :
Error: Error response from daemon: create supabase/functions/import_map.json: "supabase/functions/import_map.json" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
I'd like to keep the import map. Thanks for the help!ven
04/17/2023, 1:06 PM