-
Notifications
You must be signed in to change notification settings - Fork 28
Description
I get a Null Pointer Exception when receiving messages, and thus cannot receive any messages.
It happens under SignalServiceMessageReceiver.retrieveMessages(..) when the received envelope has null for entity.getUpdatedPni(). When this is null the Envelop.Builder will fail when calling .setUpdatedPni(updatedPni) since for some reason it is using the String value to make the call value.getClass(). I would guess this is generated code based on the protobuf stuff. So, a non-null check would be needed before this, unless the problem lies elsewhere.
I can't really say why it is null. I send a message from my phone and receive it with my bot.
Perhaps the deserialization is incorrectly configured to interpret missing data as null, the field is optional.
optional string updatedPni = 15;
The signal-client "lib" code in the adroid app does not set the updatedPni argument
envelope = new SignalServiceEnvelope(entity.getType(),
Optional.of(address),
entity.getSourceDevice(),
entity.getTimestamp(),
entity.getContent(),
entity.getServerTimestamp(),
messageResult.getServerDeliveredTimestamp(),
entity.getServerUuid(),
entity.getDestinationUuid(),
entity.isUrgent(),
entity.isStory());
I may have done something wrong, however I can't see what that would be.