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

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

Closed
popey opened this issue Jul 19, 2019 · 9 comments
Labels
A-Electron A-Packaging Packaging, signing, releasing T-Other Questions, user support, anything else

Comments

@popey
Copy link

popey commented Jul 19, 2019

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
@popey popey added the T-Defect label Jul 19, 2019
@jryans
Copy link
Collaborator

jryans commented 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.

@jryans jryans added T-Other Questions, user support, anything else A-Electron and removed T-Defect labels Jul 19, 2019
@eingemaischt
Copy link

I started the conversation on twitter.

I installed a homeserver on my own and tried to use the snap to test it - I wanted to use snap to get a sandboxed version of riot-web. I'm not really fine with third party apt-repositories...

If you may give the chance to enter a homeserver url on the first startup....

@popey
Copy link
Author

popey commented Jul 19, 2019

Terribly sorry I didn't get back to you on twitter. Thanks so much to you both for raising the issue. I have updated the build script with the recommendations from @jryans and pushed version 1.3.0 (revision 11) to the stable channel. Tested locally and works as expected.

Thanks again!

@popey popey closed this as completed Jul 19, 2019
@jryans
Copy link
Collaborator

jryans commented Jul 19, 2019

I just remembered that the updater is always disabled for Linux anyway... 😅 So, you could just copy the file and be done. Sorry for inventing extra steps...

@popey
Copy link
Author

popey commented Jul 20, 2019

Hah! It's a one-line sed, I'll remove it, putting the line back, vanilla.

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

@jryans
Copy link
Collaborator

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

@jryans jryans added the A-Packaging Packaging, signing, releasing label Jul 29, 2019
@jaenulton
Copy link

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.

@jryans Please do not take offense to my reasoning or lack of... First kudos on using Electron, I love it too. I downloaded the DMG of v1.5.6 and have the same error. Being a developer I understand what needs to be done to remedy this. But from the perspective of a typical user (or someone just wanting to test it out I think this is not a good thing. I was merely wanting to see what it looked like on a 'native app' but there are no options built into the menu to define the server of choice.

Obviously, if I were an admin and planning to distribute the app I would want to define the homeserver in the background (possibly not even introducing the confusion of additional servers, especially if it were being rebranded or what not). But I wonder why push out a .dmg at all if it can't be used for testing without recompiling? I mean if we need to be pressing out our own .dmg after a minor tweak to the json file why were the dmg files even published since this change? I am just curious, not trying to sound impolite.

Is the goal just to have those testing to simply use the web app? Aside from the menu I would assume the web version is virtually the same, yes?

Again great work, looking forward to getting under the hood soon and walking away from rocketchat.

@lijianl
Copy link

lijianl commented Mar 30, 2020

https://riot.im/app/ opened via chrome, also "Invalid homeserver discovery response", how to solve this situation

@jryans
Copy link
Collaborator

jryans commented Mar 30, 2020

https://riot.im/app/ opened via chrome, also "Invalid homeserver discovery response", how to solve this situation

If you are visiting that URL and seeing an error, it sounds different to this issue, so please file a new one with more details.

su-ex added a commit to SchildiChat/element-web that referenced this issue Apr 21, 2023
* Allow desktop app to expose recent rooms in UI integrations ([\element-hq#16940](element-hq#16940)).
* Add API params to mute audio and/or video in Jitsi calls by default ([\element-hq#24820](element-hq#24820)). Contributed by @dhenneke.
* Style mentions as pills in rich text editor ([\element-hq#10448](matrix-org/matrix-react-sdk#10448)). Contributed by @alunturner.
* Show room create icon if "UIComponent.roomCreation" is enabled ([\element-hq#10364](matrix-org/matrix-react-sdk#10364)). Contributed by @maheichyk.
* Mentions as links rte ([\element-hq#10463](matrix-org/matrix-react-sdk#10463)). Contributed by @alunturner.
* Better error handling in jump to date ([\element-hq#10405](matrix-org/matrix-react-sdk#10405)). Contributed by @MadLittleMods.
* Show "Invite" menu option if "UIComponent.sendInvites" is enabled. ([\element-hq#10363](matrix-org/matrix-react-sdk#10363)). Contributed by @maheichyk.
* Added `UserProfilesStore`, `LruCache` and user permalink profile caching ([\element-hq#10425](matrix-org/matrix-react-sdk#10425)). Fixes element-hq#10559.
* Mentions as links rte ([\element-hq#10422](matrix-org/matrix-react-sdk#10422)). Contributed by @alunturner.
* Implement MSC3952: intentional mentions ([\element-hq#9983](matrix-org/matrix-react-sdk#9983)).
* Implement MSC3973: Search users in the user directory with the Widget API ([\element-hq#10269](matrix-org/matrix-react-sdk#10269)). Contributed by @dhenneke.
* Permalinks to message are now displayed as pills ([\element-hq#10392](matrix-org/matrix-react-sdk#10392)). Fixes element-hq#24751 and element-hq#24706.
* Show search,dial,explore in filterContainer if "UIComponent.filterContainer" is enabled ([\element-hq#10381](matrix-org/matrix-react-sdk#10381)). Contributed by @maheichyk.
* Increase space panel collapse clickable area ([\element-hq#6084](matrix-org/matrix-react-sdk#6084)). Fixes element-hq#17379. Contributed by @jaiwanth-v.
* Add fallback for replies to Polls ([\element-hq#10380](matrix-org/matrix-react-sdk#10380)). Fixes element-hq#24197. Contributed by @kerryarchibald.
* Permalinks to rooms and users are now pillified ([\element-hq#10388](matrix-org/matrix-react-sdk#10388)). Fixes element-hq#24825.
* Poll history -  access poll history from room settings ([\element-hq#10356](matrix-org/matrix-react-sdk#10356)). Contributed by @kerryarchibald.
* Add API params to mute audio and/or video in Jitsi calls by default ([\element-hq#10376](matrix-org/matrix-react-sdk#10376)). Contributed by @dhenneke.
* Notifications: inline error message on notifications saving error ([\#10288](matrix-org/matrix-react-sdk#10288)). Contributed by @kerryarchibald.
* Support dynamic room predecessor in SpaceProvider ([\element-hq#10348](matrix-org/matrix-react-sdk#10348)). Contributed by @andybalaam.
* Support dynamic room predecessors for RoomProvider ([\element-hq#10346](matrix-org/matrix-react-sdk#10346)). Contributed by @andybalaam.
* Support dynamic room predecessors in OwnBeaconStore ([\element-hq#10339](matrix-org/matrix-react-sdk#10339)). Contributed by @andybalaam.
* Support dynamic room predecessors in ForwardDialog ([\element-hq#10344](matrix-org/matrix-react-sdk#10344)). Contributed by @andybalaam.
* Support dynamic room predecessors in SpaceHierarchy ([\element-hq#10341](matrix-org/matrix-react-sdk#10341)). Contributed by @andybalaam.
* Support dynamic room predecessors in AddExistingToSpaceDialog ([\element-hq#10342](matrix-org/matrix-react-sdk#10342)). Contributed by @andybalaam.
* Support dynamic room predecessors in leave-behaviour ([\#10340](matrix-org/matrix-react-sdk#10340)). Contributed by @andybalaam.
* Support dynamic room predecessors in StopGapWidgetDriver ([\element-hq#10338](matrix-org/matrix-react-sdk#10338)). Contributed by @andybalaam.
* Support dynamic room predecessors in WidgetLayoutStore ([\element-hq#10326](matrix-org/matrix-react-sdk#10326)). Contributed by @andybalaam.
* Support dynamic room predecessors in SpaceStore ([\element-hq#10332](matrix-org/matrix-react-sdk#10332)). Contributed by @andybalaam.
* Sync polls push rules on changes to account_data ([\element-hq#10287](matrix-org/matrix-react-sdk#10287)). Contributed by @kerryarchibald.
* Support dynamic room predecessors in BreadcrumbsStore ([\element-hq#10295](matrix-org/matrix-react-sdk#10295)). Contributed by @andybalaam.
* Improved a11y for Field feedback and Secure Phrase input ([\element-hq#10320](matrix-org/matrix-react-sdk#10320)). Contributed by @Sebbones.
* Support dynamic room predecessors in RoomNotificationStateStore ([\#10297](matrix-org/matrix-react-sdk#10297)). Contributed by @andybalaam.
* Use a newly generated access_token while joining Jitsi ([\element-hq#24646](element-hq#24646)). Fixes element-hq#24687. Contributed by @emrahcom.
* Fix cloudflare action pointing at commit hash instead of tag ([\element-hq#24777](element-hq#24777)). Contributed by @justjanne.
* Allow editing with RTE to overflow for autocomplete visibility ([\element-hq#10499](matrix-org/matrix-react-sdk#10499)). Contributed by @alunturner.
* Added auto focus to Github URL on opening of debug logs modal ([\element-hq#10479](matrix-org/matrix-react-sdk#10479)). Contributed by @ShivamSpm.
* Fix detection of encryption for all users in a room ([\#10487](matrix-org/matrix-react-sdk#10487)). Fixes element-hq#24995.
* Properly generate mentions when editing a reply with MSC3952 ([\element-hq#10486](matrix-org/matrix-react-sdk#10486)). Fixes element-hq#24924. Contributed by @kerryarchibald.
* Improve performance of rendering a room with many hidden events ([\#10131](matrix-org/matrix-react-sdk#10131)). Contributed by @andybalaam.
* Prevent future date selection in jump to date ([\element-hq#10419](matrix-org/matrix-react-sdk#10419)). Fixes element-hq#20800. Contributed by @MadLittleMods.
* Add aria labels to message search bar to improve accessibility ([\element-hq#10476](matrix-org/matrix-react-sdk#10476)). Fixes element-hq#24921.
* Fix decryption failure bar covering the timeline ([\element-hq#10360](matrix-org/matrix-react-sdk#10360)). Fixes element-hq#24780 element-hq#24074 and element-hq#24183. Contributed by @luixxiul.
* Improve profile picture settings accessibility ([\element-hq#10470](matrix-org/matrix-react-sdk#10470)). Fixes element-hq#24919.
* Handle group call redaction ([\element-hq#10465](matrix-org/matrix-react-sdk#10465)).
* Display relative timestamp for threads on the same calendar day ([\#10399](matrix-org/matrix-react-sdk#10399)). Fixes element-hq#24841. Contributed by @kerryarchibald.
* Fix timeline list and paragraph display issues ([\element-hq#10424](matrix-org/matrix-react-sdk#10424)). Fixes element-hq#24602. Contributed by @alunturner.
* Use unique keys for voice broadcast pips ([\element-hq#10457](matrix-org/matrix-react-sdk#10457)). Fixes element-hq#24959.
* Fix "show read receipts sent by other users" not applying to threads ([\element-hq#10445](matrix-org/matrix-react-sdk#10445)). Fixes element-hq#24910.
* Fix joining public rooms without aliases in search dialog ([\element-hq#10437](matrix-org/matrix-react-sdk#10437)). Fixes element-hq#23937.
* Add input validation for `m.direct` in `DMRoomMap` ([\element-hq#10436](matrix-org/matrix-react-sdk#10436)). Fixes element-hq#24909.
* Reduce height reserved for "collapse" button's line on IRC layout ([\element-hq#10211](matrix-org/matrix-react-sdk#10211)). Fixes element-hq#24605. Contributed by @luixxiul.
* Fix `creatorUserId is required` error when opening sticker picker ([\element-hq#10423](matrix-org/matrix-react-sdk#10423)).
* Fix block/inline Element descendants error noise in `NewRoomIntro.tsx` ([\element-hq#10412](matrix-org/matrix-react-sdk#10412)). Contributed by @MadLittleMods.
* Fix profile resizer to make first character of a line selectable in IRC layout ([\element-hq#10396](matrix-org/matrix-react-sdk#10396)). Fixes element-hq#14764. Contributed by @luixxiul.
* Ensure space between wrapped lines of room name on IRC layout ([\#10188](matrix-org/matrix-react-sdk#10188)). Fixes element-hq#24742. Contributed by @luixxiul.
* Remove unreadable alt attribute from the room status bar warning icon (nonsense to screenreaders) ([\element-hq#10402](matrix-org/matrix-react-sdk#10402)). Contributed by @MadLittleMods.
* Fix big date separators when jump to date is enabled ([\element-hq#10404](matrix-org/matrix-react-sdk#10404)). Fixes element-hq#22969. Contributed by @MadLittleMods.
* Fixes user authentication when registering via the module API ([\element-hq#10257](matrix-org/matrix-react-sdk#10257)). Contributed by @maheichyk.
* Handle more edge cases in Space Hierarchy ([\element-hq#10280](matrix-org/matrix-react-sdk#10280)). Contributed by @justjanne.
* Further improve performance with lots of hidden events ([\element-hq#10353](matrix-org/matrix-react-sdk#10353)). Fixes element-hq#24480. Contributed by @andybalaam.
* Respect user cancelling upload flow by dismissing spinner ([\element-hq#10373](matrix-org/matrix-react-sdk#10373)). Fixes element-hq#24667.
* When starting a DM, the end-to-end encryption status icon does now only appear if the DM can be encrypted ([\element-hq#10394](matrix-org/matrix-react-sdk#10394)). Fixes element-hq#24397.
* Fix `[object Object]` in feedback metadata ([\element-hq#10390](matrix-org/matrix-react-sdk#10390)).
* Fix pinned messages card saying nothing pinned while loading ([\#10385](matrix-org/matrix-react-sdk#10385)). Fixes element-hq#24615.
* Fix import e2e key dialog staying disabled after paste ([\element-hq#10375](matrix-org/matrix-react-sdk#10375)). Fixes element-hq#24818.
* Show all labs even if incompatible, with appropriate tooltip explaining requirements ([\element-hq#10369](matrix-org/matrix-react-sdk#10369)). Fixes element-hq#24813.
* Fix UIFeature.Registration not applying to all paths ([\element-hq#10371](matrix-org/matrix-react-sdk#10371)). Fixes element-hq#24814.
* Clicking on a user pill does now only open the profile in the right panel and no longer navigates to the home view. ([\element-hq#10359](matrix-org/matrix-react-sdk#10359)). Fixes element-hq#24797.
* Fix start DM with pending third party invite ([\element-hq#10347](matrix-org/matrix-react-sdk#10347)). Fixes element-hq#24781.
* Fix long display name overflowing reply tile on IRC layout ([\element-hq#10343](matrix-org/matrix-react-sdk#10343)). Fixes element-hq#24738. Contributed by @luixxiul.
* Display redacted body on ThreadView in the same way as normal messages ([\element-hq#9016](matrix-org/matrix-react-sdk#9016)). Fixes element-hq#24729. Contributed by @luixxiul.
* Handle more edge cases in ACL updates ([\element-hq#10279](matrix-org/matrix-react-sdk#10279)). Contributed by @justjanne.
* Allow parsing png files to fail if thumbnailing is successful ([\element-hq#10308](matrix-org/matrix-react-sdk#10308)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Electron A-Packaging Packaging, signing, releasing T-Other Questions, user support, anything else
Projects
None yet
Development

No branches or pull requests

5 participants