Are you using SerialTransfer.h release 1.4.1?
There was a bug in the earlier versions where the Consistent Overhead Byte Stuffing (COBS) algorithm didn't calculate the COBS overhead byte correctly, potentially causing issues if you sent the value '~'.
It is, however fixed in version 1.4.1