Closed shahid31346 closed 1 year ago
@shahid31346 please add your AndroidManifest and your MainActivity
@darwin-morocho I'm facing the same problem too, in Android only
@darwin-morocho I'm facing the same problem too, in Android only
https://github.com/darwin-morocho/flutter-facebook-auth/issues/290#issuecomment-1267116353
ah @darwin-morocho problem solved. I add facebook client token into manifest & it's worked!
No issue on iOS, but Android error on both login & logout:
E/flutter ( 5774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method logOut on channel app.meedu/flutter_facebook_auth)
E/flutter ( 5774): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7)
E/flutter ( 5774): <asynchronous suspension>
E/flutter ( 5774): #1 FacebookAuthPlatformImplementation.logOut (package:flutter_facebook_auth_platform_interface/src/facebook_auth_implementation.dart:87:5)
E/flutter ( 5774): <asynchronous suspension>
I have followed https://facebook.meedu.app/docs/4.x.x/android. Error still remaining.
AndroidManifest.xml
<queries>
<package android:name="com.facebook.katana" />
<provider
android:authorities="com.facebook.katana.provider.PlatformProvider"
android:exported="true" />
<provider
android:authorities="com.facebook.orca.provider.PlatformProvider"
android:exported="true" />
</queries>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:exported="true"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
android/app/build.gradle
dependencies {
. . .
implementation 'com.facebook.android:facebook-login'
}
same issue any help?
No issue on iOS, but Android error on both login & logout:
E/flutter ( 5774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method logOut on channel app.meedu/flutter_facebook_auth) E/flutter ( 5774): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7) E/flutter ( 5774): <asynchronous suspension> E/flutter ( 5774): #1 FacebookAuthPlatformImplementation.logOut (package:flutter_facebook_auth_platform_interface/src/facebook_auth_implementation.dart:87:5) E/flutter ( 5774): <asynchronous suspension>
I have followed https://facebook.meedu.app/docs/4.x.x/android. Error still remaining.
AndroidManifest.xml
<queries> <package android:name="com.facebook.katana" /> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <provider android:authorities="com.facebook.orca.provider.PlatformProvider" android:exported="true" /> </queries> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
android/app/build.gradle
dependencies { . . . implementation 'com.facebook.android:facebook-login' }
@tovidd your Android Manifest is wrong. You must remove
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:exported="true"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
also the meta tags must be inside the application tag. Please check https://github.com/darwin-morocho/flutter-facebook-auth/blob/master/examples/with_provider/android/app/src/main/AndroidManifest.xml
Also you don't need implementation 'com.facebook.android:facebook-login'
in your build.gradle
same issue any help?
@Basemshawwa please add your AndroidManifest and your MainActivity
@darwin-morocho i have removed FacebookActivity, CustomTabActivity, & takeout implementation 'com.facebook.android:facebook-login'
as you said, sadly it still error. Does the error come from pubspec.yaml ?
and is it fine if <queries>
contain <provider>
& <intent>
?
<queries>
<provider
android:authorities="com.facebook.katana.provider.PlatformProvider"
android:exported="true" />
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="whatsapp" />
</intent>
</queries>
@darwin-morocho i have removed FacebookActivity, CustomTabActivity, & takeout
implementation 'com.facebook.android:facebook-login'
as you said, sadly it still error. Does the error come from pubspec.yaml ?pubspec.yaml and is it fine if
<queries>
contain<provider>
&<intent>
?<queries> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <intent> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" /> </intent> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="tel" /> </intent> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="sms" /> </intent> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="whatsapp" /> </intent> </queries>
the queries tag only can allows provider tags please add your complete AndroidManifest. Sorry but if you don't provide that file I not able to help you
Here @darwin-morocho
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
<uses-permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" />
<uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />-->
<queries>
<provider
android:authorities="com.facebook.katana.provider.PlatformProvider"
android:exported="true" />
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="whatsapp" />
</intent>
</queries>
<application
android:name=".MyApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="My apps"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup,icon,label,name"
tools:node="replace">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token"/>
<activity
android:name="com.aboutyou.dart_packages.sign_in_with_apple.SignInWithAppleCallback"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="signinwithapple" />
<data android:path="callback" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
android:theme="@style/LaunchTheme"
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="www.apps.com" android:pathPrefix="/path"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="*.apps.com" android:pathPrefix="/path"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="apps" android:host="redirection"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="delivery_metrics_exported_to_big_query_enabled"
android:value="true" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/purple" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/channel" />
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/gms_app_id" />
<meta-data
android:name="firebase_performance_logcat_enabled"
android:value="true" />
<!-- <activity-->
<!-- android:name="com.facebook.FacebookActivity"-->
<!-- android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"-->
<!-- android:exported="true"-->
<!-- android:label="@string/app_name" />-->
<!-- <meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled"-->
<!-- android:value="true"/>>-->
<!-- <meta-data android:name="com.facebook.sdk.AutoInitEnabled"-->
<!-- android:value="true"/>-->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/gms_version" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:exported="true"
android:theme="@android:style/Theme.Translucent" />
<!-- <activity-->
<!-- android:name="com.facebook.CustomTabActivity"-->
<!-- android:exported="true">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.VIEW" />-->
<!-- <category android:name="android.intent.category.DEFAULT" />-->
<!-- <category android:name="android.intent.category.BROWSABLE" />-->
<!-- <data android:scheme="@string/fb_login_protocol_scheme" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<receiver
android:name="com.adjust.sdk.AdjustReferrerReceiver"
android:exported="true"
android:permission="android.permission.INSTALL_PACKAGES">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service
android:name="com.google.firebase.components.ComponentDiscoveryService"
android:directBootAware="true"
android:exported="true">
<meta-data
android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.crashlytics.CrashlyticsRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar"/>
<meta-data
android:name="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.perf.FirebasePerfRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.remoteconfig.RemoteConfigRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.abt.component.AbtRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar"/>
</service>
<service
android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery"
android:exported="false">
<meta-data
android:name="backend:com.google.android.datatransport.cct.CctBackendFactory"
android:value="cct"/>
</service>
<service
android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE" >
</service>
<activity
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:screenOrientation="portrait"
android:exported="true"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
</application>
</manifest>
flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel unknown, 3.3.2, on macOS 12.6 21G115 darwin-x64, locale en-ID) ! Flutter version 3.3.2 on channel unknown at /Users/username/Development/flutter ! Upstream repository unknown [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 13.3) [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.71.2) [✓] Connected device (3 available) [✓] HTTP Host Availability
! Doctor found issues in 2 categories.
Here @darwin-morocho
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.example.android"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.READ_CALL_LOG" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.VIDEO_CAPTURE" /> <uses-permission android:name="android.permission.AUDIO_CAPTURE" /> <uses-permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" /> <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" /> <uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.READ_CALENDAR" /> <uses-permission android:name="android.permission.WRITE_CALENDAR" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />--> <queries> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <intent> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" /> </intent> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="tel" /> </intent> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="sms" /> </intent> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="whatsapp" /> </intent> </queries> <application android:name=".MyApplication" android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="My apps" android:usesCleartextTraffic="true" tools:replace="android:allowBackup,icon,label,name" tools:node="replace"> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/> <activity android:name="com.aboutyou.dart_packages.sign_in_with_apple.SignInWithAppleCallback" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="signinwithapple" /> <data android:path="callback" /> </intent-filter> </activity> <activity android:name=".MainActivity" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:launchMode="singleTask" android:theme="@style/LaunchTheme" android:resizeableActivity="true" android:supportsPictureInPicture="true" android:exported="true" android:windowSoftInputMode="adjustResize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="FLUTTER_NOTIFICATION_CLICK" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="www.apps.com" android:pathPrefix="/path"/> </intent-filter> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="*.apps.com" android:pathPrefix="/path"/> </intent-filter> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="apps" android:host="redirection"/> </intent-filter> </activity> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="delivery_metrics_exported_to_big_query_enabled" android:value="true" /> <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_notification" /> <meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/purple" /> <meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="@string/channel" /> <meta-data android:name="com.google.android.gms.ads.AD_MANAGER_APP" android:value="true" /> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="@string/gms_app_id" /> <meta-data android:name="firebase_performance_logcat_enabled" android:value="true" /> <!-- <activity--> <!-- android:name="com.facebook.FacebookActivity"--> <!-- android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"--> <!-- android:exported="true"--> <!-- android:label="@string/app_name" />--> <!-- <meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled"--> <!-- android:value="true"/>>--> <!-- <meta-data android:name="com.facebook.sdk.AutoInitEnabled"--> <!-- android:value="true"/>--> <meta-data android:name="flutterEmbedding" android:value="2" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/gms_version" /> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:exported="true" android:theme="@android:style/Theme.Translucent" /> <!-- <activity--> <!-- android:name="com.facebook.CustomTabActivity"--> <!-- android:exported="true">--> <!-- <intent-filter>--> <!-- <action android:name="android.intent.action.VIEW" />--> <!-- <category android:name="android.intent.category.DEFAULT" />--> <!-- <category android:name="android.intent.category.BROWSABLE" />--> <!-- <data android:scheme="@string/fb_login_protocol_scheme" />--> <!-- </intent-filter>--> <!-- </activity>--> <activity android:name="com.yalantis.ucrop.UCropActivity" android:screenOrientation="portrait" android:exported="true" android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> <receiver android:name="com.adjust.sdk.AdjustReferrerReceiver" android:exported="true" android:permission="android.permission.INSTALL_PACKAGES"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> <service android:name="com.google.firebase.components.ComponentDiscoveryService" android:directBootAware="true" android:exported="true"> <meta-data android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.crashlytics.CrashlyticsRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/> <meta-data android:name="com.google.firebase.components:com.google.firebase.messaging.FirebaseMessagingRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.installations.FirebaseInstallationsRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.perf.FirebasePerfRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.remoteconfig.RemoteConfigRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.datatransport.TransportRegistrar" android:value="com.google.firebase.components.ComponentRegistrar" /> <meta-data android:name="com.google.firebase.components:com.google.firebase.abt.component.AbtRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/> </service> <service android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery" android:exported="false"> <meta-data android:name="backend:com.google.android.datatransport.cct.CctBackendFactory" android:value="cct"/> </service> <service android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService" android:exported="false" android:permission="android.permission.BIND_JOB_SERVICE" > </service> <activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:screenOrientation="portrait" android:exported="true" android:windowSoftInputMode="stateAlwaysHidden|adjustPan" /> </application> </manifest>
flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel unknown, 3.3.2, on macOS 12.6 21G115 darwin-x64, locale en-ID) ! Flutter version 3.3.2 on channel unknown at /Users/username/Development/flutter ! Upstream repository unknown [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 13.3) [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.71.2) [✓] Connected device (3 available) [✓] HTTP Host Availability
! Doctor found issues in 2 categories.
Your AndroidManifest looks good. Could you try to use android:name="${applicationName}" in your application tag? Also it seems a custom MainApplication or a custom MainActivity that theybare locking the plugin registration
Your AndroidManifest looks good. Could you try to use android:name="${applicationName}" in your application tag? Also it seems a custom MainApplication or a custom MainActivity that theybare locking the plugin registration
Only custom MainActivity.java to configure Adjust tracker. MainApplication.java using default class.
The error still exist after changed the tag to android:name="${applicationName}"
I got error when register plugin in debug mode @darwin-morocho.
W/FlutterEngineCxnRegstry: Attempted to register plugin (io.flutter.plugins.firebase.performance.FlutterFirebasePerformancePlugin@599337d) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@7634e10).
W/FlutterEngineCxnRegstry: Attempted to register plugin (io.flutter.plugins.flutterexifrotation.FlutterExifRotationPlugin@f993272) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@7634e10).
E/GeneratedPluginRegistrant: Error registering plugin flutter_facebook_auth, app.meedu.flutter_facebook_auth.FlutterFacebookAuthPlugin
The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.
at com.facebook.internal.Validate.sdkInitialized(Validate.kt:129)
at com.facebook.login.LoginManager.<init>(LoginManager.kt:1398)
at com.facebook.login.LoginManager$Companion.getInstance(LoginManager.kt:1319)
at com.facebook.login.LoginManager.getInstance(Unknown Source:2)
at app.meedu.flutter_facebook_auth.FacebookAuth.<init>(FacebookAuth.java:27)
at app.meedu.flutter_facebook_auth.FlutterFacebookAuthPlugin.<init>(FlutterFacebookAuthPlugin.java:20)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:94)
at com.temanbumil.android.MainActivity.configureFlutterEngine(MainActivity.java:41)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:205)
at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:498)
at com.temanbumil.android.MainActivity.onCreate(MainActivity.java:139)
at android.app.Activity.performCreate(Activity.java:8051)
at android.app.Activity.performCreate(Activity.java:8031)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
This shouldn't be happen because FacebookSdk.sdkInitialize(getApplicationContext());
is deprecated. And only need <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
.
No issue on iOS, but Android error on both login & logout:
E/flutter ( 5774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method logOut on channel app.meedu/flutter_facebook_auth) E/flutter ( 5774): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7) E/flutter ( 5774): <asynchronous suspension> E/flutter ( 5774): #1 FacebookAuthPlatformImplementation.logOut (package:flutter_facebook_auth_platform_interface/src/facebook_auth_implementation.dart:87:5) E/flutter ( 5774): <asynchronous suspension>
I have followed https://facebook.meedu.app/docs/4.x.x/android. Error still remaining. AndroidManifest.xml
<queries> <package android:name="com.facebook.katana" /> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <provider android:authorities="com.facebook.orca.provider.PlatformProvider" android:exported="true" /> </queries> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
android/app/build.gradle
dependencies { . . . implementation 'com.facebook.android:facebook-login' }
@tovidd your Android Manifest is wrong. You must remove
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
also the meta tags must be inside the application tag. Please check https://github.com/darwin-morocho/flutter-facebook-auth/blob/master/examples/with_provider/android/app/src/main/AndroidManifest.xml
Also you don't need
implementation 'com.facebook.android:facebook-login'
in your build.gradle
thank you , now the dialog appears for 1 second and then gone with error ( SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]:)
No issue on iOS, but Android error on both login & logout:
E/flutter ( 5774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method logOut on channel app.meedu/flutter_facebook_auth) E/flutter ( 5774): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7) E/flutter ( 5774): <asynchronous suspension> E/flutter ( 5774): #1 FacebookAuthPlatformImplementation.logOut (package:flutter_facebook_auth_platform_interface/src/facebook_auth_implementation.dart:87:5) E/flutter ( 5774): <asynchronous suspension>
I have followed https://facebook.meedu.app/docs/4.x.x/android. Error still remaining. AndroidManifest.xml
<queries> <package android:name="com.facebook.katana" /> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <provider android:authorities="com.facebook.orca.provider.PlatformProvider" android:exported="true" /> </queries> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
android/app/build.gradle
dependencies { . . . implementation 'com.facebook.android:facebook-login' }
@tovidd your Android Manifest is wrong. You must remove
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
also the meta tags must be inside the application tag. Please check https://github.com/darwin-morocho/flutter-facebook-auth/blob/master/examples/with_provider/android/app/src/main/AndroidManifest.xml Also you don't need
implementation 'com.facebook.android:facebook-login'
in your build.gradlethank you , now the dialog appears for 1 second and then gone with error ( SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]:)
It seems that you are using a real user to sign in with facebook, if your app is in develop mode you shoud use a test user or use the user who created the facebook app.
No issue on iOS, but Android error on both login & logout:
E/flutter ( 5774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method logOut on channel app.meedu/flutter_facebook_auth) E/flutter ( 5774): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7) E/flutter ( 5774): <asynchronous suspension> E/flutter ( 5774): #1 FacebookAuthPlatformImplementation.logOut (package:flutter_facebook_auth_platform_interface/src/facebook_auth_implementation.dart:87:5) E/flutter ( 5774): <asynchronous suspension>
I have followed https://facebook.meedu.app/docs/4.x.x/android. Error still remaining. AndroidManifest.xml
<queries> <package android:name="com.facebook.katana" /> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <provider android:authorities="com.facebook.orca.provider.PlatformProvider" android:exported="true" /> </queries> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
android/app/build.gradle
dependencies { . . . implementation 'com.facebook.android:facebook-login' }
@tovidd your Android Manifest is wrong. You must remove
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
also the meta tags must be inside the application tag. Please check https://github.com/darwin-morocho/flutter-facebook-auth/blob/master/examples/with_provider/android/app/src/main/AndroidManifest.xml Also you don't need
implementation 'com.facebook.android:facebook-login'
in your build.gradlethank you , now the dialog appears for 1 second and then gone with error ( SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]:)
It seems that you are using a real user to sign in with facebook, if your app is in develop mode you shoud use a test user or use the user who created the facebook app.
yeah i checked that, but its working fine with test users on LoginBehavior.webOnly, but on other dehaviors the dialog is disappearing after one second, what should i do now, i appreciate your help thank you very much.
No issue on iOS, but Android error on both login & logout:
E/flutter ( 5774): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method logOut on channel app.meedu/flutter_facebook_auth) E/flutter ( 5774): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:294:7) E/flutter ( 5774): <asynchronous suspension> E/flutter ( 5774): #1 FacebookAuthPlatformImplementation.logOut (package:flutter_facebook_auth_platform_interface/src/facebook_auth_implementation.dart:87:5) E/flutter ( 5774): <asynchronous suspension>
I have followed https://facebook.meedu.app/docs/4.x.x/android. Error still remaining. AndroidManifest.xml
<queries> <package android:name="com.facebook.katana" /> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" android:exported="true" /> <provider android:authorities="com.facebook.orca.provider.PlatformProvider" android:exported="true" /> </queries> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token" /> <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
android/app/build.gradle
dependencies { . . . implementation 'com.facebook.android:facebook-login' }
@tovidd your Android Manifest is wrong. You must remove
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:exported="true" android:label="@string/app_name" /> <activity android:name="com.facebook.CustomTabActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="@string/fb_login_protocol_scheme" /> </intent-filter> </activity>
also the meta tags must be inside the application tag. Please check https://github.com/darwin-morocho/flutter-facebook-auth/blob/master/examples/with_provider/android/app/src/main/AndroidManifest.xml Also you don't need
implementation 'com.facebook.android:facebook-login'
in your build.gradlethank you , now the dialog appears for 1 second and then gone with error ( SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]:)
It seems that you are using a real user to sign in with facebook, if your app is in develop mode you shoud use a test user or use the user who created the facebook app. https://stackoverflow.com/questions/41861564/server-error-code-1675030-message-error-performing-query
yeah i checked that, but its working fine with test users on LoginBehavior.webOnly, but on other dehaviors the dialog is disappearing after one second, what should i do now, i appreciate your help thank you very much.
The main problem is that if you are trying to login with a real user your app in the facebook developer console must be in production mode or the user that your are using must be the facebook app creator
ok thank you
Very helpful.
Try once to run cd android && ./gradlew clean
OR cd android && gradlew clean
in your flutter/android directory. AND THEN RUN YOUR FLUTTER PROJECT AGAIN. I have tried this and it fixed my issue quickly.
What version are you using?
^5.0.0-dev.4
What OS and version are you using to local deploy your application?
windows 10
What platforms are you seeing the problem on?
Android
pubspec.yaml
Describe the Bug
i configure every as per your documentation but still no implementation found
Expected Behavior
facebook successfull login and info
i did everything flutter clean keyhash new config strings.xml
To Reproduce
loginFb() async {
}
Relevant log output
flutter doctor -v
Info.plist (iOS)
No response
Podfile (iOS)
No response
AndroidManifest.xml
No response
MainActivity.java
No response
MainActivity.kt
No response
index.html
No response
Info.plist (macOS)
No response