Skip to content
New issue

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

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

Already on GitHub? # to your account

MissingPluginException(No implementation found for method initSdk on channel com.sap.gigya_flutter_plugin/methods) #83

Open
3 tasks done
Feelynx opened this issue Oct 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Feelynx
Copy link

Feelynx commented Oct 15, 2024

Checklist

  • The issue can be reproduced in the attached sample application in the repository.
  • I have read the relevant SDK documentation and have not found a suitable solution or answer.
  • I agree to the terms within the SAP Code of Conduct.

Description

Hi there,

We are experiencing (and had experienced) a recurring issue across multiple projects in our company, all using the same plugin. The error occurs specifically on Android when trying to initialize the Gigya SDK:

I/flutter (15108): Failed to initialize the Gigya SDK.
I/flutter (15108): MissingPluginException(No implementation found for method initSdk on channel 
com.sap.gigya_flutter_plugin/methods)

Key Details

  • The issue occurs only on Android.
  • The issue occurs from version 1.0.0 to the latest 1.0.7.
  • It's happening across at least 11 projects.
  • It has been present on all versions of Flutter we've used for the past year and a half.
  • The issue appears in debug mode, so it's not related to shrinking, minification, or obfuscation.
  • Once the initial integration is done, everything works fine, even in release builds (with appropriate Proguard rules applied).

Flutter Doctor

[✓] Flutter (Channel stable, 3.24.3, on macOS 14.3.1 23D60 darwin-arm64, locale it-IT)
• Flutter version 3.24.3 on channel stable at /Users/mashfrog/development/flutter
• Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/mashfrog/Library/Android/sdk
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• CocoaPods version 1.15.2

[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Community Edition (version 2024.1.3)
[✓] VS Code (version 1.93.1)

Solution

Remembering the pubspec.yaml of your example in version 1.0.0 gigya-flutter-plugin-1.0.0.zip, you were implementing the flutter_facebook_auth: ^4.1.2:

name: gigya_flutter_plugin_example
description: Demonstrates how to use the gigya_flutter_plugin plugin.
version: 1.0.0
homepage: https://www.sap.com
publish_to: none

environment:
  sdk: ">=2.18.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  flutter_facebook_auth: ^4.1.2
  gigya_flutter_plugin:
    # When depending on this package from a real application you should use:
    #   gigya_flutter_plugin: ^x.y.z
    # See https://dart.dev/tools/pub/dependencies#version-constraints
    # The example app is bundled with the plugin so we use a path dependency on
    # the parent directory to use the current plugin's version.
    path: ../

  google_sign_in: ^5.2.4

dev_dependencies:
  flutter_lints: ^2.0.0

  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true

  assets:
    - assets/

I found that adding the flutter_facebook_auth dependency to the pubspec.yaml resolves the issue. The dependency doesn't seem to be directly related to the Gigya SDK. Actually i cannot understand why this is solving the issue.

Request:

Could anyone provide insights on why adding the flutter_facebook_auth dependency resolves the issue? I would like to better understand the root cause of this. If is it a mandatory dependency to have in our pubspec.yaml why is it not mentioned in the readme guide?

Thank you for your time!

Reproduction

  1. Start a new Flutter Project
  2. Add the dependency gigya_flutter_plugin: ^1.0.7 to your pubspec.yaml
  3. Follow one to one the configuration provided here guide
  4. Init the gygia sdk
  5. Run the app on an android phone or emulator

Additional context

No response

SDK version

1.0.7

Android/iOS

Android

@Feelynx Feelynx added the bug Something isn't working label Oct 15, 2024
@whosjorge23
Copy link

I encountered the same issue but resolved it using the provided code. Thank you @Feelynx

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

No branches or pull requests

2 participants