[Image Utils Mobile] 'atob' failed: The string to be decoded is not correctly encoded
Forge component by Harlin Setiadarma
Published on 06 Nov 2019

Hi Harlin,

I noticed the following error in the error log. But I did not get any error when I tested it. I guess some user got it but not sure how and what is the root cause. Below is the stack trace:

Error: 'atob' failed: The string to be decoded is not correctly encoded.
    at base64ToArrayBuffer (Image_Utils_Mobile.controller.js?GpXdTJf_7j5T_38q4P09Xg:1268:24)
    at Image_Utils_Mobile.controller.js?GpXdTJf_7j5T_38q4P09Xg:1278:36
    at Controller.e.safeExecuteJSNode (OutSystems.js?sdcuBcomxTNu8PYGfXaUiQ:9:8050)
    at Object.Image_Utils_MobileController.default.safeClientActionDefinitions.getOrientationAction       (scripts/Image_Utils_Mobile.controller.js?GpXdTJf_7j5T_38q4P09Xg:227:66)

What is your binary data source?

Is it from camera or upload widget?

If it was upload widget, maybe your user uploaded something that is not an image?

Rank: #613

I have the same problem, I am using the upload component but restricted only to images.

Another information is that this error happens in some devices and in others not.

For example, in Sony devices happens the error already in motorola does not happen.

This component relies heavily on Javascript Canvas rendering.

Maybe those devices have incompatible Javascript engine. 

I suggest you to look into cordova based image resizing solution.

I think I saw one in Forge.