Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keystore file '/Project-Folder/android/app/debug.keystore' not found for signing config 'debug' in react-native 0.60 #25629

Closed
harikanammi opened this issue Jul 13, 2019 · 31 comments
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@harikanammi
Copy link

I created a sample application with react-native version 0.60. I am trying to run application in android. But i am getting this error Keystore file '/Project-Folder/android/app/debug.keystore' not found for signing config 'debug' . I don't know how to resolve this error. Please give any suggestions for this issue.

React Native version:

"react": "16.8.6",
"react-native": "0.60.0"

Steps To Reproduce

  1. Trying to run application in android.
  2. But getting Keystore file error in android.
@react-native-bot react-native-bot added the Platform: Android Android applications. label Jul 13, 2019
@kiranjd
Copy link

kiranjd commented Jul 14, 2019

Which commands are you using?

@cmorbitzer
Copy link

You can generate the debug keystore by running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

@harikanammi
Copy link
Author

hi @kiranjd and @cmorbitzer thank you for your response. I missed the file called debug.keystore. So i placed this debug.keystore file in my project folder it solves the error i.e., Keystore file '/Project-Folder/android/app/debug.keystore' not found for signing config 'debug'.

@jeancabral
Copy link

You can generate the debug keystore by running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

Works fine to me Thx

@bondehagen
Copy link
Contributor

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

@priyajainSE
Copy link

@bondehagen Where are we supposed to store this file in our react native project?

@JohnnyFl
Copy link

JohnnyFl commented Jul 24, 2019

@priyajainSE, put debug.keystore in the android/app/ directory

bondehagen added a commit to bondehagen/react-native that referenced this issue Jul 24, 2019
Fixes facebook#25629 that happened after v60 upgrade.
facebook-github-bot pushed a commit that referenced this issue Jul 25, 2019
Summary:
Fixes #25629 that happened after v60 upgrade when using the diff tool https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.4

When following the diff for upgrading to react native 60. The debug.keystore is missing. It's added in the repository but ignored in the .gitignore, so it does not show. This adds an exception for this file.

## Changelog

[Android] [Fixed] - Add exception in .gitignore for `debug.keystore` to the android template.
Pull Request resolved: #25807

Test Plan: Create a new project from template and check that debug.keystore will be checked in when committing.

Reviewed By: cpojer

Differential Revision: D16462897

Pulled By: mdvacca

fbshipit-source-id: 18c0e8aee7f5cf8ed0d3544f88dc1621ad17f30f
@tuantvk
Copy link

tuantvk commented Aug 12, 2019

Ubuntu:

Running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

In folder /home/ - Ctrl + H show all file hidden

Copy file debug.keystore in /home/.android/ to android/app/ directory your project, and rebuild

@zfing
Copy link

zfing commented Aug 15, 2019

您可以通过在android/app/目录中运行此命令来生成调试密钥库:keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

对我来说工作正常Thx

thanks a lot !

@rizwanellahi
Copy link

@cmorbitzer @bondehagen, Resolved my issue to place debug.keystore file inside anadroid/app directory. Wait... *.keystore extension files are ignored in Github versioning. It means whenever we clone the project then we have to generate or place debug.keystore file manually?

React Native version:

"react": "16.8.6",
"react-native": "0.60.5"

@LoicMahieu
Copy link

@Rizwanilahi Yes I think. Personally I added !android/app/debug.keystore in the .gitignore to avoid that.

@wagner94
Copy link

wagner94 commented Sep 2, 2019

wow worked for me :)
First I added the environment variables and then I run on prompt keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 in android/app directory

@TakaKeiji
Copy link

You can generate the debug keystore by running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

This worked for me too :)

@nicollaseng
Copy link

@cmorbitzer works like a charm thks

@shadyueh
Copy link

shadyueh commented Oct 1, 2019

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

Saving lives huh? Thanx

lukevp added a commit to lukevp/DataWedgeReactNative that referenced this issue Oct 7, 2019
- Check in debug.keystore file from Facebook repo
- Based upon documentaiton at: facebook/react-native#25629
@dereknahman
Copy link

I followed the instructions above and got this error

java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key androiddebugkey from store "/Users/kirstysimmonds/com.piavita-vet.android-copy/android/app/debug.keystore": Invalid keystore format

Does anyone know what I should do, please?

@mohaneduestc
Copy link

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

Saving lives huh? Thanx

Thank you very much! this save time

@Vanderlanvianna
Copy link

For me solved too.
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

@LinusU
Copy link
Contributor

LinusU commented Nov 21, 2019

for everyone like me who is super lazy:

curl https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore > android/app/debug.keystore

run ☝️ in your project root directory (same as where your package.json is) and then check that file into git ☺️

@usman1579
Copy link

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

you save my day Hat off

@rodrigogsn
Copy link

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

Yes, also worked for me! Thanks

@ghost
Copy link

ghost commented Jan 25, 2020

Hi what the default password of the debug.keystore file?

@reyn-nova
Copy link

reyn-nova commented Jan 25, 2020

@hafiztayab I have try once and it's work for me using password android

@DevEventlab
Copy link

project from github. Everything went well but when I try to compile the project, it does not work and returns this to me:
The key file "C: \ Users \ user \ .android \ debug.keystore" was not found for signing the "config" configuration.

You notice that in my case it is not a question of 'debug' but of 'config'. Any tip for me? I downloaded the debug.keystore file but nothing has changed

@DevEventlab
Copy link

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

project from github. Everything went well but when I try to compile the project, it does not work and returns this to me:
The key file "C: \ Users \ user \ .android \ debug.keystore" was not found for signing the "config" configuration.
You notice that in my case it is not a question of 'debug' but of 'config'. Any tip for me? I downloaded the debug.keystore file but nothing has changed

@usman1579
Copy link

Or just download from official template https://raw.githubusercontent.com/facebook/react-native/master/template/android/app/debug.keystore

project from github. Everything went well but when I try to compile the project, it does not work and returns this to me:
The key file "C: \ Users \ user \ .android \ debug.keystore" was not found for signing the "config" configuration.
You notice that in my case it is not a question of 'debug' but of 'config'. Any tip for me? I downloaded the debug.keystore file but nothing has changed

@DevEventlab please try with android Studio it will solve your problem

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 23, 2020
…rade.

Part of the RN v0.59.10 -> v0.60.0 upgrade [1]. This commit has no
constraints on its position relative to the others in the series; a
change was proposed, and we declined to take it.

Corresponds to facebook/react-native@63ebbd6bf.

Android Studio already takes care of supplying a debug keystore
automatically, and we haven't seen any issues with that, nor do such
issues seem to be a motivation for that upstream change.

Probably, they wanted to make it easier to configure *release*
keystores. But we already have a process for that [2], which works
better for us than anything like what's proposed here.

This change was also pretty turbulent, as it had to be partly
amended in facebook/react-native@d55025694b [3]. That fix wasn't
released until a full version later, in RN v0.61. Hundreds of people
who had followed the RN v60 upgrade guide commented and reacted on
the issue, having had to manually add to their `.gitignore` and
download and copy a `debug.keystore` file.

So, don't take this change. See also discussion [4].

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.0

[2]: https://github.com/zulip/zulip-mobile/blob/master/docs/howto/release.md#prepare-android

[3]: facebook/react-native#25629

[4]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/Android.20signing.20%28RN.2060.20upgrade%29/near/880752
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 27, 2020
…rade.

This commit marks part of the RN v0.59 -> v0.60 changes to the
template app [1] that we don't take. This commit may freely be
positioned before the upgrade.

Corresponds to facebook/react-native@63ebbd6bf, released in RN
v0.60.0.

Android Studio already takes care of supplying a debug keystore
automatically, and we haven't seen any issues with that, nor do such
issues seem to be a motivation for that upstream change.

Probably, they wanted to make it easier to configure *release*
keystores. But we already have a process for that [2], which works
better for us than anything like what's proposed here.

This change was also pretty turbulent, as it had to be partly
amended in facebook/react-native@d55025694b [3]. That fix wasn't
released until a full version later, in RN v0.61. Hundreds of people
who had followed the RN v60 upgrade guide commented and reacted on
the issue, having had to manually add to their `.gitignore` and
download and copy a `debug.keystore` file.

So, don't take this change. See also discussion [4].

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.6

[2]: https://github.com/zulip/zulip-mobile/blob/master/docs/howto/release.md#prepare-android

[3]: facebook/react-native#25629

[4]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/Android.20signing.20%28RN.2060.20upgrade%29/near/880752
gnprice pushed a commit to chrisbobbe/zulip-mobile that referenced this issue May 28, 2020
…rade.

This commit marks part of the RN v0.59 -> v0.60 changes to the
template app [1] that we don't take. This commit may freely be
positioned before the upgrade.

Corresponds to facebook/react-native@63ebbd6bf, released in RN
v0.60.0.

Android Studio already takes care of supplying a debug keystore
automatically, and we haven't seen any issues with that, nor do such
issues seem to be a motivation for that upstream change.

Probably, they wanted to make it easier to configure *release*
keystores. But we already have a process for that [2], which works
better for us than anything like what's proposed here.

This change was also pretty turbulent, as it had to be partly
amended in facebook/react-native@d55025694b [3]. That fix wasn't
released until a full version later, in RN v0.61. Hundreds of people
who had followed the RN v60 upgrade guide commented and reacted on
the issue, having had to manually add to their `.gitignore` and
download and copy a `debug.keystore` file.

So, don't take this change. See also discussion [4].

[1]: https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.6

[2]: https://github.com/zulip/zulip-mobile/blob/master/docs/howto/release.md#prepare-android

[3]: facebook/react-native#25629

[4]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/Android.20signing.20%28RN.2060.20upgrade%29/near/880752
@bzhr
Copy link

bzhr commented Jun 17, 2020

I have generated the debug.keystore file and placed it at /android/app, but still the command npm run android fails with the same error. I also tried to download the file from the official template, but still the same occurs. Any ideas why?

@fabOnReact
Copy link
Contributor

upgrade to latest version, this was solved with pull request #25807 please close this

@ajaymarathe9
Copy link

You can generate the debug keystore by running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

This works :) Thanks.

@Jayz53
Copy link

Jayz53 commented Nov 27, 2020

keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1

  • keytool -genkey -v -keystore debug.keystore -storepass android -alias ...
  •   + CategoryInfo          : ObjectNotFound: (keytool:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

I'm facing this issue. Kindly help me with this

@med4it
Copy link

med4it commented Aug 14, 2021

if you get "keystore password was incorrect":
cp ./node_modules/react-native/template/android/app/debug.keystore ./android/app/

@facebook facebook locked as resolved and limited conversation to collaborators Oct 8, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet