Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most config options can't be overridden by custom config.json on desktop #9476

Closed
targodan opened this issue Apr 15, 2019 · 10 comments · Fixed by #10181
Closed

Most config options can't be overridden by custom config.json on desktop #9476

targodan opened this issue Apr 15, 2019 · 10 comments · Fixed by #10181
Assignees
Labels
A-Electron P1 T-Defect Z-Community-PR Issue is solved by a community member's PR

Comments

@targodan
Copy link

targodan commented Apr 15, 2019

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
@Ryonez
Copy link

Ryonez commented Apr 15, 2019

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.

@jryans
Copy link
Collaborator

jryans commented Apr 15, 2019

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

@targodan
Copy link
Author

$XDG_CONFIG_HOME is empty

@targodan
Copy link
Author

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

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.

@t3chguy
Copy link
Member

t3chguy commented Apr 15, 2019

This is because of #9386 (comment)

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

@targodan
Copy link
Author

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

Thanks for your fast answer @t3chguy 👍

@Ryonez
Copy link

Ryonez commented Apr 15, 2019

Sweet! Thank you.

@Ryonez
Copy link

Ryonez commented May 7, 2019

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

@jryans jryans changed the title Integrations URLs can't be overwritten by config.json on desktop Most config options can't be changed by config.json on desktop Jun 19, 2019
@jryans jryans changed the title Most config options can't be changed by config.json on desktop Most config options can't be overridden by custom config.json on desktop Jun 19, 2019
@t3chguy t3chguy self-assigned this Jun 26, 2019
@turt2live turt2live added the Z-Community-PR Issue is solved by a community member's PR label Jun 26, 2019
@Ryonez
Copy link

Ryonez commented Jun 27, 2019

Yay!

@t3chguy
Copy link
Member

t3chguy commented Jun 27, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Electron P1 T-Defect Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants