libsignal_protocol_dart icon indicating copy to clipboard operation
libsignal_protocol_dart copied to clipboard

Unhandled Exception: InvalidMessageException - No valid sessions. [InvalidMessageException - Bad Mac!][0]

Open PremchandGat opened this issue 1 year ago • 5 comments

Getting error while decrypting the message /flutter ( 3857): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: InvalidMessageException - No valid sessions. [InvalidMessageException - Bad Mac!][0] E/flutter ( 3857): #0 SessionCipher._decrypt session_cipher.dart:186 E/flutter ( 3857): #1 SessionCipher.decryptWithCallback session_cipher.dart:109 E/flutter ( 3857): E/flutter ( 3857): #2 ChatBloc._decryptMessage chat_bloc.dart:97 E/flutter ( 3857): E/flutter ( 3857): #3 Bloc.on..handleEvent bloc.dart:229 E/flutter ( 3857): E/flutter ( 3857):

PremchandGat avatar Jul 21 '23 20:07 PremchandGat

Hey @PremchandGat , did you managed to solve this?

Sometimes I get this error too, however I cannot reproduce it 🤔

simonasposka avatar Aug 28 '23 13:08 simonasposka

Hey @simonasposka, i haven't worked again on that so i haven't solved this issu. If you want the code to reproduce this error that might i can send you

PremchandGat avatar Aug 28 '23 15:08 PremchandGat

I'd be very grateful if you shared the code that causes this error 🙇‍♂️

simonasposka avatar Aug 28 '23 16:08 simonasposka

https://github.com/PremchandGat/lib_signal_flutter Here the code @simonasposka

PremchandGat avatar Aug 31 '23 07:08 PremchandGat

Hello,

I have the same problem. I implemented a small test program which works fine but implementing the library into my larger project I get the same error message. As I cannot share my bigger project (which would be unpractical too), I would like to know

  1. what this error means,
  2. how I can run into this exception and
  3. what is needed for a session to be the same (aka what values do I need to double-check on sender and receiver)

to hopefully debug my program. The general implementation is correct so the devil has to be in the detail.

McCrafterIV avatar Sep 25 '23 14:09 McCrafterIV