Understand the difference between react-native build-android and fdroid build

Hello,
I’m the creator of LessPass.

I pushed a version of my application that doesn’t work on FDroid, but works on Android store.

There is an issue when I try to import the crypto module.

com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'subtle' of undefined

I try to understand what are the difference between the build ?
My previous build was working on Fdroid with hermes disabled.

I tried to push a new version with hermes disabled.

But on android I’m using hermes, and it works

Any idea ?

There’s a cleannig step after prebuild, so maybe you need to scanignore something? Eg. fdroid build (#9549202295) · Jobs · Guillaume Vincent / fdroiddata · GitLab like hermesc

hermesc was present in the scanignore for the application that was not working

I’m confused now

guess we got lost in translation :slight_smile: can we restart?

which app? it’s an existing version that we need to remove as the build is broken?

LessPass v9.8.5 is broken on FDroid. The build uses hermes. If you look at the log: hermes binary is ignored: node_modules/react-native/sdks/hermesc/linux64-bin/hermesc

I try to understand why this build is not working on FDroid but working on Android.

In the mean time, to solve my issue, I created a v9.8.6 patch disabling hermes.

what makes you think “hermes” is at fault?

This is good question. Because the version before v9.8.5 was not using hermes and was working. So I made the assumption that hermes was the problem.
And the problem is clearly in the javascript bundler/compiler.

We will be sure with version v9.8.6

Maybe the problem is not related to this

you can sign the APK from the CI and test now: https://gitlab.com/guillaumevincent/fdroiddata/-/jobs/9549208837/artifacts/raw/tmp/com.lesspass.android_900800603.apk

ok same error :cry:

It’s not related to hermes

should we disable some versions if they’re faulty?

if we can yes, I don’t know how to do this

9.8.5 and 9.8.6 are not correct

com.facebook.react.common.JavascriptException: TypeError: Cannot read property 'subtle' of undefined, stack:
hmac@1:1044840
createFingerprint2@1:1046059
anonymous@1:1024153
anonymous@1:1024326
handleChangeText@1:984465
_onChange@1:623292
executeDispatch@1:80159
executeDispatchesAndReleaseTopLevel@1:85455
forEachAccumulated@1:81660
anonymous@1:85914
batchedUpdatesImpl@1:147257
batchedUpdates$1@1:85379
dispatchEvent@1:85658

	at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.kt:52)
	at com.facebook.jni.NativeRunnable.run(Native Method)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
	at java.lang.Thread.run(Thread.java:1012)

disabled in lesspass - disable faulty (39b9f936) · Commits · F-Droid / Data · GitLab

Big thank you

I’m fixing the application now, and I will push another patch very soon

open a MR and test the CI APK

Yes,

I will test this one:

I think I found the issue.

I badly bundled the core lib used to generate the password.
It was importing windows.crypto on Android.

Thank you for the help