question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App not reproducible

See original GitHub issue

Comparing APKs latest version 2.1.14 from github https://github.com/btcontract/wallet/releases/download/2.1.14/SBW-2.1.14.apk to APK from fdroid: https://f-droid.org/repo/com.btcontract.wallet_75.apk

Result in diff in several files: diff --recursive --brief ./SBW-2.1.14/ ./com.btcontract.wallet_75/

Only in ./SBW-2.1.14/assets: graph.snapshot-mainnet.zlib
Files ./SBW-2.1.14/classes3.dex and ./com.btcontract.wallet_75/classes3.dex differ
Files ./SBW-2.1.14/classes.dex and ./com.btcontract.wallet_75/classes.dex differ
Files ./SBW-2.1.14/lib/arm64-v8a/libsecp256k1.so and ./com.btcontract.wallet_75/lib/arm64-v8a/libsecp256k1.so differ
Files ./SBW-2.1.14/lib/arm64-v8a/libwallycore.so and ./com.btcontract.wallet_75/lib/arm64-v8a/libwallycore.so differ
Files ./SBW-2.1.14/lib/armeabi-v7a/libsecp256k1.so and ./com.btcontract.wallet_75/lib/armeabi-v7a/libsecp256k1.so differ
Files ./SBW-2.1.14/lib/armeabi-v7a/libwallycore.so and ./com.btcontract.wallet_75/lib/armeabi-v7a/libwallycore.so differ
Files ./SBW-2.1.14/lib/x86/libsecp256k1.so and ./com.btcontract.wallet_75/lib/x86/libsecp256k1.so differ
Files ./SBW-2.1.14/lib/x86/libwallycore.so and ./com.btcontract.wallet_75/lib/x86/libwallycore.so differ
Files ./SBW-2.1.14/lib/x86_64/libsecp256k1.so and ./com.btcontract.wallet_75/lib/x86_64/libsecp256k1.so differ
Files ./SBW-2.1.14/lib/x86_64/libwallycore.so and ./com.btcontract.wallet_75/lib/x86_64/libwallycore.so differ
  1. why file graph.snapshot-mainnet.zlib not exists in f-droid version? is it a bug that should be opened in their gitlab?
  2. diffoscope https://diffoscope.org/ should be run on both files to look into the diffs in the files.
  3. in what environment the github APK was build, as the diffs are probably caused by it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
btcontractcommented, Oct 16, 2021

I’ve identified a few advanced Scala features which seemingly do not play well with reproducibility (chunks of code get moved around non-deterministically while compiling), currently doing some refactoring to get rid of those and hopefully in next release this will be resolved.

1reaction
emanuelbcommented, Oct 19, 2021

Tested version 2.2.15.1 sha256sum for https://github.com/btcontract/wallet/releases/download/2.2.15.1/SBW-2.2.15.1.apk is: 26851863c62f4114009c1d5cab95610d9d93035714153466d89be28d4b57af4b

Running ./gradlew assembleRelease in above container:

podman build --rm -t simplebitcoinwallet_lv_build_apk -f ContainerFile
podman run --rm --name simplebitcoinwallet_lv_build_apk -ti simplebitcoinwallet_lv_build_apk
podman cp simplebitcoinwallet_lv_build_apk:/app/simplebitcoinwallet/wallet/app/build/outputs/apk/release/SBW-2.2.15.1.apk ~/simplebitcoinwallet_build_2.2.15.1.apk
FROM debian:sid-slim

RUN set -ex; \
    mkdir -p /usr/share/man/man1/ /app/; \
    useradd -ms /bin/bash appuser; \
    chown appuser /app/; \
    apt-get update; \
    DEBIAN_FRONTEND=noninteractive apt-get install --yes -o APT::Install-Suggests=false --no-install-recommends openjdk-11-jdk git wget unzip; \
    rm -rf /var/lib/apt/lists/*;

USER appuser

ENV ANDROID_SDK_ROOT="/app/sdk" \
    ANDROID_HOME="/app/sdk" \
    ANDROID_NDK_HOME="/app/sdk/ndk/22.1.7171670/" \
    JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"

RUN set -ex; \
    mkdir -p "/app/sdk/licenses" "/app/sdk/ndk" "/app/simplebitcoinwallet/"; \
    printf "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "/app/sdk/licenses/android-sdk-license"; \
    cd /app/sdk/; \
    wget https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip; \
    unzip android-ndk-r22b-linux-x86_64.zip; \
    rm android-ndk-r22b-linux-x86_64.zip; \
    mv android-ndk-r22b "/app/sdk/ndk/22.1.7171670/"; \
    cd /app/simplebitcoinwallet/; \
    git clone https://github.com/btcontract/wallet; \
    cd /app/simplebitcoinwallet/wallet/; \
    git checkout 2.2.15.1; \
    cd /app/simplebitcoinwallet/wallet/app/src/main/assets/; \
    wget https://github.com/btcontract/wallet/releases/download/2.2.15.1/graph.snapshot-mainnet.zlib; \
    cd /app/simplebitcoinwallet/wallet/;
   
WORKDIR /app/simplebitcoinwallet/wallet/

app is reproducible as brief diff is:

diff --recursive --brief ./SBW-2.2.15.1/ ./simplebitcoinwallet_build_2.2.15.1/
Only in ./SBW-2.2.15.1/META-INF: BITCOINS.RSA
Only in ./SBW-2.2.15.1/META-INF: BITCOINS.SF
Files ./SBW-2.2.15.1/META-INF/MANIFEST.MF and ./simplebitcoinwallet_build_2.2.15.1/META-INF/MANIFEST.MF differ
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Reproduce a Non-Reproducible Defect and Make ...
Always recheck your steps to reproduce on a new system, clearing all cookies and cache memory. Make sure the sentences are short and...
Read more >
How to Deal with Non Reproducible Bug - Onecore
Let's say a bug appears during the installation of the software under particular operating system with specific memory.Same bug doesn't appear under another ......
Read more >
When the bug is 'non-reproducible'... - LinkedIn
A bug could be because you didn't let that “pull to refresh” complete. And as Devs are often running the app in simulators...
Read more >
Any good strategies for dealing with 'not reproducible' bugs?
If all else fails, try looking at the section of code that is causing problems, and possibly refactor or use a workaround. If...
Read more >
5 Simple Ways to Reproduce Not Reproducible Bug
5 Simple Ways to Reproduce Not Reproducible Bug ; 1. SnagIt Video Recorder ; 2. psr.exe – problem steps recorder in Windows 7...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found