Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

invalid key hash the key hash does not match any stored key hash

I have created a app on facebook. I have added keyhash properly and app was running fine but when i came today and try to run it again it gives me this error. enter image description here

This is second time it happens. Previsouly when i get this error i removed the app and add it again and it starts working again and offcourse i can't do it again and again.

One more thing, the key hash he mentioned in the error is not the same i added in the app and if i go to app setting the key hash is correct there.

like image 404
umerk44 Avatar asked Jun 20 '14 07:06

umerk44


2 Answers

There is no need to delete app from Facebook developer website again and again. What all you need is to go your terminal(Mac or Linux) and type:

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

And Window's user open cmd and type:

keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl
base64

After this you will be asked for "Enter keystore password:", for this remember enter only android .Now use this key hash at Facebook developer website(Note: this key hash will be same as key hash you were getting in error). Mostly people are asking to delete app from Facebook developer website and again make new one,but believe me this is actually what you have to do.

like image 69
Rishabh Chandel Avatar answered Oct 21 '22 10:10

Rishabh Chandel


Use one of this versions: openssl-0.9.8e _X64.zip

You should not use the openssl-0.9.8k_X64.zip.

difference is k and e

and generate key again using keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64 on cmd

like image 41
Keyul Avatar answered Oct 21 '22 10:10

Keyul