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.22k stars 306 forks source link

java.lang.AssertionError: java.lang.ClassNotFoundException #1530

Closed k-bx closed 5 months ago

k-bx commented 6 months ago

Getting this error in latest master:

java.lang.AssertionError: java.lang.ClassNotFoundException: org.signal.libsignal.protocol.groups.state.SenderKeyRecord
        at org.signal.libsignal.internal.FilterExceptions.reportUnexpectedException(FilterExceptions.java:70)
        at org.signal.libsignal.internal.FilterExceptions.filterExceptions(FilterExceptions.java:129)
        at org.signal.libsignal.protocol.groups.GroupSessionBuilder.process(GroupSessionBuilder.java:51)
        at org.whispersystems.signalservice.api.crypto.SignalGroupSessionBuilder.process(SignalGroupSessionBuilder.java:26)
        at org.asamk.signal.manager.helper.IncomingMessageHandler.handleMessage(IncomingMessageHandler.java:313)
        at org.asamk.signal.manager.helper.IncomingMessageHandler.checkAndHandleMessage(IncomingMessageHandler.java:268)
        at org.asamk.signal.manager.helper.IncomingMessageHandler.handleEnvelope(IncomingMessageHandler.java:188)
        at org.asamk.signal.manager.helper.ReceiveHelper.receiveMessagesInternal(ReceiveHelper.java:213)
        at org.asamk.signal.manager.helper.ReceiveHelper.receiveMessages(ReceiveHelper.java:104)
        at org.asamk.signal.manager.internal.ManagerImpl.receiveMessages(ManagerImpl.java:1250)
        at org.asamk.signal.manager.internal.ManagerImpl.receiveMessages(ManagerImpl.java:1222)
        at org.asamk.signal.commands.ReceiveCommand.handleCommand(ReceiveCommand.java:86)
        at org.asamk.signal.commands.CommandHandler.handleLocalCommand(CommandHandler.java:35)
        at org.asamk.signal.App.handleLocalCommand(App.java:278)
        at org.asamk.signal.App.handleCommand(App.java:179)
        at org.asamk.signal.App.init(App.java:144)
        at org.asamk.signal.Main.main(Main.java:56)
        at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.ClassNotFoundException: org.signal.libsignal.protocol.groups.state.SenderKeyRecord
        at java.base@21.0.2/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:52)
        at java.base@21.0.2/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base@21.0.2/java.lang.ClassLoader.loadClass(ClassLoader.java:121)
        at org.signal.libsignal.internal.Native.GroupSessionBuilder_ProcessSenderKeyDistributionMessage(Native Method)
        at org.signal.libsignal.protocol.groups.GroupSessionBuilder.lambda$process$0(GroupSessionBuilder.java:53)
        at org.signal.libsignal.internal.FilterExceptions.filterExceptions(FilterExceptions.java:125)
        ... 16 more

However commit fb81bf1d05f46c521ca0bd136728ca6024d7ba4a builds fine.

I'm building with:

GRAALVM_HOME=/fast/kon/Downloads/graalvm-jdk-21.0.2+13.1 ./gradlew --no-daemon nativeCompile
m-ueberall commented 6 months ago

For the record, we're seeing this as well (for the latest commit 8f756cd90c4579d89a8aa827a613cc78f9d3aee0); the above applies to both GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) and GraalVM CE 22.0.1+8.1 (build 22.0.1+8-jvmci-b01). EDIT: Builds using Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37) and Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01) also don't work (same error message).

m-ueberall commented 6 months ago

Applying the upstream patch/pull request #577 fixes all current local test builds for us (cf. the latest artefacts listed here mentioning "+pr577"). :grinning: