Build failed (deprecated Gradle features?)

Hi everyone,

my first build today failed with some errors re: deprecated Gradle features. Is it something that I mis-configured in the build settings, or a bug? Didn’t find anything about that on forums.

The application ID is 279543.

And here’s the end of the log file with errors:

------------- 8< --------------------------
┌──────────────────────────────────────────────────────────────────────────────┐
:rocket: SUMMARY | 12/1/2021, 9:42:08 AM │
│ $ rnv export -p android -c app_381784 -s standalone --ci --mono --no-install
├──────────────────────────────────────────────────────────────────────────────┤
│ ReNative Version: 0.32.0-feat-engines-merged-15 │
│ Project Name ($package.name): @appgyver/orchestra-app-standalone │
│ Project Version ($package.version): 3.2.14 │
│ Workspace ($.workspaceID): buildservice │
│ Platform (-p): android │
│ Engine ($.platforms.android.engine): engine-rn │
│ App Config (-c): app_381784 │
│ Build Scheme (-s): standalone │
│ Bundle assets ($.platforms.android.bundleAssets): true │
│ Target (-t): Nexus_5X_API_26 │
│ Supported Platforms: android │
│ Env Info: darwin | x64 | node v16.12.0 │
│ Executed Time: 0h:4m:15s:1ms │
│ │
│ [ warn ] [workspace configure] You’re missing defaultTargets in your config /Users/ec2-user/app-builder/STAGING/dotappgyver/renative.json. Let’s add them!
│ [ warn ] [configure] DEPRECATED structure in /Users/ec2-user/app-builder/STAGING/dotappgyver/@appgyver/orchestra-app-standalone/appConfigs/app_381784/renative.private.json.
Your android object needs to be located under platforms object.
│ [ warn ] [configure] You are missing backgroundColor in your renative config. will use default #FFFFFF instead
│ [ error ] [build] COMMAND:

./gradlew bundleRelease -x bundleReleaseJsAndAssets

FAILED with ERROR:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:packageReleaseBundle’.

java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: jarsignerfailed with exit code 1 :
jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 2s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface
490 actionable tasks: 490 executed

Command failed with exit code 1 (EPERM): ./gradlew bundleRelease -x bundleReleaseJsAndAssets

Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/@react-native-community/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/@react-native-community/slider/android/src/main/java/com/reactnativecommunity/slider/ReactSliderManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/@react-native-community/slider/android/src/main/java/com/reactnativecommunity/slider/ReactSliderManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/react-native-orientation-locker/android/src/main/java/org/wonday/orientation/OrientationModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/@react-native-picker/picker/android/src/main/java/com/reactnativecommunity/picker/ReactPickerManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/@react-native-firebase/crashlytics/android/src/main/java/io/invertase/firebase/crashlytics/ReactNativeFirebaseCrashlyticsModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/ec2-user/app-builder/STAGING/client/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:packageReleaseBundle’.

java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: jarsignerfailed with exit code 1 :
jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 2s

Error: Command failed with exit code 1 (EPERM): ./gradlew bundleRelease -x bundleReleaseJsAndAssets
at makeError (/Users/ec2-user/app-builder/STAGING/client/node_modules/rnv/node_modules/execa/lib/error.js:58:11)
at handlePromise (/Users/ec2-user/app-builder/STAGING/client/node_modules/rnv/node_modules/execa/index.js:112:26)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)

│ │
│ Project location: │
│ ./platformBuilds/app_381784_android │
└──────────────────────────────────────────────────────────────────────────────┘
exec: 4:16.252 (m:ss.mmm)
remove temp package: 5.199ms
ypx: 4:16.387 (m:ss.mmm)
---------------- 8< -------------------------

1 Like

Digging a bit deeper into the error log, seems that the error stems from your keystore file not being in the correct format. Did you follow the instructions below and add a password for your keystore file?

Hi Mari, thank you for the response.

Yes, I did everything as per instructions. Password also was added. Should I try to repeat the process again?

I tried re-configuring the build and creating new keystore password with keytool, but it still keeps failing. Any ideas what could be wrong here?

I am having the same issue regardless of how many times I recreate the keystore file. No android build completion but in my case I don’t even get a log file just an ‘unknown error’ and a message to contact support, which has yielded no results as of yet

@Mari is it possible to look into the issue? If someone from AG Team could help us solve this, it would be highly appreciated. We are ready to release our app, and this issue seems to block it.

1 Like

Tagging @Cecilia and @Harri_Sarsa to try and generate an answer for one of us.

1 Like

@Andrew_Ganine we’ll try to find out what’s causing the keystore error, I’ll let you know when there is an update. @Steven_Mills I’ll update you in the separate thread regarding the error you’re getting.

Thanks, @Mari. I would appreciate if you could look into this ASAP - we’re ready to launch the app, but this issue is blocking everything.

1 Like

Hi @Andrew_Ganine, we unfortunately weren’t able to produce much more insight to the keystore issue here, it should work if you first make sure you have JDK 15 instead of any newer one (in docs: Note that using JDK 16 to generate the keystore file seems to cause build failures. Please use JDK 15 instead!) and run keytool -genkey -v -keystore <keystore_name>.keystore -alias <keystore_alias> -keyalg RSA -keysize 2048 -validity 10000

Hi @Mari , I did exactly that. I tried JDK 15, 15.1 and 15.2, all to the same effect. Here’s my keytool command:

keytool -genkey -v -keystore activechat.keystore -alias activechat -keyalg RSA -keysize 2048 -validity 10000

Could you please look into this again? Maybe trying to run a build with your own key? We’re locked in the development, does it mean that we should give up and switch ApppGyver to another tool?

Please help!

@Andrew_Ganine, if you run keytool -v -list -keystore activechat.keystore, what’s the “keystore type” and how many entries can you see there? Is the alias name correct?

We tried running this with your keystore file locally and got the same error as in the build. If you run java -version what do you get?

Hi @Mari , thank you for your help!

Here’s what I get from the first command:

  • checked by Mari, removed the sensitive info!

Does this help? Any ideas on what I could change/fix?

Thanks, your help is really appreciated. After some research it looks like AppGyver is unique in terms of features and flexibility.

Hi, looks like your keystore is in PKCS12 format instead of JKS (likely because of the Java 17 version, so the same issue applies as with JDK > 15), you can try including the storetype in the command:

keytool -genkey -v -keystore <keystore_name>.keystore -alias <keystore_alias> -keyalg RSA -keysize 2048 -validity 10000 -storetype JKS

and then run keytool -v -list -keystore <keystore_name>.keystore again to see if the format is correct :slight_smile:

3 Likes

There’s also instructions here on how to convert an existing PKCS12 keystore file to JKS.

@Mari you are amazing! Thank you, “Build completed” now. Love the support your team provides, many thanks!

4 Likes

Awesome to hear! What a hard problem to spot, we’ll definitely include support for the other keystore format in the future. :slight_smile:

1 Like

@Mari covered me too!
@Andrew_Ganine I had that same problem with keystore also, so thanks for posting, i fixed two issues in one sweep!

Happy Dev-ing Andrew!

1 Like

Great to know it worked for you also, @Steven_Mills !

AppGyver has two great assets - product and team.

1 Like

Hey @Mari , could you please check what’s going wrong again? I get a message “Build failed for unknown reason”, and I’m just trying to rebuild the app with 3.3 runtime to fix the “input field not clearing itself” bug.

The app is AppGyver - Composer Pro

Here’s the log:

FAILED with ERROR:

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/Users/ec2-user/app-builder/STAGING/client/node_modules/react-native-webview-bridge/android/build.gradle’ line: 38

  • What went wrong:
    A problem occurred evaluating project ‘:react-native-webview-bridge’.

Project with path ‘:react-native-webview’ could not be found in project ‘:react-native-webview-bridge’.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.