diff --git a/browser/src/core/Socket.js b/browser/src/core/Socket.js index 006ba58479b2..a4453c7cc87b 100644 --- a/browser/src/core/Socket.js +++ b/browser/src/core/Socket.js @@ -1520,6 +1520,14 @@ app.definitions.Socket = L.Class.extend({ _onSocketClose: function () { window.app.console.debug('_onSocketClose:'); + if (!this._map._docLoadedOnce) { + var postMessageObj = { + success: false, + errorMsg: errorMessages.websocketconnectionfailed + }; + this._map.fire('postMessage', {msgId: 'Action_Load_Resp', args: postMessageObj}); + this._map.fire('error', {msg: errorMessages.websocketconnectionfailed, cmd: 'socket', kind: 'closed', id: 4}); + } if (this.ReconnectCount > 0) return; diff --git a/browser/src/errormessages.js b/browser/src/errormessages.js index 63bbdfc1008e..3ef4d7cd0e7e 100644 --- a/browser/src/errormessages.js +++ b/browser/src/errormessages.js @@ -27,6 +27,7 @@ errorMessages.docloadtimeout = _('Failed to load the document. This document is errorMessages.docunloadingretry = _('Cleaning up the document from the last session.'); errorMessages.docunloadinggiveup = _('We are in the process of cleaning up this document from the last session, please try again later.'); errorMessages.clusterconfiguration = _('Your %productName cluster appear to be mis-configured or scaling rapidly - please contact your system administrator. Continuing with editing may result in multiple users not seeing each other, conflicts in the document storage and/or copy/paste problems. Expected serverId %0 for routeToken %1 but connected to serverId %2'); +errorMessages.websocketconnectionfailed = _('Failed to establish socket connection or socket connection closed unexpectedly. The reverse proxy is probably misconfigured, please contact the administrator. For more info on proxy conifguration please checkout https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html'); if (window.ThisIsAMobileApp) { errorMessages.storage = { loadfailed: _('Failed to load document.'),