AsamK / signal-cli

signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
GNU General Public License v3.0
3.24k stars 309 forks source link

org.signal.libsignal.zkgroup.InvalidInputException: Deserialization failure in zkgroup #1403

Closed morph027 closed 11 months ago

morph027 commented 11 months ago

Native build for 0.12.7 w/ libsignal-client 0.36.1 throws an error:

java.lang.AssertionError: org.signal.libsignal.zkgroup.InvalidInputException: Deserialization failure in zkgroup
    at org.whispersystems.signalservice.api.groupsv2.ClientZkOperations.create(ClientZkOperations.java:33)
    at org.asamk.signal.manager.internal.SignalDependencies.lambda$getClientZkOperations$9(SignalDependencies.java:140)
    at org.asamk.signal.manager.internal.SignalDependencies.getOrCreate(SignalDependencies.java:227)
    at org.asamk.signal.manager.internal.SignalDependencies.getClientZkOperations(SignalDependencies.java:139)
    at org.asamk.signal.manager.internal.SignalDependencies.getClientZkProfileOperations(SignalDependencies.java:144)
    at org.asamk.signal.manager.internal.SignalDependencies.lambda$getPushServiceSocket$1(SignalDependencies.java:103)
    at org.asamk.signal.manager.internal.SignalDependencies.getOrCreate(SignalDependencies.java:227)
    at org.asamk.signal.manager.internal.SignalDependencies.getPushServiceSocket(SignalDependencies.java:99)
    at org.asamk.signal.manager.internal.SignalDependencies.lambda$getAccountManager$3(SignalDependencies.java:109)
    at org.asamk.signal.manager.internal.SignalDependencies.getOrCreate(SignalDependencies.java:227)
    at org.asamk.signal.manager.internal.SignalDependencies.getAccountManager(SignalDependencies.java:108)
    at org.asamk.signal.manager.helper.AccountHelper.updateAccountAttributes(AccountHelper.java:389)
    at org.asamk.signal.manager.helper.AccountHelper.checkAccountState(AccountHelper.java:88)
    at org.asamk.signal.manager.internal.ManagerImpl.checkAccountState(ManagerImpl.java:218)
    at org.asamk.signal.manager.SignalAccountFiles.initManager(SignalAccountFiles.java:121)
    at org.asamk.signal.manager.SignalAccountFiles.lambda$initMultiAccountManager$1(SignalAccountFiles.java:69)
    at java.base@17.0.8/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base@17.0.8/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
    at java.base@17.0.8/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base@17.0.8/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base@17.0.8/java.util.stream.Nodes$CollectorTask.doLeaf(Nodes.java:2183)
    at java.base@17.0.8/java.util.stream.Nodes$CollectorTask.doLeaf(Nodes.java:2149)
    at java.base@17.0.8/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
    at java.base@17.0.8/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
    at java.base@17.0.8/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base@17.0.8/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base@17.0.8/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base@17.0.8/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base@17.0.8/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
Caused by: org.signal.libsignal.zkgroup.InvalidInputException: Deserialization failure in zkgroup
    at org.signal.libsignal.internal.Native.ServerPublicParams_CheckValidContents(Native.java)
    at org.signal.libsignal.zkgroup.ServerPublicParams.<init>(ServerPublicParams.java:14)
    at org.whispersystems.signalservice.api.groupsv2.ClientZkOperations.create(ClientZkOperations.java:31)
    ... 30 more
morph027 commented 11 months ago

Ah, nevermind, using the libsignal builds from @exquo - https://github.com/exquo/signal-libs-build/ it works...not sure whats messed up in my builds, but not scope of this repo :blush:

morph027 commented 11 months ago

nevermind, wrong binary 🙈

RichardFevrier commented 10 months ago

There is actually a mistake @AsamK in the changelog; the version 0.12.7 requieres the 0.37.0's libsignal_jni version and not the 0.36.1. At least to build a native image with GraalVM.

m-ueberall commented 10 months ago

the version 0.12.7 requieres the 0.37.0's libsignal_jni version and not the 0.36.1. At least to build a native image with GraalVM.

Which version of GraalVM/which settings are you using to encounter a problem? With GraalVM CE 17.0.9+9.1 (build 17.0.9+9-jvmci-23.0-b22), the local native builds for arm64/aarch64 and amd64/x86_64 linked against libsignal_jni version 0.36.1 work just fine here (see signal-cli_ubuntu2004_arm64.meta, signal-cli_ubuntu2004_amd64.meta).

RichardFevrier commented 10 months ago

Which version of GraalVM/which settings are you using to encounter a problem? With GraalVM CE 17.0.9+9.1 (build 17.0.9+9-jvmci-23.0-b22), the local native builds for arm64/aarch64 and amd64/x86_64 linked against libsignal_jni version 0.36.1 work just fine here (see signal-cli_ubuntu2004_arm64.meta, signal-cli_ubuntu2004_amd64.meta).

Using the latest GraalVM community 21.0.1 against x86_64 (didn't had the time to test it against aarch64) with no particular settings. Only works with 0.37.0 from my CI as I said.

Just to be sure we are talking about the same thing. The problem is not about building, it's about running (I should have formulated it better in my previous message).