AppAuth-Android icon indicating copy to clipboard operation
AppAuth-Android copied to clipboard

Keytool command doesn't executed properly

Open a23sokolov opened this issue 3 years ago • 1 comments

Checklist:

  • [x] I am using the latest release
  • [x] I searched for existing GitHub issues
  • [x] I read the documentation
  • [x] I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
  • [x] I am either using a custom URI scheme or https with App Links for client redirect.
  • [ ] I can reproduce the issue in master branch

Configuration

  • Version: actual master on 23.09.22
  • Integration: (native(Java/Kotlin), Xamarin, ReactNative, etc)
  • Identity provider: (Google, Okta, Gluu, Auth0, KeyCloack, etc)

Issue Description

appauth.keystore missing - creating one The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java.

FAILURE: Build failed with an exception.

  • Where: Script '/Users/XXXXX/Documents/AndroidProjects/AppAuth-Android/config/keystore.gradle' line: 4

  • What went wrong: A problem occurred evaluating root project 'AppAuth-Android'.

Process 'command 'keytool'' finished with non-zero exit value 1

P.S. JAVA_HOME set properly

in my ~/.bash_profile export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home/ as I understood problem could be on my mac, but I could not find it.

P.S. easy decision for not be stuck

  1. Add this link to get full path where appauth.keystore should be println "### $keystoreFile"
  2. open terminal, and go to the path in previous step for me it was - /Users/XXXXX/Documents/AndroidProjects/AppAuth-Android/config/keystore.gradle
  3. just call keytool -genkey -keystore appauth.keystore -alias appauth -keyalg RSA -keysize 2048 -validity 10000 -keypass appauth -storepass appauth -dname CN=appauth

a23sokolov avatar Sep 23 '22 05:09 a23sokolov

Hello. It might be a bit late but in case anyone will have the same issue - make sure to add JAVA_HOME to your PATH variable:

export PATH="$JAVA_HOME/bin:$PATH"

This worked for me.

moshenskyi avatar Jul 15 '25 20:07 moshenskyi