Eugene Scheepers
ย ยทย Challenge the status quo

Using Firebase Dynamic Links with Supabase

Resolved

I don't use Firebase for my database or authentication, I use Supabase.

When I try and use Firebase Dynamic Links (After creating Firebase Project and connecting it etc) I get this error when trying to test on iOS emulator:

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized.

Usually this means you've attempted to use a Firebase service before calling Firebase.initializeApp.

View the documentation for more information: https://firebase.flutter.dev/docs/overview#initialization

It appears that Firebase is not being initialised, because I don't use it for Authentication/Database.

I wrote this custom action:

// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/supabase/supabase.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'package:firebase_core/firebase_core.dart';

Future startFirebase() async {
  // Add your function code here!
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
}

And I include in the initial actions of my dart.main but it still does not work.

Has anyone else seen this?

1
3 replies