JavaJens / TextSecure

A secure text messaging application for Android.
GNU General Public License v3.0
71 stars 9 forks source link

build fails with: #30

Closed git-marijus closed 8 years ago

git-marijus commented 9 years ago

Checksum failed for org.whispersystems:textsecure-android:28d3cb7ee8ac8437f148b9b4f689546d1393287798f0f09acbe21716c8aee8d0

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

BUILD FAILED

relyt29 commented 9 years ago

Did you follow the bit in the instructions about using javajens's copy of libtextsecure-java? The standard/upstream version won't work.

git clone https://github.com/JavaJens/libtextsecure-java.git
cd libtextsecure-java
git checkout fix/maven_local
./gradlew tasks installArchives

I've seen issues like this in the main repo and usually its turned out to be something along the lines that the geographical maven repo closest to people is lagging, although that wouldn't be possible here since its a local maven repo.

If you keep having this issue what you can do is

 cd ~/.m2/repository/org/whispersystems/textsecure-android/2.6.2
 cat textsecure-android-2.6.2.aar | sha256sum

and replace 28d3cb7ee8ac8437f148b9b4f689546d1393287798f0f09acbe21716c8aee8d0 with whatever the sha256 of the aar is. Of course gradle-witness is a warning against man in the middle attacks, so be aware of that.

jensMF commented 9 years ago

I am getting the same error and I did

git clone https://github.com/JavaJens/libtextsecure-java.git
cd libtextsecure-java
git checkout fix/maven_local
./gradlew tasks installArchives

but the error is still there. I don't know where to replace the sha256 and I would prefer to not replace it, because of security concerns...

xmikos commented 9 years ago

Same problem for me, my textsecure-android-2.6.2.aar has this sha256sum:

18b8eb0625d409279931f26974bef875da0ed6f1e7184bfb9d5e1a7ce95d9f21

You didn't tested this checksum in previous revisions of WebSocket fork, maybe this is the problem - without reproducible builds, you can't depend on the same checksum for everyone. Or am I wrong?

ddast commented 9 years ago

Building it twice yields two different hashes for me so I guess you're right @xmikos.

relyt29 commented 9 years ago

Yeah, I'm sure compile time and other build dependent properties are part of the aar which would affect the hash.

long term it would be really cool to get gitian working with TS - although that would be more relevant to upstream than just us

JavaJens commented 9 years ago

We could, for now, remove the checksums, that would ease building for everyone.

relyt29 commented 9 years ago

I think I would it would be a better idea to amend the instructions to add the bit about the hash, rather than removing the verification, even if the net affect is the same.

Plus it enables people building the repo to learn about how gradle-witness works

EDIT: I updated the instructions. JavaJens it's your repo and if you want to remove the checksums that's your prerogative. Either way, ticket is good to be closed now, no?

mad-de commented 9 years ago

Pretty similar issue: https://github.com/WhisperSystems/TextSecure/issues/3853 Deleting the com.android.support:support-v4 com.android.support:support-annotations lines in the "dependencyVerification" part of the build.gradle file however is an easy workaround fpor now to let it build succesfully until a definite merge with TS master has been made.

git-marijus commented 9 years ago

i removed those checksums for testing:

'org.whispersystems:textsecure-android:28d3cb7ee8ac8437f148b9b4f689546d1393287798f0f09acbe21716c8aee8d0', 'org.whispersystems:textsecure-java:5be870e48adce18fc911c648c264cc968b16cd2299eb9170dd3ddc63d716eaa7',

now the build fails with:

:compileProdDebugJava 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. :compileProdDebugNdk UP-TO-DATE :compileProdDebugSources :proguardProdDebug Warning: org.thoughtcrime.securesms.ConversationActivity$25: can't find enclosing method 'void openKeyboardForComposition()' in program class org.thoughtcrime.securesms.ConversationActivity Warning: org.thoughtcrime.securesms.ConversationActivity$EmojiToggleListener$1: can't find referenced method 'void access$2900(org.thoughtcrime.securesms.ConversationActivity)' in program class org.thoughtcrime.securesms.ConversationActivity Warning: org.thoughtcrime.securesms.ConversationFragment$2$1: can't find enclosing method 'void onClick(android.content.DialogInterface,int)' in program class org.thoughtcrime.securesms.ConversationFragment$2 Warning: org.thoughtcrime.securesms.ConversationFragment$4$1: can't find referenced field 'org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord val$message' in program class org.thoughtcrime.securesms.ConversationFragment$4 Warning: org.thoughtcrime.securesms.ConversationFragment$4$1: can't find enclosing method 'void onClick(android.content.DialogInterface,int)' in program class org.thoughtcrime.securesms.ConversationFragment$4 Warning: org.thoughtcrime.securesms.ConversationListFragment$3$1: can't find referenced method 'android.support.v7.view.ActionMode access$100(org.thoughtcrime.securesms.ConversationListFragment)' in program class org.thoughtcrime.securesms.ConversationListFragment Warning: org.thoughtcrime.securesms.ConversationListFragment$3$1: can't find referenced method 'android.support.v7.view.ActionMode access$102(org.thoughtcrime.securesms.ConversationListFragment,android.support.v7.view.ActionMode)' in program class org.thoughtcrime.securesms.ConversationListFragment Warning: org.thoughtcrime.securesms.ConversationListFragment$3$1: can't find enclosing method 'void onClick(android.content.DialogInterface,int)' in program class org.thoughtcrime.securesms.ConversationListFragment$3 Warning: there were 8 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile the code. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember) :proguardProdDebug FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

zebra-ok commented 9 years ago

My checksums of the fixed libtextecure-java and libtextsecure-android builds worked by configuring build.gradle to first check mavenLocal() before the remote repos:

repositories {
    mavenLocal()
    maven {
        url "https://repo1.maven.org/maven2/"
    }
...