Skip to content

InvalidCharacterError: Failed to execute 'atob' on 'Window' #341

Closed
@zfi

Description

@zfi

Reported from Sentry: The string to be decoded is not correctly encoded.
in /src/blocklypropclient.js:386:30

            else if (ws_msg.type === 'serial-terminal' &&
                    (typeof ws_msg.msg === 'string' || ws_msg.msg instanceof String)) {
                // sometimes some weird stuff comes through...
                // type: 'serial-terminal'
                // msg: [String Base64-encoded message]

                var msg_in = atob(ws_msg.msg);    <<===============

                if (term !== null) { // is the terminal open?

Chome OS 12607.82.0
Chrome 79.0.3945
URL: solo.parallax.com/blocklyc.html

The sequence of events look like a binary payload was received, then the user closed a modal in the vicinity of <div #serial_console.prop-term.propTerm...>. The error occurred immediately after the user clicked the close button.

Metadata

Metadata

Labels

VerifiedThe reported issue has been mitigatedbugSomething isn't workingdeployment/stagedIssue is pending in staged code. Ready for verification when deployed.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions