© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
4 replies
Jan

Supabase Connection failed

The connection fails and I don't know why, I followed the previous steps from the Supabase x Flutter quickstart.

Here's the main code:

||Future<void> main() async {
  await Supabase.initialize(
    url: 'https://ciofasdascah.supabase.co',
    anonKey:
        'eyJhbGciOiJIUzI1NiIssLz4GkU',
  );

  print('loading all users...');
  // final data = await supabase.from('users').select().eq('uid', 1);
  try {
    final data =
        await supabase.from('users').select().eq('uid', 1).single() as Map;
    String uidString = (data['uid'] ?? '') as String;
    print(uidString);
    // _websiteController.text = (data['website'] ?? '') as String;
    // _avatarUrl = (data['avatar_url'] ?? '') as String;
  } on PostgrestException catch (error) {
    print(error.message);
  } catch (error) {
    print('Unexpected error: ' + error.toString());
  }
  print('loaded');
  runApp(const MyApp());
} ||
||Future<void> main() async {
  await Supabase.initialize(
    url: 'https://ciofasdascah.supabase.co',
    anonKey:
        'eyJhbGciOiJIUzI1NiIssLz4GkU',
  );

  print('loading all users...');
  // final data = await supabase.from('users').select().eq('uid', 1);
  try {
    final data =
        await supabase.from('users').select().eq('uid', 1).single() as Map;
    String uidString = (data['uid'] ?? '') as String;
    print(uidString);
    // _websiteController.text = (data['website'] ?? '') as String;
    // _avatarUrl = (data['avatar_url'] ?? '') as String;
  } on PostgrestException catch (error) {
    print(error.message);
  } catch (error) {
    print('Unexpected error: ' + error.toString());
  }
  print('loaded');
  runApp(const MyApp());
} ||
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Connection Supabase & Lovable
SupabaseSSupabase / help-and-questions
6mo ago
Supabase Error connection
SupabaseSSupabase / help-and-questions
8mo ago
WebSocket connection failed
SupabaseSSupabase / help-and-questions
4y ago
WSS Connection failed
SupabaseSSupabase / help-and-questions
4mo ago