Closed zatkontact closed 1 year ago
@zatkontact your configuration seems right. make sure that you have the correct values in your strings.xml
(facebook_app_id, facebook_client_token) and also after install and configure this plugin you must stop your project if it is running. Next if the problem persists try with flutter clean
@zatkontact your configuration seems right. make sure that you have the correct values in your
strings.xml
(facebook_app_id, facebook_client_token) and also after install and configure this plugin you must stop your project if it is running. Next if the problem persists try withflutter clean
@darwin-morocho I have tried that already. After flutter clean, tried with deleting app and re-install as well. still it is the same issue. Have been trying the whole day but no luck.
Am I missing any steps for configuring the plugin. Are there any additional steps that needs to be done within android studio except the manifest file?
@zatkontact MissingPluginException means that all plugins could not be loaded due to an error during the app initialization, in this case you must run the app in android studio and use the LOGCAT to watch the specific error
I'm having the same issue. This isn't related to this other issue I'm having is it? https://github.com/firebase/flutterfire/issues/8091
I'm having the same issue. This isn't related to this other issue I'm having is it? firebase/flutterfire#8091
@Gimposai Are you using flutterfire_ui with facebook authentication?
Are you using flutterfire_ui with facebook authentication?
Not that I'm aware of (Don't see flutterfire_ui in my pubspec.yaml).
@Gimposai please add your AndroidManifest.xml, strings.xml (hide your keys and token) and your MainActivity
I'm having the same issue. This isn't related to this other issue I'm having is it? firebase/flutterfire#8091
@Gimposai Are you using flutterfire_ui with facebook authentication?
@darwin-morocho I am using flutterfire with facebook authentication.
I'm having the same issue. This isn't related to this other issue I'm having is it? firebase/flutterfire#8091
@Gimposai Are you using flutterfire_ui with facebook authentication?
@darwin-morocho I am using flutterfire with facebook authentication.
@zatkontact flutterfire_ui
uses flutter_facebook_auth:4.0.1
and you need to use the last version of this plugin so you can override the dependency using dependency_overrides
dependency_overrides:
flutter_facebook_auth: 4.3.4+2
the problem is that you are using a facebook configuration for the last facebook sdk on Android and flutter_facebook_auth: ^4.0.1 uses the old configuration
I'm having the same issue. This isn't related to this other issue I'm having is it? firebase/flutterfire#8091
@Gimposai Are you using flutterfire_ui with facebook authentication?
@darwin-morocho I am using flutterfire with facebook authentication.
@zatkontact
flutterfire_ui
usesflutter_facebook_auth:4.0.1
and you need to use the last version of this plugin so you can override the dependency usingdependency_overrides
dependency_overrides: flutter_facebook_auth: 4.3.4+2
the problem is that you are using a facebook configuration for the last facebook sdk on Android and flutter_facebook_auth: ^4.0.1 uses the old configuration
Or you can use the old configuration https://facebook.meedu.app/docs/3.x.x/android (DON'T forget to add the facebook queries in your AndroidManifest)
my bad. I am using flutterfire packages such as firebase_auth, firebase_messaging but not flutterfire ui. extremely sorry for the wrong information. however, is it going to be a good solution to use version 4.0.1 of flutter_facebook_auth and go back to old configuration? Or it should work with these firebase packages?
my bad. I am using flutterfire packages such as firebase_auth, firebase_messaging but not flutterfire ui. extremely sorry for the wrong information. however, is it going to be a good solution to use version 4.0.1 of flutter_facebook_auth and go back to old configuration? Or it should work with these firebase packages?
I don't think that. My recommendation is run your project in android studio and check the errors in the logcat could be that there is some plugin or dependency locking the plugins initialization
I apologize for formatting and the chaos (new to github and app development). Couldn't get it to look nice and neat like zat's. I honestly don't know what these files really do and only touch them when instructed...hope I hid all the values I was suppose to!
` < manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.Eventings">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="${applicationName}"
android:label="Eventings"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="###############################"/>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
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>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
< /manifest> `
` < ?xml version="1.0" encoding="utf-8"?> < resources> < string name="app_name">Eventings
<!-- Replace "000000000000" with your Facebook App ID here. -->
<string name="facebook_app_id">##############</string>
<!--
Replace "000000000000" with your Facebook App ID here.
**NOTE**: The scheme needs to start with `fb` and then your ID.
-->
<string name="fb_login_protocol_scheme">fb###############</string>
< /resources> `
` package com.example.Eventings
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() { } `
I apologize for formatting and the chaos (new to github and app development). Couldn't get it to look nice and neat like zat's. I honestly don't know what these files really do and only touch them when instructed...hope I hid all the values I was suppose to!
AndroidManifest.xml
` < manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.Eventings">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <!-- io.flutter.app.FlutterApplication is an android.app.Application that calls FlutterMain.startInitialization(this); in its onCreate method. In most cases you can leave this as-is, but you if you want to provide additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> <application android:name="${applicationName}" android:label="Eventings" android:icon="@mipmap/ic_launcher"> <meta-data android:name="com.google.android.geo.API_KEY" android:value="###############################"/> <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <!-- Specifies an Android theme to apply to this Activity as soon as the Android process has started. This theme is visible to the user while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. --> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <!-- Displays an Android View that continues showing the launch screen Drawable until Flutter paints its first frame, then this splash screen fades out. A splash screen is useful to avoid any visual gap between the end of Android's launch screen and the painting of Flutter's first frame. --> <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> <activity android:name="com.facebook.FacebookActivity" android:configChanges= "keyboard|keyboardHidden|screenLayout|screenSize|orientation" 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> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> </application>
< /manifest> `
strings.xml
` < ?xml version="1.0" encoding="utf-8"?> < resources> < string name="app_name">Eventings
<!-- Replace "000000000000" with your Facebook App ID here. --> <string name="facebook_app_id">##############</string> <!-- Replace "000000000000" with your Facebook App ID here. **NOTE**: The scheme needs to start with `fb` and then your ID. --> <string name="fb_login_protocol_scheme">fb###############</string>
< /resources> `
MainActivity.kt
` package com.example.Eventings
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() { } `
@Gimposai if you are using the last version of this plugin CustomTabActivity and FacebookActivity are not needed any more and also you must define your client token and the facebook queries
@darwin-morocho Facebook login is working for me now! Thank you so much!
@darwin-morocho Facebook login is working for me now! Thank you so much!
What did you change to solve this problem? I've been struggling with this bug for 3 days now.
Help, how to solve this error?
My MainActivity.kt
package com.sprestay.fdbks import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() {}
Manifest file:
`
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
</queries>
<application android:label="fb3" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2" />
</application>
`
`<?xml version="1.0" encoding="utf-8"?>
`
Help, how to solve this error?
My MainActivity.kt
package com.sprestay.fdbks import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() {}
Manifest file:
`
<queries> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> </queries> <application android:label="fb3" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <!-- Specifies an Android theme to apply to this Activity as soon as the Android process has started. This theme is visible to the user while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. --> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <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> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> </application>
`
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="facebook_app_id">id</string> <string name="facebook_client_token">token</string> <string name="fb_login_protocol_scheme">fbid</string> </resources>
check this example and compare with your configuration https://github.com/darwin-morocho/flutter-facebook-auth/tree/master/examples/with_provider
Help, how to solve this error? My MainActivity.kt
package com.sprestay.fdbks import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() {}
Manifest file: `<queries> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> </queries> <application android:label="fb3" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <!-- Specifies an Android theme to apply to this Activity as soon as the Android process has started. This theme is visible to the user while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. --> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <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> <!-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> </application>
<?xml version="1.0" encoding="utf-8"?>
` id token fbid check this example and compare with your configuration https://github.com/darwin-morocho/flutter-facebook-auth/tree/master/examples/with_provider
I did it, but my configuration same with this example
@han-tm your androidmanifest is wrong. the facebook meta tags are inside the MainActivity tag and they must be in the application tag
<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" />
must be before
</application>
What version are you using?
flutter_facebook_auth:4.3.4+2
What OS and version are you using to local deploy your application?
macOS Monterey 12.4
What platforms are you seeing the problem on?
Android
Describe the Bug
I have recently upgraded to flutter 3.0.1 and upgraded this package to version 4.3.4+2. I followed the documentation via https://facebook.meedu.app and setup everything for ios and android. iOS is working fine but on android I am facing the MissingPluginException issue. I have tried many times today but haven't found any solution to this.
Expected Behavior
Should be able to login on android using this plugin.
To Reproduce
final LoginResult result = await FacebookAuth.instance.login();
Relevant log output
No response
flutter doctor -v
Info.plist (iOS)
No response
Podfile (iOS)
No response
AndroidManifest.xml
MainActivity.java
No response
MainActivity.kt
index.html
No response
Info.plist (macOS)
No response