Java SERVER_ERROR: [code] 1675030 [message]: 执行查询时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41861564/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 23:44:21  来源:igfitidea点击:

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

javaandroidfacebookfacebook-login

提问by Daniel ORTIZ

I am using Facebook login in android.
Code:

我在 android 中使用 Facebook 登录。
代码:

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)

SERVER_ERROR: [code] 1675030 [message]: 执行查询时出错。[额外]:执行操作“ProxyAuthAppLoginQuery”时出错:在 Query.proxy_auth_app_login:无法解析字段。带系统错误:
在 com.facebook.login.LoginManager.onActivityResult(LoginManager.java:190) W/System.err:在 com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:159) W/System.err:在 com。 facebook.internal.CallbackManagerImpl.onActivityResult(CallbackManagerImpl.java:82) W/System.err:在 com.procibernetica.moca.MainActivity.onActivityResult(MainActivity.java:130) W/System.err:在 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:在android.os.Handler.dispatchMessage(Handler.java:102)W/System.err:
在 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"/>

采纳答案by Daniel ORTIZ

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

我找到了解决方案,当您的应用程序中没有评估用户时,这会附加。

Enter in your panel App Select Rol

在您的面板中输入应用程序选择 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

在此处输入图片说明

回答by AMAN SINGH

@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 linkand select your App. Then you can do two things here. From Rolestab you can allow login to your friends only or else select the App Reviewand make your app publicthen any one can able to logged in.

@Danial 回答正确,但我想在其中添加更多内容。此类错误仅在您正在开发的应用程序中出现。点击此链接并选择您的应用程序。那么你可以在这里做两件事。在角色选项卡中,您可以只允许您的朋友登录,或者选择App Review并让您的app public任何人都可以登录。

回答by Voy

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"/>

<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.

正在解析为正确的 Facebook App ID,特别是如果您使用 gradle build 动态指定它,而不是在 strings.xml 中对其进行硬编码。

回答by CacheMeOutside

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

我遇到了类似的问题,因为 Firebase UI 指定了android:value. 我是这样解决的:

    <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>
...

回答by Muddassir Ahmed

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

除了其他答案,我还请检查用于登录的帐户的电子邮件是否已验证。

回答by aloha

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

facebook 上的文档不正确。我必须添加所有 3 个默认权限才能使其工作。

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

回答by S.D

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

在您的 strings.xml 中添加一个字符串资源“facebook_application_id”

replace APP_ID with your facebook app id

将 APP_ID 替换为您的 Facebook 应用 ID

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

回答by Ahmad El-Melegy

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.

获取您放入 facebook 配置中的密钥哈希。

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

它会要求您输入密码,起初我没有设置任何密码,所以当我输入android密码时发生了问题。有效 !

回答by Thanh v?

Live developer modePlease 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)

实时开发者模式请检查开发者模式的状态。必须是“活”。首先,您需要为自己的 facebook 项目添加隐私 url,您要测试 facebook 登录或……然后启用开发人员模式(打开)

回答by Ivan

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.

在我的情况下,生成的哈希键是错误的,因为我使用了错误的 OpenSSL。我使用的是 openssl-0.9.8k_X64.zip 而不是 openssl-0.9.8e_X64.zip 这给我生成了一个错误的哈希键,导致了这个问题,希望它可以帮助我失去了 8 个小时试图解决这个问题的人。