Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
murshidm opened this issue Jun 4, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@murshidm
Copy link

murshidm commented Jun 4, 2024

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.

@murshidm murshidm added the bug Something isn't working label Jun 4, 2024
@dshukertjr
Copy link
Member

The SDK is working as expected, and the error that you see is being caught within the SDK. Set your VS code to only catch uncaught exceptions, and you will be fine.

@saropa
Copy link

saropa commented Oct 3, 2024

We have the same issue here. Disabling error reporting (even within the SDK) isn't ideal. It would be nice if an exception was not raised.

@Dev-Adnani
Copy link

Facing Same Issue @dshukertjr

@icodeyou
Copy link

icodeyou commented Jan 1, 2025

Facing same issue. @dshukertjr Please reopen the issue !

@bqubique
Copy link
Contributor

bqubique commented Jan 1, 2025

Weird thing is, the initialization logic already handles this exception, but it still throws...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants