Building from source on Arch Linux


#1

First off, let me say that I understand that what I’m trying to do is not officially supported.

I am attempting to build Aether from git master on Arch Linux. Backend and Frontend build correctly with a few makefile tweaks.

Makefile diff:

diff --git a/aether/makefile b/aether/makefile
index 39e7c80..2352d65 100644
--- a/aether/makefile
+++ b/aether/makefile
@@ -132,7 +132,7 @@ ARM64=GOARCH=arm64
 ARM32=GOARCH=arm
 
 # Cross-compile flags
-CCFLAGS_LINUX_X64=CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++
+CCFLAGS_LINUX_X64=CC=gcc CXX=g++
 CCFLAGS_LINUX_X86=CC=i486-linux-musl-gcc CXX=i486-linux-musl-g++
 CCFLAGS_LINUX_ARM64=CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++
 CCFLAGS_LINUX_ARM32=CC=arm-linux-musleabi-gcc CXX=arm-linux-musleabi-g++
@@ -173,8 +173,7 @@ LINUX_ARM32_NAME=-linux-arm32
 ## Desktop
 compile-mac: compile-mac-x64 move-mac-x64-be move-mac-x64-fe
 compile-win: compile-win-x64 compile-win-x86 move-win-x64-be move-win-x64-fe move-win-x86-be move-win-x86-fe
-compile-linux: compile-linux-x64 compile-linux-x86 compile-linux-arm64 compile-linux-arm32 move-linux-x64-be move-linux-x64-fe move-linux-x86-be move-linux-x86-fe move-linux-arm64-be move-linux-arm64-fe move-linux-arm32-be move-linux-arm32-fe
-
+compile-linux: compile-linux-x64 move-linux-x64-be move-linux-x64-fe
 ## Server
 # compile-linux-extv-server: compile-linux-x64-extverify-be move-linux-x64-extverify-be compress-linux-x64-extverify-be version-linux-x64-extverify-be
 # compile-linux-server: compile-linux-x64-be move-linux-x64-be compress-linux-x64-be version-linux-x64-be

Basic methodology is to replace the cross compile toolchain with just the native gcc install. Note that you do need the binutils package installed, heck, just install the whole base-devel group if you haven’t already.
You also will need to install go and upx. No AUR packages needed, all of these packages are in the core repositories.

If you are using Arch Linux 32
You should define the compile-linux target to use the x86 targets instead of the x64 ones

Then we have building the client.

I have not gotten this working yet!
Basically, Arch Linux packages a newer version of Node.js than @b is using to develop Aether.
This causes issues with installing the node.js grpc package. The solution is to use a newer version of the grpc package. Another issue is that the git version number that is generated is not acceptable to Node.js. I don’t know why it cares. Here are my steps so far. Note that for these steps you must have the docker package installed, you must start the docker service AND you must be in the docker group. If one of these is not true, this will fail.

Here are the changes I made to aether/aether/client/package.json:

diff --git a/aether/client/package.json b/aether/client/package.json
index b35e794..1d3f67e 100644
--- a/aether/client/package.json
+++ b/aether/client/package.json
@@ -1,6 +1,6 @@
 {
   "name": "Aether",
-  "version": "2.0.0-dev.6+1811211332.746ec27e.d",
+  "version": "1.0.0",
   "description": "Aether",
   "readme": "https://getaether.net",
   "main": "src/app/mainmain.js",
@@ -13,15 +13,16 @@
     "wpwatch": "webpack --watch",
     "dist-mac": "npm run update-version-string && electron-builder --mac -c.extraMetadata.version=$(node ./buildresources/get-version-from-git.js print)",
     "dist-win": "npm run update-version-string && electron-builder --win -c.extraMetadata.version=$(node ./buildresources/get-version-from-git.js print)",
-    "dist-linux-docker-trigger": "electron-builder --linux -c.extraMetadata.version=$BVERSION",
+    "dist-linux-docker-trigger": "npx electron-builder --linux -c.extraMetadata.version=$BVERSION",
     "dist-linux-docker-install-deps": "docker run --rm -ti --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:10 npm install",
     "dist-linux": "npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger",
     "dist-linux-server": "VERSIONATSTART=$(node ./buildresources/get-version-from-git.js print) && mv ./MAKE_BINARIES/aether-backend-linux-x64 ./MAKE_BINARIES/aether-backend-linux-x64-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run && mv ./MAKE_BINARIES/aether-backend-linux-x64-extverify ./MAKE_BINARIES/aether-backend-linux-x64-extverify-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run",
     "dist": "npm run update-version-string && VERSIONATSTART=$(node ./buildresources/get-version-from-git.js print) && electron-builder --mac --win -c.extraMetadata.version=$VERSIONATSTART && docker run --rm -ti --env ELECTRON_CACHE=\"/root/.cache/electron\" --env ELECTRON_BUILDER_CACHE=\"/root/.cache/electron-builder\" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$VERSIONATSTART electronuserland/builder:10 npm run dist-linux-docker-trigger && mv ./MAKE_BINARIES/aether-backend-linux-x64 ./MAKE_BINARIES/aether-backend-linux-x64-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run && mv ./MAKE_BINARIES/aether-backend-linux-x64-extverify ./MAKE_BINARIES/aether-backend-linux-x64-extverify-$VERSIONATSTART 2> /dev/null || true && node ./buildresources/aftercompile.js run",
     "pack": "electron-builder --dir",
     "rebuild": "electron-rebuild",
-    "update-version-string": "node ./buildresources/get-version-from-git.js",
-    "quickpublish": "../../support/quickpublish/quickpublish.sh"
+    "update-version-string": "echo 1.0.0",
+    "quickpublish": "../../support/quickpublish/quickpublish.sh",
+    "postinstall": "npx electron-builder install-app-deps"
   },
   "author": {
     "name": "Air Labs",
@@ -61,7 +62,7 @@
     "electron-is-dev": "^0.3.0",
     "electron-store": "^2.0.0",
     "electron-unhandled": "^1.1.0",
-    "electron-updater": "^3.1.2",
+    "electron-updater": "^4.0.0",
     "electron-util": "^0.9.1",
     "google-protobuf": "^3.6.0",
     "grpc": "^1.12.4",

Before running make linux, you should cd into the client directory and run npm install so that it downloads and installs the JavaScript dependencies. Once you have done this, you should be able to compile the backend and frontend. The client will probably fail with the following log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dist-linux' ]
2 info using npm@6.9.0
3 info using node@v11.14.0
4 verbose run-script [ 'predist-linux', 'dist-linux', 'postdist-linux' ]
5 info lifecycle Aether@1.0.0~predist-linux: Aether@1.0.0
6 info lifecycle Aether@1.0.0~dist-linux: Aether@1.0.0
7 verbose lifecycle Aether@1.0.0~dist-linux: unsafe-perm in lifecycle true
8 verbose lifecycle Aether@1.0.0~dist-linux: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/micah/builds/aether/aether/client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/micah/bin:/home/micah/.local/bin:/home/micah/.gem/ruby/2.1.0/bin:/home/micah/dev/go/bin:/home/micah/.gem/ruby/2.4.0/bin
9 verbose lifecycle Aether@1.0.0~dist-linux: CWD: /home/micah/builds/aether/aether/client
10 silly lifecycle Aether@1.0.0~dist-linux: Args: [ '-c',
10 silly lifecycle   'npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger' ]
11 silly lifecycle Aether@1.0.0~dist-linux: Returned: code: 1  signal: null
12 info lifecycle Aether@1.0.0~dist-linux: Failed to exec dist-linux script
13 verbose stack Error: Aether@1.0.0 dist-linux: `npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:193:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:193:13)
13 verbose stack     at maybeClose (internal/child_process.js:999:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
14 verbose pkgid Aether@1.0.0
15 verbose cwd /home/micah/builds/aether/aether/client
16 verbose Linux 5.0.7-arch1-1-ARCH
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dist-linux"
18 verbose node v11.14.0
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error Aether@1.0.0 dist-linux: `npm run update-version-string && docker run --rm -ti --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD}/../../../BundledReleases:/BundledReleases -v ${PWD}/../../../ReleaseArchive:/ReleaseArchive -v ${PWD##*/}-node-modules:/project/node_modules -v ${PWD}/../../../.git:/project/.git -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder -e BVERSION=$(node ./buildresources/get-version-from-git.js print) electronuserland/builder:10 npm run dist-linux-docker-trigger`
22 error Exit status 1
23 error Failed at the Aether@1.0.0 dist-linux script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

What it looks like to me, is that whatever docker container is trying to build the client, can’t get at the JavaScript dependencies that it needs. I am not skilled enough with docker to resolve this and it’s late here. I hope this is useful to someone, and maybe someone here can give me a clue on how to resolve this issue.


#2

I took a short look at this. I suspect the node issues you’re having are actually because of electron since aether doesn’t use node, but it uses electron, which uses a modified version of node. Which you’ve also discovered makes for an eventful compilation. The main question I have for you is, are you actually using electron’s node and not the default node shipped with arch? If you aren’t, that might explain this.

If this doesn’t help, let me know and I’ll take a deeper look and try to replicate on my Ubuntu VM. I think you’re 90% there.


#3

Your reply was most enlightening. As it turns out, I was installing the dependencies from outside the docker environment. I changed the dist-linux npm script to call /bin/bash instead of npm run dist-linux-docker-trigger. Then, once I had the shell connected to the docker container, I ran npm install and then electron-builder would run and it found the dependencies.

Now, it appears to be putting the built packages in a ReleaseArchive directory, however I do not see this, the makefile doesn’t create it, and I’m unsure where to add it myself.


#4

Feel free to create it in the directory you pulled the repo into, but outside the repo folder. This is so that when you create a release, it won’t pollute your git changelog. So something like this:

—>ReleaseArchive
—>[aether-repo-folder-name]
——> go.mod
——> go.sum
——> aether
———> backend
———> frontend
———> ...

#5

Ah, that makes sense. I have now built and run the client!
One more hurdle to leap it seems. When I go to BundledReleases/linux-unpacked and run ./aether an empty window opens and the following error message appears in the terminal:

Checking for update
Error: TypeError: this.app.whenReady is not a function
    at ElectronAppAdapter.whenReady (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/ElectronAppAdapter.ts:9:21)
    at /home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:337:20
    at Generator.next (<anonymous>)
From previous event:
    at AppImageUpdater.getUpdateInfoAndProvider (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:336:43)
    at /home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:363:31
    at Generator.next (<anonymous>)
From previous event:
    at AppImageUpdater.doCheckForUpdates (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:360:34)
    at AppImageUpdater.checkForUpdates (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:220:35)
    at checkSoftwareUpdate (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/src/app/mainmain.ts:63:27)
    at startAutoUpdateCheck (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/src/app/mainmain.ts:67:3)
    at App.main (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/src/app/mainmain.ts:589:3)
    at emitTwo (events.js:131:20)
    at App.emit (events.js:214:7)
Unhandled rejection TypeError: this.app.whenReady is not a function
    at ElectronAppAdapter.whenReady (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/ElectronAppAdapter.ts:9:21)
    at /home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:337:20
    at Generator.next (<anonymous>)
From previous event:
    at AppImageUpdater.getUpdateInfoAndProvider (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:336:43)
    at /home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:363:31
    at Generator.next (<anonymous>)
From previous event:
    at AppImageUpdater.doCheckForUpdates (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:360:34)
    at AppImageUpdater.checkForUpdates (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:220:35)
    at checkSoftwareUpdate (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/src/app/mainmain.ts:63:27)
    at startAutoUpdateCheck (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/src/app/mainmain.ts:67:3)
    at App.main (/home/micah/builds/BundledReleases/linux-unpacked/resources/app.asar/src/app/mainmain.ts:589:3)
    at emitTwo (events.js:131:20)
    at App.emit (events.js:214:7)

Commenting out the auto updater code in mainmain.js prevents the error from occuring.

When I close the window, the program continues running until I press Ctrl-C. When I do so, a dialog box appears:

I did some checking with the client running, and I see several processes for the client, but I do not see the frontend or backend started. I believe this is the next problem to solve.

Where do I find the code that handles that?

I’m so close I can taste it! Thanks @b for all your help.


#6

Yup, so you’re missing the frontend and backend daemons, which are the Go binaries that you just compiled. Did you try to place them in the compiled app folder manually?

This is probably the last step, however, it’s also the step I’m having trouble with myself as well. If you put the compiled go binaries into the right directory it should work, since it looks like the shell is there, but it’s missing the core binaries to make it work.

BTW — I pushed some new source code to the github repo. You might want to check those out, those might make it a little easier. Whenever we get this working, I’ll take a look at this thread and get it into the package.json, so it can be automated.


#7

Well, seems we’re not out of the woods just yet. I integrated your new code and got down to building again.

I found that moving the binaries is working fine, at least on my end. They are showing up right where they should.

What wasn’t working, is the UI bundle wasn’t built / getting built. I opened the dev tools in the Aether window and saw a console error for the missing file. Calling npm run wpbuild inside the docker container creates the file, but with several errors:

> Aether@2.0.0-dev.12 wpbuild /project
> webpack

Hash: ba88b2181f676c5bbd20
Version: webpack 4.29.0
Time: 9067ms
Built at: 04/26/2019 12:41:03 AM
                                  Asset       Size  Chunks             Chunk Names
                              bundle.js   5.63 MiB    main  [emitted]  main
             images/Logo-v3-outline.svg   2.09 KiB          [emitted]  
                   images/close-btn.svg  968 bytes          [emitted]  
         images/nasa-89125-unsplash.jpg     25 KiB          [emitted]  
                     images/patreon.png   3.01 KiB          [emitted]  
              images/softer-chevron.svg  830 bytes          [emitted]  
      typefaces/SourceCodePro-Black.ttf    118 KiB          [emitted]  
       typefaces/SourceCodePro-Bold.ttf    118 KiB          [emitted]  
 typefaces/SourceCodePro-ExtraLight.ttf    119 KiB          [emitted]  
      typefaces/SourceCodePro-Light.ttf    118 KiB          [emitted]  
     typefaces/SourceCodePro-Medium.ttf    117 KiB          [emitted]  
    typefaces/SourceCodePro-Regular.ttf    118 KiB          [emitted]  
   typefaces/SourceCodePro-Semibold.ttf    117 KiB          [emitted]  
      typefaces/SourceSansPro-Black.ttf    282 KiB          [emitted]  
typefaces/SourceSansPro-BlackItalic.ttf    101 KiB          [emitted]  
       typefaces/SourceSansPro-Bold.ttf    284 KiB          [emitted]  
 typefaces/SourceSansPro-BoldItalic.ttf    101 KiB          [emitted]  
     typefaces/SourceSansPro-Italic.ttf    101 KiB          [emitted]  
      typefaces/SourceSansPro-Light.ttf    286 KiB          [emitted]  
typefaces/SourceSansPro-LightItalic.ttf    102 KiB          [emitted]  
    typefaces/SourceSansPro-Regular.ttf    287 KiB          [emitted]  
Entrypoint main = bundle.js
[./src/app/renderermain.ts] 25.3 KiB {main} [built]
[./src/app/services/clapiserver/clapiserver.ts] 7.4 KiB {main} [built]
[./src/app/services/eipc/eipc-renderer.ts] 585 bytes {main} [built]
[./src/app/services/feapiconsumer/feapiconsumer.ts] 45.4 KiB {main} [built]
[./src/app/services/globals/methods.ts] 3.31 KiB {main} [built]
[./src/app/services/metrics/metrics.ts] 4.86 KiB {main} [built]
[./src/app/store/contentrelations.ts] 4.06 KiB {main} [built]
[./src/app/store/crumbs.ts] 10.9 KiB {main} [built]
[./src/app/store/dataloaders.ts] 2.41 KiB {main} [built]
[./src/app/store/index.ts] 31.8 KiB {main} [built]
[./src/app/store/statuslights.ts] 7 KiB {main} [built]
[electron-hunspell] external "electron-hunspell" 42 bytes {main} [built]
[electron-is-dev] external "electron-is-dev" 42 bytes {main} [built]
[hunspell-asm] external "hunspell-asm" 42 bytes {main} [built]
[path] external "path" 42 bytes {main} [built]
    + 902 hidden modules

ERROR in ./src/app/components/locations/boardscope/newthread.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/boardscope/newthread.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations/boardscope'
 @ ./src/app/components/locations/boardscope/newthread.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/boardscope/newthread.vue?vue&type=script&lang=ts&) 4:14-75
 @ ./src/app/components/locations/boardscope/newthread.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/boardscope/newthread.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/locations/boardscope/boardinfo.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/boardscope/boardinfo.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations/boardscope'
 @ ./src/app/components/locations/boardscope/boardinfo.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/boardscope/boardinfo.vue?vue&type=script&lang=ts&) 4:14-75
 @ ./src/app/components/locations/boardscope/boardinfo.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/boardscope/boardinfo.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/locations/globalscope/newboard.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/globalscope/newboard.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations/globalscope'
 @ ./src/app/components/locations/globalscope/newboard.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/globalscope/newboard.vue?vue&type=script&lang=ts&) 4:14-75
 @ ./src/app/components/locations/globalscope/newboard.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/globalscope/newboard.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/locations/settingsscope/advancedsettings.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/settingsscope/advancedsettings.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations/settingsscope'
 @ ./src/app/components/locations/settingsscope/advancedsettings.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/settingsscope/advancedsettings.vue?vue&type=script&lang=ts&) 4:14-75
 @ ./src/app/components/locations/settingsscope/advancedsettings.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/settingsscope/advancedsettings.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/locations/settingsscope/newuser.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/settingsscope/newuser.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations/settingsscope'
 @ ./src/app/components/locations/settingsscope/newuser.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/settingsscope/newuser.vue?vue&type=script&lang=ts&) 6:14-75
 @ ./src/app/components/locations/settingsscope/newuser.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/settingsscope/newuser.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/locations/userscope/userroot.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/userscope/userroot.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations/userscope'
 @ ./src/app/components/locations/userscope/userroot.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/userscope/userroot.vue?vue&type=script&lang=ts&) 5:14-75
 @ ./src/app/components/locations/userscope/userroot.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/userscope/userroot.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/services/clapiserver/clapiserver.ts
Module not found: Error: Can't resolve '../../../../../protos/clapi/clapi_grpc_pb' in '/project/src/app/services/clapiserver'
 @ ./src/app/services/clapiserver/clapiserver.ts 18:15-67
 @ ./src/app/renderermain.ts

ERROR in ./src/app/services/clapiserver/clapiserver.ts
Module not found: Error: Can't resolve '../../../../../protos/clapi/clapi_pb.js' in '/project/src/app/services/clapiserver'
 @ ./src/app/services/clapiserver/clapiserver.ts 17:15-65
 @ ./src/app/renderermain.ts

ERROR in ./src/app/services/feapiconsumer/feapiconsumer.ts
Module not found: Error: Can't resolve '../../../../../protos/feapi/feapi_grpc_pb' in '/project/src/app/services/feapiconsumer'
 @ ./src/app/services/feapiconsumer/feapiconsumer.ts 51:12-64
 @ ./src/app/renderermain.ts

ERROR in ./src/app/services/feapiconsumer/feapiconsumer.ts
Module not found: Error: Can't resolve '../../../../../protos/feapi/feapi_pb.js' in '/project/src/app/services/feapiconsumer'
 @ ./src/app/services/feapiconsumer/feapiconsumer.ts 49:16-66
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/locations/threadscope.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/threadscope.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components/locations'
 @ ./src/app/components/locations/threadscope.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/locations/threadscope.vue?vue&type=script&lang=ts&) 17:14-72
 @ ./src/app/components/locations/threadscope.vue?vue&type=script&lang=ts&
 @ ./src/app/components/locations/threadscope.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-ballot.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-ballot.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../protos/clapi/clapi_pb.js' in '/project/src/app/components'
 @ ./src/app/components/a-ballot.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-ballot.vue?vue&type=script&lang=ts&) 6:12-59
 @ ./src/app/components/a-ballot.vue?vue&type=script&lang=ts&
 @ ./src/app/components/a-ballot.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-ballot.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-ballot.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components'
 @ ./src/app/components/a-ballot.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-ballot.vue?vue&type=script&lang=ts&) 5:12-67
 @ ./src/app/components/a-ballot.vue?vue&type=script&lang=ts&
 @ ./src/app/components/a-ballot.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-post.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-post.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components'
 @ ./src/app/components/a-post.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-post.vue?vue&type=script&lang=ts&) 6:14-69
 @ ./src/app/components/a-post.vue?vue&type=script&lang=ts&
 @ ./src/app/components/a-post.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-thread-header-entity.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-thread-header-entity.vue?vue&type=script&lang=ts&)
Module not found: Error: Can't resolve '../../../../protos/mimapi/structprotos_pb.js' in '/project/src/app/components'
 @ ./src/app/components/a-thread-header-entity.vue?vue&type=script&lang=ts& (./node_modules/ts-loader??ref--0!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-thread-header-entity.vue?vue&type=script&lang=ts&) 7:14-69
 @ ./src/app/components/a-thread-header-entity.vue?vue&type=script&lang=ts&
 @ ./src/app/components/a-thread-header-entity.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-breadcrumbs.vue?vue&type=template&id=017ec79c&scoped=true& (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-breadcrumbs.vue?vue&type=template&id=017ec79c&scoped=true&)
Module not found: Error: Can't resolve '../ext_dep/images/logo-sm-h.png' in '/project/src/app/components'
 @ ./src/app/components/a-breadcrumbs.vue?vue&type=template&id=017ec79c&scoped=true& (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-breadcrumbs.vue?vue&type=template&id=017ec79c&scoped=true&) 16:26-68
 @ ./src/app/components/a-breadcrumbs.vue?vue&type=template&id=017ec79c&scoped=true&
 @ ./src/app/components/a-breadcrumbs.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss& (./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&)
Module not found: Error: Can't resolve '../ext_dep/typefaces/Source_Sans_Pro/SourceSansPro-Semibold.ttf' in '/project/src/app/components'
 @ ./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss& (./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&) 8:41-115
 @ ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&
 @ ./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&
 @ ./src/app/components/a-app.vue
 @ ./src/app/renderermain.ts

ERROR in ./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss& (./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&)
Module not found: Error: Can't resolve '../ext_dep/typefaces/Source_Sans_Pro/SourceSansPro-SemiboldItalic.ttf' in '/project/src/app/components'
 @ ./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss& (./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&) 9:41-121
 @ ./node_modules/vue-style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/vue-loader/lib??vue-loader-options!./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&
 @ ./src/app/components/a-app.vue?vue&type=style&index=0&lang=scss&
 @ ./src/app/components/a-app.vue
 @ ./src/app/renderermain.ts

It seems that several important files cannot be found. It builds bundle.js anyway, but when the client is run, a new set of errors appear in the console:

Uncaught Error: Cannot find module '../../../../../protos/feapi/feapi_pb.js'
    at webpackMissingModule (webpack:///./src/app…eapiconsumer.ts?:49)
    at eval (webpack:///./src/app…eapiconsumer.ts?:49)
    at Object../src/app/services/feapiconsumer/feapiconsumer.ts (bundle.js:10398)
    at __webpack_require__ (bundle.js:20)
    at eval (webpack:///./src/app…r/clapiserver.ts?:9)
    at Object../src/app/services/clapiserver/clapiserver.ts (bundle.js:10374)
    at __webpack_require__ (bundle.js:20)
    at eval (webpack:///./src/app/renderermain.ts?:48)
    at Object../src/app/renderermain.ts (bundle.js:10362)
    at __webpack_require__ (bundle.js:20)

Incidentally, I believe this error gives insight into the error dialog that pops up when forcing aether to exit. Since it was never able to start the frontend, the necesary methods are not defined when it attempts to shut it down.

I believe once we can tell webpack where to find that file, it should run.


#8

There are two things going on here, one of them is to run the app uncompiled, the second one is to package it. I think it’s better to have it run uncompiled first and then focus on actually compiling it, since these errors are coming from the app not being able to run, not from it not being able to be packaged. You’ve figured out packaging the app just fine.

To run the app uncompiled, you should go into the /client directory, and do ‘npm start’. When you do this, the app should be able to start, and failing that, should print some useful logs. That should at least make the debugging easier.

The second thing is, you don’t actually have to build things via Webpack. The source code ships with prebuilt JS. So if you start the app normally, that should work, assuming that the dependencies are present. This application start process should also compile the go binaries within the process itself as well, so it’s very much a one-command thing.

Let me know what happens when you do npm start. If it looks completely intractable, I’ll clone the repo on a Linux machine and I’ll try to get it working. I’ve done this (starting a dev environment from scratch on a brand new machine) a few times and it works fine on a Mac, which is a fairly similar UNIX, so unpackaged app should run fine. If it doesn’t, we’ll have to go in and fix it.


#9

I tried a few different things, and figured out that I needed to do a rebuild and target the electron runtime, and make sure it was building against the correct electron version and ABI. As it turns out, I have electron installed as a system package at version 4.1.4 and aether is using version 2.0.15. Once I made sure to run using the locally installed electron version, things started to work better.

At least on my machine, if client/dist/bundle.js is not present, aether will not run. Once I build it using webpack, Aether loads without error dialogs and attempts to start the frontend:

build command-line-arguments: cannot load aether-core/support/extbridge: cannot find module providing package aether-core/support/extbridge

Frontend process exited with code 1 and signal null
We will reattempt to start the frontend daemon in 10 seconds.
Attempting to restart the frontend now.
45571
{ FrontendReady: false,
  FrontendAPIPort: 0,
  FrontendClientConnInitialised: false,
  ClientAPIServerPort: 45571,
  FrontendDaemonStarted: false,
  RendererReady: false,
  FrontendDaemon: 
   ChildProcess {
     domain: null,
     _events: { exit: [Function] },
     _eventsCount: 1,
     _maxListeners: undefined,
     _closesNeeded: 3,
     _closesGot: 3,
     connected: false,
     signalCode: null,
     exitCode: 1,
     killed: false,
     spawnfile: 'go',
     _handle: null,
     spawnargs: 
      [ 'go',
        'run',
        '-tags',
        'extvenabled',
        '../frontend/main.go',
        'run',
        '--isdev=true',
        '--clientip=127.0.0.1',
        '--clientport=45571' ],
     pid: 32312,
     stdin: 
      Socket {
        connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: null,
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 2,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        _bytesDispatched: 0,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: null,
        _server: null,
        write: [Function: writeAfterFIN],
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1,
        [Symbol(asyncId)]: 43,
        [Symbol(bytesRead)]: 0 },
     stdout: 
      Socket {
        connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: null,
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        _bytesDispatched: 0,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: null,
        _server: null,
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1,
        write: [Function: writeAfterFIN],
        [Symbol(asyncId)]: 44,
        [Symbol(bytesRead)]: 0 },
     stderr: 
      Socket {
        connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: null,
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        _bytesDispatched: 0,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: null,
        _server: null,
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1,
        write: [Function: writeAfterFIN],
        [Symbol(asyncId)]: 45,
        [Symbol(bytesRead)]: 140 },
     stdio: [ [Object], [Object], [Object] ] },
  AppIsShuttingDown: false }
Frontend daemon starting
build command-line-arguments: cannot load aether-core/support/extbridge: cannot find module providing package aether-core/support/extbridge

Frontend process exited with code 1 and signal null
We will reattempt to start the frontend daemon in 10 seconds.

#10

I just installed elementary OS natively, which is Ubuntu based (which took 3 hours because GRUB doesn’t like UEFI :slightly_smiling_face:), and I’m going through these things myself. I also encountered your prior errors. It seems it’s a minor path incompatibility between Mac and Linux is what I’m facing right now, I haven’t made it to your error yet. I’m signing out for tonight, but I’ll take a look in the weekend.


#11

Just an update, I haven’t forgotten about this. I ended up getting it compiled on Linux but it was fairly contrived because of a folder issue. The May release should have this fixed and it should be easier to do that.