Some users get this error message:
This can happen if we use non-UTF8 characters in an event. All events emitted are UTF8 JSON.
When you BASE64 Decode the string it generates data that cannot be placed into the event due to it not being UTF8 friendly resulting in the error.
The reason you can see an output on the test and pill builder preview is because these does not attempt to write the data to an event yet. The error only occurs when trying to place the data into an event to be emitted.