0

I am having an app which is using Facebook Authentication using Firebase. Earlier we were using the app in development mode but after we released the app, we also made the app public from Faceook developers console. In the screenshot below the AppReview section is shown which shows that the app is public and the approved permissions.

Facebook AppReview

Now, when I am using the app and logging in using Facebook, I am getting the following error: SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]: null

which as far as I clould understand happens when app is in development mode. The links that I have checked include this: SERVER_ERROR: [code] 1675030 [message]: Error performing query. I also have the following meta tag in AndroidManifest.xml file

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

Now, I don't understand that even when our app is public and the Facebook developers console also show status as Live, why are we getting this error? What are we doing wrong?

Also, I am doubtful about the fact that when we shifted from development to release mode in Facebook, I didn't have to change any keys in Firebase. Can this be something or is there any such thing required?

Kindly help. Thanks!

Yesha
  • 648
  • 1
  • 7
  • 29
  • please check logcat for error – R7G Sep 24 '18 at 08:42
  • I already did. The error that I have mentioned is what I am getting – Yesha Sep 24 '18 at 08:44
  • does it contain error like this Invalid key hash. The key hash sL1***************VY= does not match any stor – R7G Sep 24 '18 at 08:50
  • No. I am only getting this: SERVER_ERROR: [code] 1675030 [message]: Error performing query. [extra]: null – Yesha Sep 24 '18 at 08:51
  • try this – R7G Sep 24 '18 at 08:55
  • I was doing something wrong. I updated this line mFacebookSignInButton.setReadPermissions("email", "public_profile"); to mFacebookSignInButton.setReadPermissions("email", "public_profile", "user_friends"); and it solves the problem but now I am getting the error which you mentioned in your previous comment. The invalid hash issue – Yesha Sep 24 '18 at 09:00

1 Answers1

2

enter image description here

Now add your hash from logcat error like this.

always remember that the hash key for debug and live will be different.

Community
  • 1
  • 1
R7G
  • 1,000
  • 1
  • 10
  • 15
  • I was not able to get any hash in the Logcat. Maybe I was debugging at the wrong place. So, the error page that I was geting in my app, it had a hash and I added that hash in the hash keys in developers console and it worked (as mentioned in https://stackoverflow.com/questions/23674131/android-facebook-integration-invalid-key-hash by Arpit). If possible, can you please tell me, how I can get the hash key in logcat? Basically where should I be debugging it? I am not getting it in registerCallback method or activityResult method. Anyways, thanks for help :) – Yesha Sep 24 '18 at 09:31
  • you can debug at the callback of facebook in below method @Override public void onError(FacebookException error) { Log.e("FaceBookError", error.toString().trim());} also you can use Log.d instead of Log.e. – R7G Sep 24 '18 at 09:36
  • Exactly that is what I was doing but I'll try again. Maybe I missed something. Thanks for helping :) – Yesha Sep 24 '18 at 09:38
  • Welcome. I always prefer Log.e while app is in debugging ,because it's priority is high priority and as my experience Log.d or using debugger skip some thread sometimes. – R7G Sep 24 '18 at 09:41
  • I am facing the issue again. With every new account that I am testing in release mode, I am getting a new hash and it is telling me that hash does not match. I don't understand the issue – Yesha Sep 25 '18 at 12:59
  • keytool -exportcert -alias -keystore | openssl sha1 -binary | openssl base64 – R7G Sep 25 '18 at 16:02
  • Use above command to get the release hash. For more details https://developers.facebook.com/docs/android/getting-started – R7G Sep 25 '18 at 16:03
  • I am again facing the same problem. When I try on different phones, it gives me different hashes to match. How many should I actually add and how would I know? – Yesha Sep 28 '18 at 05:54
  • Also, the keytool command gave a different hash 2 days ago and different now. I don't understand the problem – Yesha Sep 28 '18 at 05:56
  • this should not happen actually there is mainly two key hash one is for release and other is while you getting it on debug. also if you try to create the build from other PC this both key will be different every time. please try 1 get the key hash by using command prompt in administration mode. 2 create build from only Single PC . – R7G Sep 28 '18 at 06:16
  • I am using only 1 PC to make the keys. One thing that I just did was copy my app-signing key (SHA1) from play store and generated Base64 string for it. So, I am able to solve the issue for now. But I am not understading the way actually. I am just doing different hit and trials. – Yesha Sep 28 '18 at 06:32
  • Which build giving you problem release or debug. – R7G Sep 28 '18 at 06:36
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/180916/discussion-between-yesha-and-r7g). – Yesha Sep 28 '18 at 06:37