Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Debug Keystore missing in Facebook Unity SDK

Discussion in 'Editor & General Support' started by jmansa, Nov 18, 2016.

  1. jmansa

    jmansa

    Joined:
    Apr 13, 2012
    Posts:
    75
    I am going crazy,

    I am about to build an update for my app, but when trying to build I get an error telling me that I am missing the debug keystore for facebook?!?

    I am using Unity 5.4.2 and the newest Facebook SDK 7.9 for Unity on a Mac.

    I have seen that others has run into this issue earlier and they found a fix by changing the path in the FacebookAndroidUtil.cs file:

    http://answers.unity3d.com/questions/596752/android-debug-keystore-file-is-missing.html

    But... In the FacebookSDK 7.9 this file doesn't exists?!?!?

    Does anyone have an idea how to solve this? I am really hoping for help in this matter and thanks in advance :)
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
  3. PNUMIA-Rob

    PNUMIA-Rob

    Joined:
    Jan 7, 2015
    Posts:
    33
    @jmansa

    If you are using Windows 7+ you should be able to find the debug.keystore in %userprofile%\.android\

    But as you said you are using Mac so that doesn't help all that much, but it does show that the debug.keystore is in the AndroidSDK settings folder, so that may be helpful to you.

    Hope it does help, I know this was a PITA for us when we first ran across it.
     
  4. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    67
    Can you please tell me how to do this in detail please.
     
  5. mbrindic

    mbrindic

    Joined:
    Mar 13, 2014
    Posts:
    16
    Hi @MaxKMadiath, the error is about debug.keystore file, because file is missing.
    If you are using Android Studio, you need to create blank project which will create debug.keystore file in %userprofile%\.android\
     
  6. Legacycz

    Legacycz

    Joined:
    Mar 25, 2015
    Posts:
    6
    Thanks, this did the trick on Mac OS High Sierra with Unity 2018.2.2 and Facebook SDK 7.11.1.
     
    Metamulti likes this.
  7. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    Hi Guys! So I'm at a loss, I've been banging my head against the wall for the last day and a half and can't get past the "Your android debug keystore file is missing" part fbID.jpg

    I'm using Win10, Unity 2020.1.3, facebook-unity-sdk-11.0.0

    I downloaded openSSL and added it to the Paths system variable C:\Program Files\OpenSSL-Win64

    I've used Unity to create new keystores, calling them "debug.keystore", with the alias "androiddebugkey" and password "android" and placed them in every place I could imagine, including
    C:\Users\user\.android
    C:\Program Files\Java\jdk1.8.0202\bin\
    C:\Program Files\Java\jdk1.8.0202\bin\.android\

    but the error doesn't go away

    When I build unity after creating the androidManifest using facebook's "Regenerate Android Manifest" button, the app crashes instantly when launching with the error

    Code (CSharp):
    1. java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on
    Isn't there some simple way to get access to facebook's features? This seems like it's supposed to be simple but it feels like I'm solving some riddle from ancient egypt or Myst(Tm)
     
  8. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,121
    After more trial and error and searching I tried this:

    Code (CSharp):
    1. keytool -exportcert -alias androiddebugkey -keystore “C:\Users\user\.android\debug.keystore| "C:\OpenSSL-Win64\bin\openssl.exe" sha1 -binary | "C:\OpenSSL-Win64\bin\openssl.exe" base64
    and I got the "hash" thing, but still getting the same error as before that the keystore ain't been found keystoreNotFound.jpg
     
  9. sohaib_qadri

    sohaib_qadri

    Joined:
    May 19, 2014
    Posts:
    8
    Hi, were you able to fix this issue?
    Can you please share the solution?
     
  10. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    106
    for anyone who here because of top result from Google

    The easiest solution to generate a debug.keystore is to create an empty unity android project and build an APK with development build, then the Android SDK will auto generate a Debug Keystore
     
  11. VGMFR

    VGMFR

    Joined:
    Nov 22, 2014
    Posts:
    8
    Thank you for this! The best answer to avoid struggling with path depending on your OS / OS version.
     
  12. daibutsu

    daibutsu

    Joined:
    Nov 28, 2017
    Posts:
    42
    In case you're still looking for an answer and building clean project is not a solution:

    1. Go to your folder where debug key should be stored C:\Users\userName\.android\
    2. Open CMD as Administrator
    3. In CMD keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

    You need the keytool to be installed first.

    It's the answer from the other resource, but not usre if it is allowed to paste links here.