Video-hub-app: Exception Error

Created on 17 Nov 2019  ยท  10Comments  ยท  Source: whyboris/Video-Hub-App

I have a few features I wanted to try implimenting but am getting errors with the AppImage I generate on Linux Mint 18.3. It runs fine the first time, but a get an exception error after that unless I delete the $home$/.config/video-hub-app folder.

Note that I've never built a node.js app but doubt I could have done anything wrong. I installed the latest npm, node.js, and Electron and built with the following command.

npm run build:prod && electron-builder build --linux

Error Dialog

Uncaught Exception:
TypeError: Cannot set property 'selectedIndex' of undefined
    at EventEmitter.<anonymous> (/tmp/.mount_Video xCmHR5/resources/app.asar/main.js:815:44)
    at EventEmitter.emit (events.js:200:13)
    at WebContents.<anonymous> (/tmp/.mount_Video xCmHR5/resources/electron.asar/browser/api/web-contents.js:335:21)
    at WebContents.emit (events.js:200:13)

Build Log

VideoHub npm run build:prod && electron-builder build --linux

> [email protected] build:prod /home/mcpalmer/VideoHub
> npm run build -- -c production


> [email protected] build /home/mcpalmer/VideoHub
> npm run postinstall:electron && npm run electron:serve-tsc && ng build "-c" "production"


> [email protected] postinstall:electron /home/mcpalmer/VideoHub
> node postinstall


> [email protected] electron:serve-tsc /home/mcpalmer/VideoHub
> tsc -p tsconfig-serve.json


chunk {0} runtime.ee0aae13fb762b150814.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.4261b3c89ed18d381138.js (main) 1.31 MB [initial] [rendered]
chunk {2} polyfills.77b6099bf795cc68d244.js (polyfills) 46 kB [initial] [rendered]
chunk {3} polyfills-es5.f6e4f7f783ff74a1064c.js (polyfills-es5) 69.8 kB [initial] [rendered]
chunk {4} styles.f42fbb34746ba625daba.css (styles) 52 bytes [initial] [rendered]
Date: 2019-11-17T01:06:05.519Z - Hash: 28a693057b0929157781 - Time: 22598ms
  โ€ข electron-builder  version=21.2.0 os=4.10.0-38-generic
  โ€ข loaded configuration  file=/home/mcpalmer/VideoHub/electron-builder.json
  โ€ข writing effective config  file=release/builder-effective-config.yaml
  โ€ข packaging       platform=linux arch=x64 electron=6.0.6 appOutDir=release/linux-unpacked
  โ€ข building        target=AppImage arch=x64 file=release/Video Hub App 2-2.0.0.AppImage
Linux bug

All 10 comments

Thank you for the bug report ๐Ÿ™‡

The only place I see selectedIndex in the app is in the main.ts -- and all the mentions of it were added recently with a PR: #299 that adds Mac _Touch Bar Support_

I have not built the app since the addition of this feature -- perhaps we need to only call the methods that touch it when the app is running on a Mac (see codeRunningOnMac variable). Perhaps the app doesn't build/run on Mac / Windows either ๐Ÿคทโ€โ™‚ ๐Ÿ˜…

I suspect your app will build fine if you check out an earlier commit before this PR was merged, or if you temporarily gut the _Touch Bar_ feature :trollface:

Found the two places requiring a condition - I think we need a touchBarEnabled bool, as not all macs have touchbars! ๐Ÿ‘

See my comments on #61

Hey, can I take this? Will fix it (:

I think this can be closed now that #319 has been merged. @mcpalmer1980 -- if you happen to check with the latest _master_ please let us know ๐Ÿค

I upgraded my OS from Mint 18.3 to Ubuntu 19.10 and am having trouble
building. I assume you don't supply build instructions so more people buy
the software, but I'm not js proficient and lack the time to experiment
right now.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/michael/.nvm/versions/node/v13.2.0/bin/node',
1 verbose cli '/home/michael/.nvm/versions/node/v13.2.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli '--',
1 verbose cli '-c',
1 verbose cli 'production'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle
true
8 verbose lifecycle [email protected]~build: PATH:
/home/michael/.nvm/versions/node/v13.2.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/michael/.local/share/Trash/files/Video-Hub-App-master/node_modules/.bin:/home/michael/.nvm/versions/node/v13.2.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/michael/.local/share/Trash/files/Video-Hub-App-master/node_modules/.bin:/home/michael/.nvm/versions/node/v13.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~build: CWD:
/home/michael/.local/share/Trash/files/Video-Hub-App-master
10 silly lifecycle [email protected]~build: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'npm run postinstall:electron && npm run
electron:serve-tsc && ng build "-c" "production"'
10 silly lifecycle ]
11 silly lifecycle [email protected]~build: Returned: code: 1 signal:
null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: npm run postinstall:electron && npm run electron:serve-tsc && ng build "-c" "production"
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.
(/home/michael/.nvm/versions/node/v13.2.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:210:5)
13 verbose stack at ChildProcess.
(/home/michael/.nvm/versions/node/v13.2.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:210:5)
13 verbose stack at maybeClose (internal/child_process.js:1023:16)
13 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:281:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/michael/.local/share/Trash/files/Video-Hub-App-master
16 verbose Linux 5.3.0-23-generic
17 verbose argv "/home/michael/.nvm/versions/node/v13.2.0/bin/node"
"/home/michael/.nvm/versions/node/v13.2.0/bin/npm" "run" "build" "--" "-c"
"production"
18 verbose node v13.2.0
19 verbose npm v6.13.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: npm run postinstall:electron && npm run electron:serve-tsc && ng build "-c" "production"
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely
additional logging output above.
24 verbose exit [ 1, true ]

On Mon, Dec 2, 2019 at 6:26 PM Boris notifications@github.com wrote:

I think this can be closed now that #319
https://github.com/whyboris/Video-Hub-App/pull/319 has been merged.
@mcpalmer1980 https://github.com/mcpalmer1980 -- if you happen to check
with the latest master please let us know ๐Ÿค

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/whyboris/Video-Hub-App/issues/312?email_source=notifications&email_token=ALHMW2FTLWG3LLYKSXAH72TQWWKSTA5CNFSM4JOHUQIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFXHVMY#issuecomment-560888499,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALHMW2BMBHPDKNTQERP7YJ3QWWKSTANCNFSM4JOHUQIA
.

@mcpalmer1980 sorry it still fails -- I've not tested the app.
After the release lands, I start merging PRs that update the functionality, and until the next release the app may be broken.

If you'd like the app to build, I'm confident the 2.0.0 release will work, just check out the master at this point in the commit history: https://github.com/whyboris/Video-Hub-App/releases/tag/v2.0.0

I'll likely find time in the coming weeks (or at least during my winter break) to fix the Linux build again so I can release 2.1.0

The build instructions should be as simple as npm run electron:linux ... I'm unsure why it's not working for you. I built my .appimage in Ubuntu running inside a virtual machine on Mac ๐Ÿคทโ€โ™‚

I'm not sure if my failure to build is a problem with the code or with my
build platform. Perhaps I have an issue with dependencies or permissions or
something like that. The version of npm and node included with my distro
were too old to build so I tried installing and upgrading dependencies from
various googled instructions. Some attempts failed and may have left broken
pieces behind after I found instructions that did work. Anyway the 2.0
appimage that I purchased works perfectly except for a lack of an icon, so
I'm not worried. I only tried to build again hoping to offer you with some
feedback as you requested in your earlier email.

On Mon, Dec 2, 2019 at 9:53 PM Boris notifications@github.com wrote:

@mcpalmer1980 https://github.com/mcpalmer1980 sorry it still fails --
I've not tested the app.
After the release lands, I start merging PRs that update the
functionality, and until the next release the app may be broken.

If you'd like the app to build, I'm confident the 2.0.0 release will work,
just check out the master at this point in the commit history:
https://github.com/whyboris/Video-Hub-App/releases/tag/v2.0.0

I'll likely find time in the coming weeks (or at least during my winter
break) to fix the Linux build again so I can release 2.1.0

The build instructions should be as simple as npm run electron:linux ...
I'm unsure why it's not working for you. I built my .appimage in Ubuntu
running inside a virtual machine on Mac ๐Ÿคทโ€โ™‚

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/whyboris/Video-Hub-App/issues/312?email_source=notifications&email_token=ALHMW2B4JGA7PVRO7AXNNXDQWXC3RA5CNFSM4JOHUQIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFX43TQ#issuecomment-560975310,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALHMW2AI2Y5ITNWWMQYTHQDQWXC3RANCNFSM4JOHUQIA
.

I think _node_ has to be at least version 10 (try 10.16.0 or higher; 12 works too ๐Ÿ‘ )

@mcpalmer1980 -- I'm thinking about closing this issue. Please comment if you think it should stay open for some reason ๐Ÿ‘

Closing as I suspect this has been solved. Please feel free to comment or create a new issue as needed ๐Ÿค

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cal2195 picture cal2195  ยท  6Comments

whyboris picture whyboris  ยท  5Comments

cal2195 picture cal2195  ยท  5Comments

cal2195 picture cal2195  ยท  4Comments

cal2195 picture cal2195  ยท  6Comments