React-Native App - Build Error

Hi good day.

I am trying to build the project below,
metadata: https://gitlab.com/noypi1/fdroiddata/-/blob/com.hadiths/metadata/com.hadiths.yml

But I am getting this errors

2023-01-15 23:59:50,941 ERROR: Could not build app com.hadiths: OSError while trying to execute /home/…/.local/lib/python3.10/site-packages/gradlew-fdroid clean: [Errno 2] No such file or directory: ‘/home/…/.local/lib/python3.10/site-packages/gradlew-fdroid’

Also, anyway I can enable full build logs, and find where it is located?
2023-01-15 23:59:50,947 DEBUG: skip deploying full build logs: not enabled in config

Also, may I know what are executed when I run fdroid build?
Because I don’t think the error happens on ./gradlew assembleRelease

Thank you.

Take a loot at: Tips&Tricks · Wiki · F-Droid / wiki · GitLab

set deploy_process_logs: true and serverwebroot: /some/path to save logs

Run as fdroid build --verbose --scan-binary com.hadiths etc

Save as .gz file metadata/com.hadiths.yml · com.hadiths · saifuddin / Data · GitLab instead :slight_smile:

> Task :react-native-sqlite-storage:extractReleaseAnnotations FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-sqlite-storage:extractReleaseAnnotations'.
> Error while evaluating property 'hasAndroidAnnotations' of task ':react-native-sqlite-storage:extractReleaseAnnotations'
   > Could not resolve all artifacts for configuration ':react-native-sqlite-storage:releaseCompileClasspath'.
      > Failed to transform sqlite-connector.jar to match attributes {artifactType=android-classes-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
         > Execution failed for JetifyTransform: /home/vagrant/build/com.hadiths/node_modules/react-native-sqlite-storage/platforms/android-native/libs/sqlite-connector.jar.
            > Transform's input file does not exist: /home/vagrant/build/com.hadiths/node_modules/react-native-sqlite-storage/platforms/android-native/libs/sqlite-connector.jar. (See https://issuetracker.google.com/issues/158753935)

This recipe:

  - versionName: 1.1.1
    versionCode: 3
    commit: v1.1.2
    subdir: android/app/
    sudo:
      - sysctl fs.inotify.max_user_watches=524288 || true
      - curl -Lo node.tar.gz https://nodejs.org/download/release/v19.3.0/node-v19.3.0-linux-x64.tar.gz
      - echo "b525028ae5bb71b5b32cb7fce903ccce261dbfef4c7dd0f3e0ffc27cd6fc0b3f node.tar.gz"
        | sha256sum -c -
      - tar xzf node.tar.gz --strip-components=1 -C /usr/local/
      - npm -g install yarn
    init:
      - cd ../..
      - yarn cache clean
      - npm_config_build_from_source=true yarn --force
    gradle:
      - yes
    rm:
      - node_modules/react-native/sdks/hermesc/win64-bin/
      - res/ic_launcher*
    scanignore:
      - android/build.gradle
      - node_modules/jsc-android
      - node_modules/react-native/android/
      - node_modules/react-native-screens/android/build.gradle
      - node_modules/react-native-safe-area-context/android/build.gradle
      - node_modules/react-native/ReactAndroid/build.gradle
      - node_modules/react-native/ReactAndroid/hermes-engine/build.gradle
      - node_modules/expo/android/build.gradle
      - node_modules/expo-application/android/build.gradle
      - node_modules/expo-constants/android/build.gradle
      - node_modules/expo-error-recovery/android/build.gradle
      - node_modules/expo-file-system/android/build.gradle
      - node_modules/expo-font/android/build.gradle
      - node_modules/expo-keep-awake/android/build.gradle
      - node_modules/expo-modules-core/android/build.gradle
      - node_modules/expo-splash-screen/android/build.gradle
    scandelete:
      - node_modules

Full log, remove .zip at the end: com.hadiths_3.log.gz.zip (10.8 KB)

I can now reproduce this issue after adding the recipe above. Thanks.

The issue above is resolved now.
2 issues addressed here.

Issue 1 - Local gradle configuration

  1. copy config.yml
    cd fdroiddata && cp config/config.yml
  2. add gradle to config.yml
    gradle: /…/fdroidserver/gradlew-fdroid
  3. ensure the following file exists:
    /home/…/.cache/fdroidserver/gradle-7.5.1-bin.zip

Issue 2 - stated in logs above (sqlite-connector.jar)

  1. add the following at config.yml
    scanignore:
    • node_modules/react-native-sqlite-storage/platforms/android-native/libs/sqlite-connector.jar

Thank you very much.

Well, yes, you can ignore it… but F-Droid will not allow it… can that be rebuilt from source?

for now i am not sure.

how about tools from SDK? like

node_modules/react-native/sdks/hermesc/linux64-bin/hermesc

can I add hermesc to ignore list?

update

ok found it in inclusion policy, will just ignore hermesc, thanks.

 JSC/Hermes. They can be built from   source which takes hours. Currently we downloaded them from npm and scanignore them.
1 Like