Since riot-web 1.2.2, client errors "Your Riot is misconfigured Invalid configuration: no default server specified."
See original GitHub issueDescription
I packaged up riot-web as a snap to make it super easy to install on Linux. snap install riot-web
works. I have done this since 1.2.0, which worked well. However, since 1.2.2, the client presents this error on first launch for a user who has clean installed the application.
Previously, in 1.2.0 and 1.2.1, the application loaded fine, and you’d be greeted with this, as expected.
Here’s the terminal output when launching.
alan@KinkPad-K450:~$ riot-web
No update_base_url is defined: auto update is disabled
Attempting to migrate data between origins
Loading path: /snap/riot-web/10/resources/origin_migrator/source.html
No session to migrate from old origin
There are approximately 1K users with the snap installed. Anything above 1.2.1 fails to launch if it’s newly installed. If the application was installed at 1.2.0 or 1.2.1 and updated to 1.2.2 or above, the user is fine.
Steps to reproduce
On a system which supports snaps.
snap install riot-web
Or follow the instructions at https://snapcraft.io/riot-web
In a terminal run riot-web
.
You’ll see the first screenshot above.
I’m building inside a clean Ubuntu 16.04.6 lxc container, using a simple script which modifies the package.json
to enable snap builds. Here’s the diff showing the changes I make.
root@riot-web-20190719-174241:~/riot-web# git diff package.json
diff --git a/package.json b/package.json
index 13f3249..315185e 100644
--- a/package.json
+++ b/package.json
@@ -82,7 +82,8 @@
"react-dom": "^15.6.0",
"sanitize-html": "^1.19.1",
"ua-parser-js": "^0.7.19",
- "url": "^0.11.0"
+ "url": "^0.11.0",
+ "electron-updater": "^4.0.0"
},
"devDependencies": {
"autoprefixer": "^6.6.0",
@@ -167,7 +168,7 @@
"origin_migrator/**/*"
],
"linux": {
- "target": "deb",
+ "target": "snap",
"category": "Network;InstantMessaging;Chat",
"maintainer": "support@riot.im",
"desktop": {
@@ -186,6 +187,18 @@
"buildResources": "electron_app/build",
"output": "electron_app/dist",
"app": "electron_app"
+ },
+ "snap": {
+ "environment": {
+ "DISABLE_WAYLAND": "1",
+ "WAYLAND_DISPLAY": "no-display",
+ "XDG_CURRENT_DESKTOP": "Unity"
+ },
+ "plugs": [
+ "default",
+ "wayland",
+ "camera"
+ ]
}
}
}
I then build using the following commands, with node 10.16.
yarn install
yarn dist
yarn run build:electron:linux
The snap ends up in electron_app/dist/*.snap
which can be manually installed via snap install riot-web_1.3.0_amd64.snap --dangerous
(the --dangerous
is only needed if you’re installing manually rather than a signed package from the store).
I’d expect 1.2.2 and above to behave the same way 1.2.0 did, which enables new users to sign into a remote matrix instance.
I have tested each release and only 1.22 and above have this issue.
Version information
- Platform: desktop
For the desktop app:
- OS: KDE Neon, but other distros are affected similarly.
- Version: 1.2.2 through 1.3.0 is affected
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Thanks for filing an issue. (I’ve actually been trying to reach you on Twitter about this!)
Recent versions of Riot now require a default server to be configured because simply opening Riot actually creates a guest account, and we want self-hosted installs of the webapp to make a conscious choice about which homeserver that connection goes to.
However, for your snaps, you most likely want to arrive at something similar to our Debian packages of the Electron app. I think the key difference between your steps and the ones we use for our Debian packages, is we do something equivalent to:
before building, which will default to matrix.org homeserver among other settings. You likely want the same content, but with the key
update_base_url
removed (so that the built-in updater is disabled).We regularly change this file each version, so it would be best to start from the content in
electron_app/riot.im/config.json
and strip outupdate_base_url
withjq
or a similar JSON tool.I am not aware of any plans to do so via the Electron app directly. I believe most Linux users would prefer updating via some package like deb, snap, appimage, etc. I’ll keep a note to be sure to contact you in case plans change. 😄