stanfieldr / ghetto-skype

Web Skype + Tray Icon + Notifications
GNU General Public License v3.0
718 stars 52 forks source link

Error: /tmp/.org.chromium.Chromium.Aki8BI: cannot open shared object file #162

Open mdimura opened 5 years ago

mdimura commented 5 years ago

I built ghetto-skype from source for deb/arm64 platform, but cannot start it. Here is the error which I get:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: /tmp/.org.chromium.Chromium.Aki8BI: cannot open shared object file: No such file or directory
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:169:18)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/opt/Ghetto Skype/resources/app.asar/node_modules/canvas
/lib/bindings.js:3:18)
    at Object.<anonymous> (/opt/Ghetto Skype/resources/app.asar/node_modules/canvas/lib/bindings.js:5:3)
Unable to revert mtime: /usr/local/share/fonts

To build the deb, I use electronuserland/builder docker image, here is the script:

#!/bin/bash

git clone https://github.com/stanfieldr/ghetto-skype.git
cd ghetto-skype

mkdir -p ${PWD##*/}-node-modules ${PWD}/../cache/electron ${PWD}/../cache/electron-builder

cat <<EOF > build_deb.sh
#!/bin/bash

git clone https://github.com/stanfieldr/ghetto-skype.git
cd ghetto-skype

mkdir -p ${PWD##*/}-node-modules ${PWD}/../cache/electron ${PWD}/../cache/electron-builder

cat <<EOF > build_deb.sh
apt-get update
apt-get install -y build-essential icnsutils graphicsmagick xz-utils libxkbfile-dev libx11-dev libcairo2-dev libjpeg-dev libgif-dev libpango1.0-dev librsvg2-dev fakeroot dpkg
apt-get install -y libc6-dev-arm64-cross linux-libc-dev-arm64-cross \
                       g++-aarch64-linux-gnu
apt-get install -y build-essential clang libdbus-1-dev libgtk-3-dev \
                       libnotify-dev libgnome-keyring-dev libgconf2-dev \
                       libasound2-dev libcap-dev libcups2-dev libxtst-dev \
                       libxss1 libnss3-dev gcc-multilib g++-multilib curl \
                       gperf bison python-dbusmock openjdk-8-jre
sed -i 's/"target": "rpm",/"target": "deb",/g' package.json
npm install
npm run dist
./node_modules/.bin/electron-builder -l deb --arm64
EOF
chmod +x build_deb.sh

sudo docker run --rm -ti \
 --env ELECTRON_CACHE="/root/.cache/electron" \
 --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
--env NODE_OPTIONS="--max-old-space-size=2048" \
 -v ${PWD}:/project \
 -v ${PWD##*/}-node-modules:/project/node_modules \
 -v ${PWD}/../cache/electron:/root/.cache/electron \
 -v ${PWD}/../cache/electron-builder:/root/.cache/electron-builder \
 electronuserland/builder /bin/bash -c "./build_deb.sh"

The package ghetto-skype_1.6.1_arm64.deb seems to build fine, I installed it on Ubuntu 18.04/arm64 (Odroid C2) without any problems. Am I doing something wrong? Is there anything, I could try to fix it? I tried building another electron app this way and it worked, the app runs just fine, so, I hope it is possible to build ghetto-skype as well.

I have also built amd64 version of ghetto-skype with the same script and it worked. There was a slight quirk, thought, that I had to manually install libpng12 library with dpkg, but after that it worked like a charm on Ubuntu 18.04/x86_64.

lisenet commented 2 years ago

Check if /tmp is mounted with noexec flag. If so, try re-mounting it with exec and see if that makes a difference.