SERVER_ERROR: [code] 1675030 [message]: Error performing query

I am using Facebook login in android.
Code:

callbackManager = CallbackManager.Factory.create();
LoginButton loginButton = (LoginButton) this.findViewById(R.id.login_button);
loginButton.setReadPermissions("email", "public_profile");
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
// App code
Log.println(Log.ASSERT, "FB", "inicio session ");
}


@Override
public void onCancel() {
Log.println(Log.ASSERT, "FB", "OP NO completada");
// App code
}


@Override
public void onError(FacebookException exception) {
Log.println(Log.ASSERT, "FB", " Errro de sesion ");
exception.printStackTrace();
// App code
}
});

but always getting the following error:

SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]: Errors while executing operation "ProxyAuthAppLoginQuery": At Query.proxy_auth_app_login: Failed to resolve field. W/System.err:
at com.facebook.login.LoginManager.onActivityResult(LoginManager.java:190) W/System.err: at com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:159) W/System.err: at com.facebook.internal.CallbackManagerImpl.onActivityResult(CallbackManagerImpl.java:82) W/System.err: at com.procibernetica.moca.MainActivity.onActivityResult(MainActivity.java:130) W/System.err: at android.app.Activity.dispatchActivityResult(Activity.java:5423) W/System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:3401) W/System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3448) W/System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:138) W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284) W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102) W/System.err:
at android.os.Looper.loop(Looper.java:149) W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5061) W/System.err: at java.lang.reflect.Method.invokeNative(Native Method) W/System.err: at java.lang.reflect.Method.invoke(Method.java:515) W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787) W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603) W/System.err: at dalvik.system.NativeStart.main(Native Method)

I've added the folowing permissions.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
107114 次浏览

I find the solution, this happends when you don't have evaluate users in your app .

Enter in your panel App Select Rol

enter image description here

And add test users , when your try to login with test users , the application executes without fails

enter image description here

@Danial answer correct, But I want to add some more in that. This types of error comes only when app your in under development. Follow this link and select your App. Then you can do two things here. From Roles tab you can allow login to your friends only or else select the App Review and make your app public then any one can able to logged in.

This error is returned in other situations too - even when your app is public or you're listed as a tester.

Double check that your

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

is resolving to a correct Facebook App ID, especially if you dynamically specify it using gradle build, rather than hard coding it in strings.xml.

I was getting a similar issue because Firebase UI was specifying the android:value. This is how I solved it:

    <application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme.Base">


<meta-data
android:name="com.facebook.sdk.ApplicationId"
tools:replace="android:value"
android:value="@string/facebook_app_id" />
<acitivity
...
</activity>
...

I addition to the other answers please also check that the email of the account being used to log in is verified.

Documentation on facebook is not correct. I had to add all 3 default permissions to make it work.

loginButton.setReadPermissions("email", "public_profile", "user_friends");

Add a string resource "facebook_application_id" in your strings.xml

replace APP_ID with your facebook app id

<string name="facebook_application_id" translatable="false">APP_ID</string>

All of the above answers didn't help me, what did was when you use this command

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

to get the Key Hashes you put in facebook configurations.

it will ask you for a password, at first I didn't set any, so the issue happened, when I entered android as the password. it worked !

Live developer mode Please check status of Developer mode. It must be "Live". Firstly, you need add privacy url for own facebook project which you want to test facebook login or sth .... Then enable developer mode (Turn on)

In my case the generated hash key was wrong because i was using wrong OpenSSL. I was using openssl-0.9.8k_X64.zip instead of openssl-0.9.8e_X64.zip and this generated me a wrong hash key which caused this problem hope it helps some one i lost like 8 hours trying to figure this out.

In my case problem was wrong generated Key Hash which need to submit on facebook app page Solution found on this article https://developers.facebook.com/docs/facebook-login/android/advanced

Manually Check Key Hash - You can print out the key hash sent to Facebook and use that value in App Dashboard. Make this change to onCreate() in your main activity:

try
{
PackageInfo info = getPackageManager().getPackageInfo(
"com.facebook.samples.loginhowto",
PackageManager.GET_SIGNATURES);


for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {




} catch (NoSuchAlgorithmException e) {


}

Issue Log: SERVER_ERROR: [code] 1675030 [message]: Error performing query

And Accurate Solution for this Specific issue (Error performing query)
is answered by @aloha is by updating the query for access.
loginButton.setReadPermissions("email", "public_profile", "user_friends");

  1. Find where you facebook login button was called.
  2. Then set the ReadPermission for the button as "email", "public_profile", "user_friends"

image Reference

enter image description here

Issue Log: App Not Setup. This app is still in development mode. and you dont have access to it. register test user or ask an app admin for permission

  1. 应用程序未处于实时模式
  2. You are not listed as admin or a tester in
    https://developers.facebook.com/app/yourapp
  3. Your App Hashkey are not set. if Facebook app cant be on Live Mode you need a hashkey to test it. because the app are not yet Live. Facebook wont allow an access.

HOW TO CHANGE TO LIVE MODE
1. go to : https://developers.facebook.com
2. select your app on "My Apps" List
3. toggle the switch from OFF to ON

enter image description hereenter image description here

HOW TO ADD AS TEST OR ADMIN
1. go to : https://developers.facebook.com
2. select your app on "My Apps" List
3. go to : Roles > Roles > Press Add for example administratorenter image description here 4. Search your new admin/tester Facebook account.
enter image description here 5. admin must enter facebook password to confirm.then submit enter image description here
the new admin must go to developer.facebook page and accept the request
6. go to : https://developers.facebook.com

7. Profile > Requests > Confirm
enter image description here List item 8. Congratulation you have been assign as new Admin

HOW TO GET AND SET HASHKEY FOR DEVELOPMENT
as Refer to Facebook Login Documentation
https://developers.facebook.com/docs/android/getting-started/#create_hash
The most preferable solution by me is by code ( Troubleshooting Sample Apps )
it will print out the hash key. you can update it on
https://developers.facebook.com/apps/yourFacebookappID/settings/basic/
on Android > Key Hashes section

a step by step process on how to get the hashKey.

  1. Firstly Add the code to any oncreate method

    enter image description here

  2. Run The app and Search the KeyHash at Logcat

    enter image description here

step by step process on how Update on Facebook Developer.

  1. Open Facebook Developer Page. You need access as to update the Facebook Developer page: https://developers.facebook.com

  2. Follow the step as follow.

    enter image description here

I just added this line and it worked for me.

facebookLogin.setReadPermissions("email", "public_profile", "user_friends");

I dont know if this will help but from personal experience when you generate the development key you will need to type a password which is "android" and make sure you add the = after the code when you are adding it in the field on developers facebook domain

I just fixed it by going to https://developers.facebook.com/apps/ and select my app then

switch to live mode

"from top left beside app ID"

try this, locate your app-debug.apk in android build folder

keytool -printcert -jarfile app-debug.apk | openssl sha1 -binary | openssl base64

paste it in facebook key hashes.

you need to see if the user that connect in the phone facebook app is a user that have test or developer permissions in the facebook developers on the app page.

for Flutter this was the fix

final LoginResult result = await FacebookAuth.instance.login(
permissions: [
'public_profile',
'email',
'pages_show_list',
'pages_messaging',
'pages_manage_metadata'
],
);