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

Problems running the desktop client on Arch Linux #2792

Closed
joelostblom opened this issue Dec 22, 2016 · 5 comments
Closed

Problems running the desktop client on Arch Linux #2792

joelostblom opened this issue Dec 22, 2016 · 5 comments

Comments

@joelostblom
Copy link
Contributor

Hi,
I am having troubles installing the Riot desktop client on Arch Linux. I cloned the the git repo (latest, tag 0.9.3), navigated into the base directory and ran

npm install
npm install electron
node_modules/.bin/electron .

This launches a white empty window, titled Riot, and with a working menu bar. The following message is outputted to the console upon launching the window

No update_base_url is defined: auto update is disabled

I did not observe any error during the install, but there were some warnings. I don't have much experience with npm or electron, so I am looking for some help troubleshooting this.

The full installation message was

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higherto avoid a RegExp DoS issue
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use@segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN prefer global coffee-script@1.12.2 should be installed with -g
npm WARN prefer global marked@0.3.6 should be installed with -g

> phantomjs-prebuilt@2.1.14 install /home/joel/stuffandthings/others-packages/riot-web/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
  [=======================================-] 99%
Received 22866K total.
Extracting tar contents (via spawned process)
Removing /home/joel/stuffandthings/others-packages/riot-web/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1482423133539/phantomjs-2.1.1-linux-x86_64 -> /home/joel/stuffandthings/others-packages/riot-we
b/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /home/joel/stuffandthings/others-packages/riot-web/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts will run only for `npm publish`.
npm WARN prepublish-on-install (In npm@4 and previous versions, it also runs for `npm install`.)
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> riot-web@0.9.3 prepublish /home/joel/stuffandthings/others-packages/riot-web
> npm run build:compile


> riot-web@0.9.3 build:compile /home/joel/stuffandthings/others-packages/riot-web
> babel --source-maps -d lib src

src/VectorConferenceHandler.js -> lib/VectorConferenceHandler.js
src/component-index.js -> lib/component-index.js
src/components/structures/BottomLeftMenu.js -> lib/components/structures/BottomLeftMenu.js
src/components/structures/CompatibilityPage.js -> lib/components/structures/CompatibilityPage.js
src/components/structures/LeftPanel.js -> lib/components/structures/LeftPanel.js
src/components/structures/RightPanel.js -> lib/components/structures/RightPanel.js
src/components/structures/RoomDirectory.js -> lib/components/structures/RoomDirectory.js
src/components/structures/RoomSubList.js -> lib/components/structures/RoomSubList.js
src/components/structures/SearchBox.js -> lib/components/structures/SearchBox.js
src/components/structures/ViewSource.js -> lib/components/structures/ViewSource.js
src/components/views/context_menus/MessageContextMenu.js -> lib/components/views/context_menus/MessageContextMenu.js
src/components/views/context_menus/NotificationStateContextMenu.js -> lib/components/views/context_menus/NotificationStateContextMenu.js
src/components/views/context_menus/RoomTagContextMenu.js -> lib/components/views/context_menus/RoomTagContextMenu.js
src/components/views/dialogs/ChangelogDialog.js -> lib/components/views/dialogs/ChangelogDialog.js
src/components/views/directory/NetworkDropdown.js -> lib/components/views/directory/NetworkDropdown.js
src/components/views/elements/ImageView.js -> lib/components/views/elements/ImageView.js
src/components/views/elements/Spinner.js -> lib/components/views/elements/Spinner.js
src/components/views/globals/GuestWarningBar.js -> lib/components/views/globals/GuestWarningBar.js
src/components/views/globals/MatrixToolbar.js -> lib/components/views/globals/MatrixToolbar.js
src/components/views/globals/NewVersionBar.js -> lib/components/views/globals/NewVersionBar.js
src/components/views/login/VectorCustomServerDialog.js -> lib/components/views/login/VectorCustomServerDialog.js
src/components/views/login/VectorLoginFooter.js -> lib/components/views/login/VectorLoginFooter.js
src/components/views/login/VectorLoginHeader.js -> lib/components/views/login/VectorLoginHeader.js
src/components/views/messages/DateSeparator.js -> lib/components/views/messages/DateSeparator.js
src/components/views/messages/MessageTimestamp.js -> lib/components/views/messages/MessageTimestamp.js
src/components/views/rooms/DNDRoomTile.js -> lib/components/views/rooms/DNDRoomTile.js
src/components/views/rooms/RoomDropTarget.js -> lib/components/views/rooms/RoomDropTarget.js
src/components/views/rooms/RoomTooltip.js -> lib/components/views/rooms/RoomTooltip.js
src/components/views/rooms/SearchBar.js -> lib/components/views/rooms/SearchBar.js
src/components/views/settings/IntegrationsManager.js -> lib/components/views/settings/IntegrationsManager.js
src/components/views/settings/Notifications.js -> lib/components/views/settings/Notifications.js
src/notifications/ContentRules.js -> lib/notifications/ContentRules.js
src/notifications/NotificationUtils.js -> lib/notifications/NotificationUtils.js
src/notifications/PushRuleVectorState.js -> lib/notifications/PushRuleVectorState.js
src/notifications/StandardActions.js -> lib/notifications/StandardActions.js
src/notifications/VectorPushRulesDefinitions.js -> lib/notifications/VectorPushRulesDefinitions.js
src/notifications/index.js -> lib/notifications/index.js
src/utils/DirectoryUtils.js -> lib/utils/DirectoryUtils.js
src/vector/index.js -> lib/vector/index.js
src/vector/modernizr.js -> lib/vector/modernizr.js
src/vector/olm-loader.js -> lib/vector/olm-loader.js
src/vector/platform/ElectronPlatform.js -> lib/vector/platform/ElectronPlatform.js
src/vector/platform/VectorBasePlatform.js -> lib/vector/platform/VectorBasePlatform.js
src/vector/platform/WebPlatform.js -> lib/vector/platform/WebPlatform.js
src/vector/platform/index.js -> lib/vector/platform/index.js
src/vector/updater.js -> lib/vector/updater.js
src/vector/url_utils.js -> lib/vector/url_utils.js
riot-web@0.9.3 /home/joel/stuffandthings/others-packages/riot-web

A long list of a file hierarchy followed and then a few more warnings in the end:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules/7zip-bin/node_modules/7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@^2.0.2 (node_modules/7zip-bin/node_modules/7zip-bin-win):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.0.2: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})

I tried cloning and installing the 0.9.1-tag with the same result.

Further, I tried

sudo npm install nativefier -g
nativefier https://riot.im/app/

which also launches an empty window. This time without any menubar and terminal message.

Any ideas of how I could get the desktop client up and running?

In case it matters, I'm on kernel 4.8.12-2-ARCH, with Gnome 3.22.1 as the desktop environment.

@ara4n
Copy link
Member

ara4n commented Dec 22, 2016 via email

@joelostblom
Copy link
Contributor Author

The electron version is 1.4.11. The entire package.json is pasted below.

Where are the build logs? I couldn't find anything relevantly names and changed recently in the same directory.

{
  "name": "riot-web",
  "productName": "Riot",
  "main": "electron/src/electron-main.js",
  "version": "0.9.3",
  "description": "A feature-rich client for Matrix.org",
  "author": "Vector Creations Ltd.",
  "repository": {
    "type": "git",
    "url": "https://github.com/vector-im/riot-web"
  },
  "license": "Apache-2.0",
  "files": [
    "AUTHORS.rst",
    "CONTRIBUTING.rst",
    "deploy",
    "docs",
    "karma.conf.js",
    "lib",
    "release.sh",
    "scripts",
    "src",
    "test",
    "webpack.config.js"
  ],
  "style": "bundle.css",
  "matrix-react-parent": "matrix-react-sdk",
  "scripts": {
    "reskindex": "reskindex -h src/header",
    "build:res": "cpx \"{src/skins/vector/fonts,src/skins/vector/img}/**\" webapp/ && cpx \"{res/media,res/vector-icons}/**\" webapp/",
    "build:config": "cpx config.json webapp/",
    "build:emojione": "cpx \"node_modules/emojione/assets/svg/*\" webapp/emojione/svg/",
    "build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
    "build:css": "mkdirp build && catw \"src/skins/vector/css/**/*.css\" -o build/components.css --no-watch",
    "build:compile": "babel --source-maps -d lib src",
    "build:bundle": "NODE_ENV=production webpack -p --progress",
    "build:bundle:dev": "webpack --optimize-occurence-order --progress",
    "build:electron": "npm run clean && npm run build && build -wml --ia32 --x64",
    "build": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle",
    "build:dev": "node scripts/babelcheck.js && npm run build:res && npm run build:config && npm run build:emojione && npm run build:css && npm run build:bundle:dev",
    "dist": "scripts/package.sh",
    "start:res": "parallelshell \"cpx -w \\\"{src/skins/vector/fonts,src/skins/vector/img}/**\\\" webapp/\" \"cpx -w \\\"{res/media,res/vector-icons}/**\\\" webapp/\"",
    "start:config": "cpx -w config.json webapp/",
    "start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" webapp/emojione/svg/ -w",
    "start:js": "webpack-dev-server -w --progress",
    "start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress",
    "start:skins:css": "mkdirp build && catw \"src/skins/vector/css/**/*.css\" -o build/components.css",
    "start": "node scripts/babelcheck.js && parallelshell \"npm run start:emojione\" \"npm run start:res\" \"npm run start:config\" \"npm run start:js\" \"npm run start:skins:css\"",
    "start:prod": "parallelshell \"npm run start:emojione\" \"npm run start:js:prod\" \"npm run start:skins:css\"",
    "clean": "rimraf build lib webapp electron/dist",
    "prepublish": "npm run build:compile",
    "test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",
    "test:multi": "karma start"
  },
  "dependencies": {
    "babel-polyfill": "^6.5.0",
    "babel-runtime": "^6.11.6",
    "browser-request": "^0.3.3",
    "classnames": "^2.1.2",
    "draft-js": "^0.8.1",
    "extract-text-webpack-plugin": "^0.9.1",
    "favico.js": "^0.3.10",
    "filesize": "^3.1.2",
    "flux": "~2.0.3",
    "gemini-scrollbar": "matrix-org/gemini-scrollbar#b302279",
    "gfm.css": "^1.1.1",
    "highlight.js": "^9.0.0",
    "linkifyjs": "^2.1.3",
    "matrix-js-sdk": "0.7.2",
    "matrix-react-sdk": "0.8.3",
    "modernizr": "^3.1.0",
    "q": "^1.4.1",
    "react": "^15.4.0",
    "react-dnd": "^2.1.4",
    "react-dnd-html5-backend": "^2.1.2",
    "react-dom": "^15.4.0",
    "react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef",
    "sanitize-html": "^1.11.1",
    "ua-parser-js": "^0.7.10",
    "url": "^0.11.0"
  },
  "devDependencies": {
    "babel-cli": "^6.5.2",
    "babel-core": "^6.14.0",
    "babel-eslint": "^6.1.0",
    "babel-loader": "^6.2.5",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-transform-async-to-generator": "^6.16.0",
    "babel-plugin-transform-class-properties": "^6.16.0",
    "babel-plugin-transform-object-rest-spread": "^6.16.0",
    "babel-plugin-transform-runtime": "^6.15.0",
    "babel-preset-es2015": "^6.16.0",
    "babel-preset-es2016": "^6.16.0",
    "babel-preset-es2017": "^6.16.0",
    "babel-preset-react": "^6.16.0",
    "babel-preset-stage-2": "^6.17.0",
    "catw": "^1.0.1",
    "cpx": "^1.3.2",
    "css-raw-loader": "^0.1.1",
    "electron-builder": "^10.4.1",
    "emojione": "^2.2.3",
    "expect": "^1.16.0",
    "fs-extra": "^0.30.0",
    "html-webpack-plugin": "^2.24.0",
    "json-loader": "^0.5.3",
    "karma": "^0.13.22",
    "karma-chrome-launcher": "^0.2.3",
    "karma-cli": "^0.1.2",
    "karma-junit-reporter": "^0.4.1",
    "karma-mocha": "^0.2.2",
    "karma-phantomjs-launcher": "^1.0.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "^1.7.0",
    "mkdirp": "^0.5.1",
    "mocha": "^2.4.5",
    "parallelshell": "^1.2.0",
    "phantomjs-prebuilt": "^2.1.7",
    "react-addons-perf": "^15.4.0",
    "react-addons-test-utils": "^15.4.0",
    "rimraf": "^2.4.3",
    "source-map-loader": "^0.1.5",
    "webpack": "^1.12.14",
    "webpack-dev-server": "^1.16.2"
  },
  "optionalDependencies": {
    "olm": "https://matrix.org/packages/npm/olm/olm-2.0.0.tgz"
  },
  "build": {
    "appId": "im.riot.app",
    "category": "Network",
    "electronVersion": "1.4.11",
    "//asar=false": "https://github.com/electron-userland/electron-builder/issues/675",
    "asar": false,
    "dereference": true,
    "//files": "We bundle everything, so we only need to include webapp/",
    "files": [
      "electron/src/**",
      "electron/img/**",
      "webapp/**",
      "package.json"
    ],
    "linux": {
      "target": "deb",
      "maintainer": "support@riot.im"
    },
    "win": {
      "target": "squirrel"
    }
  },
  "directories": {
    "buildResources": "electron/build",
    "output": "electron/dist"
  }
}

@z3ntu
Copy link
Contributor

z3ntu commented Dec 22, 2016

npm run build is necessary for it to run. It just has to be added to the build instructions

@joelostblom
Copy link
Contributor Author

joelostblom commented Dec 22, 2016

Great, thanks!
After running npm run build, I can launch the application with node_modules/.bin/electron .. I still see the same message about the missing base_url printed in terminal, but everything seems to be working fine.

Maybe this step should be added to the desktop install instructions in the README? Or is it implicit that you always have to do this when using npm?

@z3ntu
Copy link
Contributor

z3ntu commented Dec 22, 2016

It's just plain missing because I had the same problem (and only found something with webroot in the packages.json which had something with build:xxx there

@ara4n ara4n closed this as completed in e741a4f Dec 22, 2016
ara4n added a commit that referenced this issue Dec 22, 2016
Update desktop build instructions fixes #2792
Half-Shot pushed a commit to Half-Shot/riot-web that referenced this issue Feb 9, 2017
This is based on what I had to do to get the desktop app running, as per the advice in element-hq#2792. I am not familiar with `npm`, so please change this pull request if there is a more appropriate way of achieving the same result.
andreygursky added a commit to andreygursky/riot-web that referenced this issue Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants