Skip to content

Commit

Permalink
Merge tag 'v1.4.2' into auto
Browse files Browse the repository at this point in the history
[Full Changelog](element-hq/element-web@v1.4.2-rc.1...v1.4.2)
* Document troubleshooting for memory leaks and getting profiles
[\element-hq#11031](element-hq#11031)
  • Loading branch information
coolmic committed Oct 14, 2019
2 parents ee656ec + 685d913 commit 3b5c649
Show file tree
Hide file tree
Showing 35 changed files with 1,472 additions and 971 deletions.
131 changes: 131 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,134 @@
Changes in [1.4.2](https://github.com/vector-im/riot-web/releases/tag/v1.4.2) (2019-10-04)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.4.2-rc.1...v1.4.2)

* Document troubleshooting for memory leaks and getting profiles
[\#11031](https://github.com/vector-im/riot-web/pull/11031)

Changes in [1.4.2-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.4.2-rc.1) (2019-10-02)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.4.1...v1.4.2-rc.1)

* Custom themes MVP
[\#11017](https://github.com/vector-im/riot-web/pull/11017)
* Document permalinkPrefix setting
[\#11007](https://github.com/vector-im/riot-web/pull/11007)

Changes in [1.4.1](https://github.com/vector-im/riot-web/releases/tag/v1.4.1) (2019-10-01)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.4.0...v1.4.1)

* Upgrade to React SDK 1.6.1 to fix critical
[blank screen issue](https://github.com/vector-im/riot-web/issues/10983)
* Upgrade to JS SDK 2.4.1 to to ignore crypto events with empty content
* Update from Weblate
[\#11010](https://github.com/vector-im/riot-web/pull/11010)
* Update from Weblate
[\#11001](https://github.com/vector-im/riot-web/pull/11001)
* Upgrade deps
[\#10980](https://github.com/vector-im/riot-web/pull/10980)

Changes in [1.4.0](https://github.com/vector-im/riot-web/releases/tag/v1.4.0) (2019-09-27)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.4.0-rc.2...v1.4.0)

* Many improvements related to privacy and user control of identity services and integration managers
* Upgrade to React SDK 1.6.0 and JS SDK 2.4.0

Changes in [1.4.0-rc.2](https://github.com/vector-im/riot-web/releases/tag/v1.4.0-rc.2) (2019-09-26)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.4.0-rc.1...v1.4.0-rc.2)

* Upgrade to React SDK 1.6.0-rc.2
* Work around Yarn confusion with `react-gemini-scrollbar` package

Changes in [1.4.0-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.4.0-rc.1) (2019-09-25)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.6...v1.4.0-rc.1)

* Upgrade to React SDK 1.6.0-rc.1 and JS SDK 2.4.0-rc.1
* Update from Weblate
[\#10961](https://github.com/vector-im/riot-web/pull/10961)
* Don't log query parameters as they may contain secrets
[\#10929](https://github.com/vector-im/riot-web/pull/10929)
* Document more shortcuts
[\#10906](https://github.com/vector-im/riot-web/pull/10906)
* Point to #develop and use the same gemini-scrollbar version as the react-sdk
[\#10893](https://github.com/vector-im/riot-web/pull/10893)
* Tweak lock file to pull in only one React version
[\#10874](https://github.com/vector-im/riot-web/pull/10874)
* document disable_custom_urls
[\#10844](https://github.com/vector-im/riot-web/pull/10844)
* Install guide tweaks
[\#10838](https://github.com/vector-im/riot-web/pull/10838)
* Switch to React 16
[\#10480](https://github.com/vector-im/riot-web/pull/10480)
* Update install guide
[\#10810](https://github.com/vector-im/riot-web/pull/10810)
* Clarify that HTTPS is not just needed for VoIP
[\#6146](https://github.com/vector-im/riot-web/pull/6146)
* Bump eslint-utils from 1.4.0 to 1.4.2
[\#10692](https://github.com/vector-im/riot-web/pull/10692)
* Add docs for tabbed integration managers labs flag
[\#10641](https://github.com/vector-im/riot-web/pull/10641)
* Change integrations_widgets_urls default configuration
[\#10656](https://github.com/vector-im/riot-web/pull/10656)
* Add docs for the CIDER composer flag
[\#10638](https://github.com/vector-im/riot-web/pull/10638)
* add cider composer labs flag
[\#10626](https://github.com/vector-im/riot-web/pull/10626)
* Upgrade to Electron 6.0.3
[\#10601](https://github.com/vector-im/riot-web/pull/10601)
* Upgrade to Electron 6
[\#10596](https://github.com/vector-im/riot-web/pull/10596)
* Update from Weblate
[\#10591](https://github.com/vector-im/riot-web/pull/10591)
* Upgrade electron-builder to 21.2.0
[\#10579](https://github.com/vector-im/riot-web/pull/10579)
* Set SUID bit on chrome-sandbox for Debian
[\#10580](https://github.com/vector-im/riot-web/pull/10580)
* Load config.json before loading language so default can apply
[\#10551](https://github.com/vector-im/riot-web/pull/10551)
* Bump matrix-react-test-utils for React 16 compatibility
[\#10543](https://github.com/vector-im/riot-web/pull/10543)
* Add --help to electron app
[\#10530](https://github.com/vector-im/riot-web/pull/10530)
* Allow setting electron autoHideMenuBar and persist it
[\#10503](https://github.com/vector-im/riot-web/pull/10503)
* Upgrade dependencies
[\#10475](https://github.com/vector-im/riot-web/pull/10475)

Changes in [1.3.6](https://github.com/vector-im/riot-web/releases/tag/v1.3.6) (2019-09-19)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.5...v1.3.6)

* Fix origin migrator for SSO logins
[\#10920](https://github.com/vector-im/riot-web/pull/10920)

Changes in [1.3.5](https://github.com/vector-im/riot-web/releases/tag/v1.3.5) (2019-09-16)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.5-rc.3...v1.3.5)

* Updated js-sdk and react-sdk for some more minor bugfixes

Changes in [1.3.5-rc.3](https://github.com/vector-im/riot-web/releases/tag/v1.3.5-rc.3) (2019-09-13)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.5-rc.2...v1.3.5-rc.3)

* js-sdk rc.1 to include report API

Changes in [1.3.5-rc.2](https://github.com/vector-im/riot-web/releases/tag/v1.3.5-rc.2) (2019-09-13)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.5-rc.1...v1.3.5-rc.2)

* Pull in more fixes from react-sdk rc.2

Changes in [1.3.5-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.3.5-rc.1) (2019-09-12)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.4...v1.3.5-rc.1)

* Cosmetic fixes from react-sdk rc.1

Changes in [1.3.4](https://github.com/vector-im/riot-web/releases/tag/v1.3.4) (2019-09-12)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.3.4-rc.1...v1.3.4)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -27,9 +27,12 @@ released version of Riot:
Releases are signed using gpg and the OpenPGP standard, and can be checked against the public key located
at https://packages.riot.im/riot-release-key.asc.

Note that Chrome does not allow microphone or webcam access for sites served
over http (except localhost), so for working VoIP you will need to serve Riot
over https.
Note that for the security of your chats will need to serve Riot
over HTTPS. Major browsers also do not allow you to use VoIP/video
chats over HTTP, as WebRTC is only usable over HTTPS.
There are some exceptions like when using localhost, which is
considered a [secure context](https://developer.mozilla.org/docs/Web/Security/Secure_Contexts)
and thus allowed.

To install Riot as a desktop application, see [Running as a desktop
app](#running-as-a-desktop-app) below.
Expand Down
7 changes: 7 additions & 0 deletions config.sample.json
Expand Up @@ -15,6 +15,13 @@
"brand": "Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"defaultCountryCode": "GB",
Expand Down
13 changes: 11 additions & 2 deletions docs/config.md
Expand Up @@ -20,8 +20,8 @@ For a good example, see https://riot.im/develop/config.json.
if `default_hs_url` is used.
* The identity server is used for verifying third party identifiers like emails
and phone numbers. It is not used to store your password or account information.
If not provided, the identity server defaults to vector.im. Currently the only
two public identity servers are https://matrix.org and https://vector.im, however
If not provided, the identity server defaults to vector.im. Currently the only
two public identity servers are https://matrix.org and https://vector.im, however
in future identity servers will be decentralised. In the future it will be possible
to disable the identity server functionality.
* Riot will fail to load if a mix of `default_server_config`, `default_server_name`, or
Expand Down Expand Up @@ -80,6 +80,15 @@ For a good example, see https://riot.im/develop/config.json.
1. `defaultCountryCode`: The ISO 3166 alpha2 country code to use when showing
country selectors, like the phone number input on the registration page.
Defaults to `GB` if the given code is unknown or not provided.
1. `settingDefaults`: Defaults for settings that support the `config` level,
as an object mapping setting name to value (note that the "theme" setting
is special cased to the `default_theme` in the config file).
1. `disable_custom_urls`: disallow the user to change the
default homeserver when signing up or logging in.
1. `permalinkPrefix`: Used to change the URL that Riot generates permalinks with.
By default, this is "https://matrix.to" to generate matrix.to (spec) permalinks.
Set this to your Riot instance URL if you run an unfederated server (eg:
"https://riot.example.org").

Note that `index.html` also has an og:image meta tag that is set to an image
hosted on riot.im. This is the image used if links to your copy of Riot
Expand Down
9 changes: 9 additions & 0 deletions docs/labs.md
Expand Up @@ -45,3 +45,12 @@ Once enabled, send a custom state event to a room to set values:
```

That's it. Now should see your new counter under the header.

## New simple composer (`feature_cider_composer`)

An experimental, faster, message composer which should be more reliable and less prone to problems when
using your chosen input method.

## Multiple integration managers (`feature_many_integration_managers`)

Exposes a way to access all the integration managers known to Riot. This is an implementation of [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957).
53 changes: 53 additions & 0 deletions docs/memory-profiles-and-leaks.md
@@ -0,0 +1,53 @@
## Memory leaks

Riot usually emits slow behaviour just before it is about to crash. Getting a
memory snapshot (below) just before that happens is ideal in figuring out what
is going wrong.

Common symptoms are clicking on a room and it feels like the tab froze and scrolling
becoming jumpy/staggered.

If you receive a white screen (electron) or the chrome crash page, it is likely
run out of memory and it is too late for a memory profile. Please do report when
this happens though so we can try and narrow down what might have gone wrong.

## Memory profiles/snapshots

When investigating memory leaks/problems it's usually important to compare snapshots
from different points in the Riot session lifecycle. Most importantly, a snapshot
to establish the baseline or "normal" memory usage is useful. Taking a snapshot
roughly 30-60 minutes after starting Riot is a good time to establish "normal"
memory usage for the app - anything after that is at risk of hiding the memory leak
and anything newer is still in the warmup stages of the app.

**Memory profiles can contain sensitive information.** If you are submitting a memory
profile to us for debugging purposes, please pick the appropriate Riot developer and
send them over an encrypted private message. *Do not share your memory profile in
public channels or with people you do not trust.*

### Taking a memory profile (Firefox)

1. Press CTRL+SHIFT+I (I as in eye).
2. Click the Memory tab.
3. Press the camera icon in the top left of the pane.
4. Wait a bit (coffee is a good option).
5. When the save button appears on the left side of the panel, click it to save the
profile locally.
6. Compress the file (gzip or regular zip) to make the file smaller.
7. Send the compressed file to whoever asked for it (if you trust them).

While the profile is in progress, the tab might be frozen or unresponsive.

### Taking a memory profile (Chrome/Desktop)

1. Press CTRL+SHIFT+I (I as in eye).
2. Click the Memory tab.
3. Select "Heap Snapshot" and the riot.im VM instance (not the indexeddb one).
4. Click "Take Snapshot".
5. Wait a bit (coffee is a good option).
6. When the save button appears on the left side of the panel, click it to save the
profile locally.
7. Compress the file (gzip or regular zip) to make the file smaller.
8. Send the compressed file to whoever asked for it (if you trust them).

While the profile is in progress, the tab might be frozen or unresponsive.
4 changes: 3 additions & 1 deletion docs/shortcuts.md
Expand Up @@ -6,6 +6,8 @@ The modifier is <kbd>Ctrl</kbd> on Windows & Linux and <kbd>⌘</kbd> on Mac.
- <kbd>Ctrl</kbd>/<kbd>⌘</kbd>+<kbd>d</kbd> - toggle mic mute
- <kbd>Ctrl</kbd>/<kbd>⌘</kbd>+<kbd>e</kbd> - toggle video on/off
- <kbd>Ctrl</kbd>/<kbd>⌘</kbd>+<kbd>k</kbd> - jump to named room
- <kbd>↑</kbd>/<kbd>↓</kbd> - navigate within room list
- <kbd>↑</kbd>/<kbd>↓</kbd> - navigate old messages to edit when the composer is in focus
- <kbd>↑</kbd>/<kbd>↓</kbd> - next/prev room when focus in room list
- <kbd>Alt</kbd>+<kbd>↑</kbd>/<kbd>↓</kbd> - resend previous messages when the composer is in focus
- <kbd>PageUp</kbd>/<kbd>PageDown</kbd> - scroll timeline up/down
- <kbd>Ctrl</kbd>/<kbd>⌘</kbd>+<kbd>Home</kbd>/<kbd>End</kbd> - jump to timeline start/end
2 changes: 1 addition & 1 deletion electron_app/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "src/electron-main.js",
"version": "1.3.4",
"version": "1.4.2",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"dependencies": {
Expand Down
6 changes: 4 additions & 2 deletions electron_app/riot.im/config.json
Expand Up @@ -6,9 +6,11 @@
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api",
"https://scalar.vector.im/api"
"https://scalar-staging.riot.im/scalar/api"
],
"hosting_signup_link": "https://modular.im/?utm_source=riot-web&utm_medium=web",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
Expand Down
28 changes: 26 additions & 2 deletions electron_app/src/electron-main.js
Expand Up @@ -23,7 +23,10 @@ limitations under the License.
const checkSquirrelHooks = require('./squirrelhooks');
if (checkSquirrelHooks()) return;

const argv = require('minimist')(process.argv);
const argv = require('minimist')(process.argv, {
alias: {help: "h"},
});

const {app, ipcMain, powerSaveBlocker, BrowserWindow, Menu, autoUpdater, protocol} = require('electron');
const AutoLaunch = require('auto-launch');
const path = require('path');
Expand All @@ -37,6 +40,19 @@ const { migrateFromOldOrigin } = require('./originMigrator');
const windowStateKeeper = require('electron-window-state');
const Store = require('electron-store');

if (argv["help"]) {
console.log("Options:");
console.log(" --profile-dir {path}: Path to where to store the profile.");
console.log(" --profile {name}: Name of alternate profile to use, allows for running multiple accounts.");
console.log(" --devtools: Install and use react-devtools and react-perf.");
console.log(" --no-update: Disable automatic updating.");
console.log(" --hidden: Start the application hidden in the system tray.");
console.log(" --help: Displays this help message.");
console.log("And more such as --proxy, see:" +
"https://github.com/electron/electron/blob/master/docs/api/chrome-command-line-switches.md");
app.exit();
}

// boolean flag set whilst we are doing one-time origin migration
// We only serve the origin migration script while we're actually
// migrating to mitigate any risk of it being used maliciously.
Expand Down Expand Up @@ -156,6 +172,14 @@ ipcMain.on('ipcCall', async function(ev, payload) {
case 'setMinimizeToTrayEnabled':
store.set('minimizeToTray', global.minimizeToTray = args[0]);
break;
case 'getAutoHideMenuBarEnabled':
ret = global.mainWindow.isMenuBarAutoHide();
break;
case 'setAutoHideMenuBarEnabled':
store.set('autoHideMenuBar', args[0]);
global.mainWindow.setAutoHideMenuBar(args[0]);
global.mainWindow.setMenuBarVisibility(!args[0]);
break;
case 'getAppVersion':
ret = app.getVersion();
break;
Expand Down Expand Up @@ -320,7 +344,7 @@ app.on('ready', () => {
mainWindow = global.mainWindow = new BrowserWindow({
icon: iconPath,
show: false,
autoHideMenuBar: true,
autoHideMenuBar: store.get('autoHideMenuBar', true),

x: mainWindowState.x,
y: mainWindowState.y,
Expand Down
18 changes: 14 additions & 4 deletions electron_app/src/originMigrator.js
Expand Up @@ -33,7 +33,11 @@ async function migrateFromOldOrigin() {
webgl: false,
},
});
ipcMain.on('origin_migration_complete', (e, success, sentSummary, storedSummary) => {
const onOriginMigrationComplete = (e, success, sentSummary, storedSummary) => {
// we use once but we'll only get one of these events,
// so remove the listener for the other one
ipcMain.removeListener('origin_migration_nodata', onOriginMigrationNoData);

if (success) {
console.log("Origin migration completed successfully!");
} else {
Expand All @@ -43,12 +47,18 @@ async function migrateFromOldOrigin() {
console.error("Data stored", storedSummary);
migrateWindow.close();
resolve();
});
ipcMain.on('origin_migration_nodata', (e) => {
};
const onOriginMigrationNoData = (e, success, sentSummary, storedSummary) => {
ipcMain.removeListener('origin_migration_complete', onOriginMigrationComplete);

console.log("No session to migrate from old origin");
migrateWindow.close();
resolve();
});
};

ipcMain.once('origin_migration_complete', onOriginMigrationComplete);
ipcMain.once('origin_migration_nodata', onOriginMigrationNoData);

// Normalise the path because in the distribution, __dirname will be inside the
// electron asar.
const sourcePagePath = path.normalize(__dirname + '/../../origin_migrator/source.html');
Expand Down

0 comments on commit 3b5c649

Please sign in to comment.