diff --git a/src/browser/components/MattermostView.jsx b/src/browser/components/MattermostView.jsx index be33018c..99024811 100644 --- a/src/browser/components/MattermostView.jsx +++ b/src/browser/components/MattermostView.jsx @@ -16,6 +16,9 @@ const ErrorView = require('./ErrorView.jsx'); const preloadJS = `file://${remote.app.getAppPath()}/browser/webview/mattermost_bundle.js`; +const ERR_NOT_IMPLEMENTED = -11; +const U2F_EXTENSION_URL = 'chrome-extension://kmendfapggjehodndflmmgagdbamhnfd/u2f-comms.html'; + function extractFileURL(message) { const matched = message.match(/Not allowed to load local resource:\s*(.+)/); if (matched) { @@ -72,6 +75,11 @@ const MattermostView = createReactClass({ if (e.errorCode === -3) { // An operation was aborted (due to user action). return; } + if (e.errorCode === ERR_NOT_IMPLEMENTED && e.validatedURL === U2F_EXTENSION_URL) { + // U2F device is not supported, but the guest page should fall back to PIN code in 2FA. + // https://github.com/mattermost/desktop/issues/708 + return; + } self.setState({ errorInfo: e,