Merge pull request #2820 from matrix-org/travis/timeline-explosion-workaround
Ask the user for debug logs when the timeline explodes
This commit is contained in:
commit
79ea873717
4 changed files with 150 additions and 0 deletions
|
@ -48,6 +48,7 @@ import { _t, getCurrentLanguage } from '../../languageHandler';
|
|||
import SettingsStore, {SettingLevel} from "../../settings/SettingsStore";
|
||||
import { startAnyRegistrationFlow } from "../../Registration.js";
|
||||
import { messageForSyncError } from '../../utils/ErrorUtils';
|
||||
import TimelineExplosionDialog from "../views/dialogs/TimelineExplosionDialog";
|
||||
|
||||
const AutoDiscovery = Matrix.AutoDiscovery;
|
||||
|
||||
|
@ -1292,6 +1293,17 @@ export default React.createClass({
|
|||
return self._loggedInView.child.canResetTimelineInRoom(roomId);
|
||||
});
|
||||
|
||||
cli.on('sync.unexpectedError', function(err) {
|
||||
if (err.message && err.message.includes("live timeline ") && err.message.includes(" is no longer live ")) {
|
||||
console.error("Caught timeline explosion - trying to ask user for more information");
|
||||
if (Modal.hasDialogs()) {
|
||||
console.warn("User has another dialog open - skipping prompt");
|
||||
return;
|
||||
}
|
||||
Modal.createTrackedDialog('Timeline exploded', '', TimelineExplosionDialog, {});
|
||||
}
|
||||
});
|
||||
|
||||
cli.on('sync', function(state, prevState, data) {
|
||||
// LifecycleStore and others cannot directly subscribe to matrix client for
|
||||
// events because flux only allows store state changes during flux dispatches.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue