question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Since riot-web 1.2.2, client errors "Your Riot is misconfigured Invalid configuration: no default server specified."

See original GitHub issue

Description

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.

image

Previously, in 1.2.0 and 1.2.1, the application loaded fine, and you’d be greeted with this, as expected.

Screenshot_20190719_183056

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:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

3reactions
jryanscommented, Jul 19, 2019

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:

cp electron_app/riot.im/config.json .

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 out update_base_url with jq or a similar JSON tool.

1reaction
jryanscommented, Jul 20, 2019

Is there any plan to enable it on Linux in the future?

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. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Since riot-web 1.2.2, client errors "Your Riot is misconfigured ...
Since riot-web 1.2.2, client errors "Your Riot is misconfigured Invalid configuration: no default server specified." #10373.
Read more >
T8296 Riot: invalid default configuration - Solus
Description. Riot gives the following error on a (clean) startup: Your Riot is misconfigured. Invalid configuration: no default server specified.
Read more >
Solved Trying to configure element with custom background
This was the last setup i tried but still no dice. Error shows: Your Element is misconfigured. Your Element configuration contains invalid ......
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
Server and Client. ... Unfortunately, your OS is not supported by the PCI Library" ... Bug:436680 - "app-admin/webapp-config wrong permissions for ...
Read more >
matrix-react-sdk - UNPKG
The CDN for matrix-react-sdk.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found