Element-web: Most config options can't be overridden by custom config.json on desktop

Created on 15 Apr 2019  Â·  10Comments  Â·  Source: vector-im/element-web

Description

The config.json overrides as described in the readme do not seem to work for integrations.

I just tried to change the integrations urls to my own dimension instance, using the approach described in the readme on linux without success. It still tried connecting to scalar.vector.im.

When I copied the very same config.json to /usr/share/webapps/riot (which is where arch stores the riot files) it worked straight away. Integrations with my server work on my riot-web instance too. When I brought this up in #riot:matrix.org someone else reported the config.json overrides not working on windows either.

Setting the default_hs_url also seems to have had no effect.

Here's the relevant part of my particular config.json just for completeness:

{
    "default_hs_url": "https://targodan.de",
    "default_is_url": "https://vector.im",
    "integrations_ui_url": "https://integrations.targodan.de/riot",
    "integrations_rest_url": "https://integrations.targodan.de/api/v1/scalar",
    "integrations_widgets_urls": ["https://integrations.targodan.de/widgets"],
    "integrations_jitsi_widget_url": "https://integrations.targodan.de/widgets/jitsi"
}

Steps to reproduce

  • Host your own HS
  • Host a dimension instance
  • Try to set the integrations urls to your dimension instance in the config.json of the desktop app, as described in the readme
  • Riot still tries to use the scalar.vector.im integrations server.

Edit: These steps are probably sufficient

  • Install riot desktop
  • Try to overwrite integrations urls in the config.json in ~/.config/Riot/config.json
  • Restart riot and login
  • Check the console which server url is used

I expect Riot to use my integrations server when I tell it to.

Log: not sent

Version information

  • Platform: desktop

For the desktop app:

  • OS: Arch Linux
  • Version: 1.0.7
Community PR bug p1 electron

Most helpful comment

I had a brainwave after a small alcoholic beverage on how to do this cleanly :D
Hopefully it does as intended, let me know if you have any issues after the next release

All 10 comments

I'm the fella who reported the same issue on windows.
Placing the config in the place instructions direct you to, or in a folder and using the profile tag, doesn't work, bar for the 'bind' variable.

Editing the configuration does yield some more results, but still ignores most of the flags.

Sorry, but I'm just getting into bed, I can add flags and folder locations tomorrow.

Intergrations are only one symptom of the problem I believe.

@targodan Just in case it matters here, what's $XDG_CONFIG_HOME for you?

$XDG_CONFIG_HOME is empty

Here's some more information about the ArchLinux package:

  • I installed it via pacman -S riot-desktop, which installs the riot-web package as a dependency
  • I start riot via riot-desktop which is a script with the following content
#!/bin/bash

electron /usr/lib/riot/ "$@"

Here's the directory listing of /usr/lib/riot

drwxr-xr-x 5 root root 4.0K Jun  6  2018 electron_app
drwxr-xr-x 3 root root 4.0K Apr 15 12:28 origin_migrator
-rw-r--r-- 1 root root 6.9K Apr  8 17:04 package.json
lrwxrwxrwx 1 root root   23 Apr  8 17:04 webapp -> /usr/share/webapps/riot

and here the ls of /usr/share/webapps/riot

```drwxr-xr-x 3 root root 4.0K Apr 15 12:28 bundles
lrwxrwxrwx 1 root root 29 Apr 8 17:04 config.json -> /etc/webapps/riot/config.json
drwxr-xr-x 4 root root 4.0K Jun 6 2018 emojione
drwxr-xr-x 4 root root 4.0K Feb 22 12:59 fonts
drwxr-xr-x 2 root root 4.0K Apr 15 12:28 i18n
drwxr-xr-x 6 root root 12K Apr 15 12:28 img
-rw-r--r-- 1 root root 3.6K Apr 8 17:04 index.html
-rw-r--r-- 1 root root 1.6K Apr 8 17:04 manifest.json
drwxr-xr-x 2 root root 4.0K Apr 15 12:28 media
drwxr-xr-x 2 root root 4.0K Apr 15 12:28 mobile_guide
-rw-r--r-- 1 root root 167K Apr 8 17:04 olm.3ce9b58.wasm
-rw-r--r-- 1 root root 400K Apr 8 17:04 olm_legacy.js
drwxr-xr-x 3 root root 4.0K Feb 22 12:59 themes
drwxr-xr-x 2 root root 4.0K Apr 15 12:28 vector-icons
-rw-r--r-- 1 root root 6 Apr 8 17:04 version
drwxr-xr-x 3 root root 4.0K Feb 22 12:59 welcome
-rw-r--r-- 1 root root 5.0K Apr 8 17:04 welcome.html


Aaaand `/etc/riot` looks like this:

lrwxrwxrwx 1 root root 21 Apr 8 17:04 config.json -> /etc/riot/config.json
-rw-r--r-- 1 root root 1.1K Apr 8 17:04 config.sample.json
```

And finally /etc/riot only contains the actual config.json file, which in order to get it working I have overwritten with my config.

So it's quite the clusterfuck of links in links in links.

This is because of https://github.com/vector-im/riot-web/issues/9386#issuecomment-483210105

When writing the feature the only things I had in my head were update URLs, which is what the original issue called for IIRC. This is an oversight and will be fixed when I get the chance

Alright, great to hear it's on the list. :smiley:

Thanks for your fast answer @t3chguy :+1:

Sweet! Thank you.

Just going to point out the latest update hasn't corrected this.

Yay!

I had a brainwave after a small alcoholic beverage on how to do this cleanly :D
Hopefully it does as intended, let me know if you have any issues after the next release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nvbln picture nvbln  Â·  3Comments

ara4n picture ara4n  Â·  3Comments

lukebarnard1 picture lukebarnard1  Â·  3Comments

grahamperrin picture grahamperrin  Â·  3Comments

richvdh picture richvdh  Â·  3Comments