- Home /
ANDROID DEBUG KEYSTORE FILE IS MISSING
HEY developers i integrated facebook sdk with unity4. In facebook setting package name and class name shown but Debug Android Key Hash is not showing and also a warning message appear that your Android Debug Keystore file is missing. i tried to create new key but the message still exist. FACEBOOK SDK VERSION=4.3.6 UNITY4 please help me i am stuck thanx in advance
Answer by leo.flaherty · Dec 18, 2013 at 02:33 PM
UPDATE: I got it. If your %HOMEPATH% environment variable is, let's say, on your C: drive but your Unity project is on another drive (in my case the S: drive, which is where all company projects get put), then when the Facebook SDK calls System.IO.File.Exists(DebugKeyStorePath), DebugKeyStorePath is wrong. That's because DebugKeyStorePath is looking in
System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore"
but HOMEPATH only returns
\Users\MyUserName
and not
C:\Users\MyUserName
What I did to fix the problem, as a workaround, was to go to the FacebookAndroidUtil.cs file, and on line 62 change the code from
System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" :
to
System.Environment.GetEnvironmentVariable("HOMEDRIVE") + System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" :
which now works fine. Hopefully this works for you too.
thanx dude to concider it. at this momnt i am not able to try it because of some problem when i will free i will definitrly do it and reply you a feedback . thanx
or you just could add the right path to the system variables...
The thing is, that IS the right path. By default, HO$$anonymous$$EPATH gets set to omit the drive letter. Not sure why. However I'm always leery of messing with paths if I can avoid it, as you never know how it'll effect some random code in some obscure corner of your machine. What if there's some code somewhere else that also adds a "C:" to the start? C:C:\Users\$$anonymous$$yUserName won't work. With that in $$anonymous$$d, I've looked into it and an even better way of handling it is to change line 62 to:
System.Environment.GetEnvironmentVariable("HO$$anonymous$$EDRIVE") + System.Environment.GetEnvironmentVariable("HO$$anonymous$$EPATH") + @"\.android\debug.keystore" :
hey i add "c:" but then it show "OpenSSL not found. $$anonymous$$ake sure that OpenSSL is installed, and that it is in your path"
You haven't said whether you actually have OpenSSL installed and in your path or not
Your answer
![](https://koobas.hobune.stream/wayback/20220613124146im_/https://answers.unity.com/themes/thub/images/avi.jpg)