Skip to content

NoSuchMethodError: Class 'AppLinks' has no instance method 'getInitialAppLink' #941

@murshidm

Description

@murshidm

This bug report describes a NoSuchMethodError encountered when using the supabase_flutter package with the AppLinks dependency.

Steps to Reproduce:

Create a Flutter project and include the following dependencies in your pubspec.yaml:

YAML
dependencies:
  supabase_flutter: 2.5.4
  app_links: 6.1.1

Initialize Supabase in your main.dart file:

Dart
void main() async {
  await Supabase.initialize(
    url: 'YOUR_SUPABASE_URL',
    anonKey: 'YOUR_SUPABASE_ANON_KEY',
  );
  runApp(MyApp());
}

Run the application in debug mode with the setting "Capture all exceptions" enabled.

Observe the error in the console:

Exception has occurred.
NoSuchMethodError (NoSuchMethodError: Class 'AppLinks' has no instance method 'getInitialAppLink'.
Receiver: Instance of 'AppLinks'
Tried calling: getInitialAppLink())
Expected Behavior:

Expected Behavior:

The Supabase.initialize call should initialize the Supabase client without errors.

Additional Information:

VSCode Version: 1.89.1 (Universal)
Operating System: Apple Silicon macOS Sonoma
Supabase Client Version: 2.5.4
AppLinks Version: 6.1.1

Possible Cause:

The getInitialAppLink method might be deprecated in newer versions of the app_links package.

Please note:

I have already tried ignoring debugSdkLibraries and debugExternalPackageLibraries in VSCode settings, but the error persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions