CasparCG / media-scanner

A service used with CasparCG Server software for scanning media located on the server. Queried with query and thumbnail commands through CasparCG Server using AMCP.
https://casparcg.com
GNU Lesser General Public License v3.0
31 stars 33 forks source link

media-scanner executable fails to start on linux #42

Closed muxlux closed 1 year ago

muxlux commented 5 years ago

ubuntustudio 18.04, fx6300, gtx 980 node v8.0

`

/media-scanner-thumbnail_fix$ npm run build-linux

> scanner@1.0.0 build-linux /home/mux/Downloads/media-scanner-thumbnail_fix > (rm -rf dist || true) && npm run remove-fauxton-linux && pkg -t node8-linux src/index.js -o dist/scanner && cp ./node_modules/leveldown/build/Release/leveldown.node ./dist

> scanner@1.0.0 remove-fauxton-linux /home/mux/Downloads/media-scanner-thumbnail_fix > npm run remove-fauxton-package && (rm node_modules/express-pouchdb/lib/routes/fauxton.js || true)

> scanner@1.0.0 remove-fauxton-package /home/mux/Downloads/media-scanner-thumbnail_fix > json -I -f node_modules/express-pouchdb/package.json -e "this.dependencies[\"pouchdb-fauxton\"] = undefined"

json: updated "node_modules/express-pouchdb/package.json" in-place > pkg@4.3.7 > Fetching base Node.js binaries to PKG_CACHE_PATH fetched-v8.11.3-linux-x64 [====================] 100% > Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/notifu/notifu.exe path-to-executable/notifier/notifu.exe > Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/notifu/notifu64.exe path-to-executable/notifier/notifu64.exe > Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier path-to-executable/notifier/terminal-notifier > Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe path-to-executable/notifier/SnoreToast.exe b>mux@muxrec</b:~/Downloads/media-scanner-thumbnail_fix$ cd ~/CasparBuild/ b>mux@muxrec</b:~/CasparBuild$ ./scanner pkg/prelude/bootstrap.js:1178 throw error; ^

Error: Unexpected close tag Line: 8 Column: 75 Char: > at error (/snapshot/media-scanner-thumbnail_fix/node_modules/sax/lib/sax.js:651:10) at strictFail (/snapshot/media-scanner-thumbnail_fix/node_modules/sax/lib/sax.js:677:7) at closeTag (/snapshot/media-scanner-thumbnail_fix/node_modules/sax/lib/sax.js:871:9) at SAXParser.write (/snapshot/media-scanner-thumbnail_fix/node_modules/sax/lib/sax.js:1436:13) at Parser.exports.Parser.Parser.parseString (/snapshot/media-scanner-thumbnail_fix/node_modules/xml2js/lib/parser.js:322:31) at Parser.bind [as parseString] (/snapshot/media-scanner-thumbnail_fix/node_modules/xml2js/lib/parser.js:5:59) at Object.<anonymous> (/snapshot/media-scanner-thumbnail_fix/src/config.js:0:0) at Module._compile (pkg/prelude/bootstrap.js:1254:22) at Object.Module._extensions..js (module.js:661:10) at Module.load (module.js:563:32)

`

multiflexi commented 5 years ago

Try first running npm install and then npm run build-linux

muxlux commented 5 years ago

i did before here's the result:

$ npm run build-linux

scanner@1.0.0 build-linux /home/mux/Desktop/media-scanner-master (rm -rf dist || true) && npm run remove-fauxton-linux && pkg -t node8-linux src/index.js -o dist/scanner && cp ./node_modules/leveldown/build/Release/leveldown.node ./dist

scanner@1.0.0 remove-fauxton-linux /home/mux/Desktop/media-scanner-master npm run remove-fauxton-package && (rm node_modules/express-pouchdb/lib/routes/fauxton.js || true)

scanner@1.0.0 remove-fauxton-package /home/mux/Desktop/media-scanner-master json -I -f node_modules/express-pouchdb/package.json -e "this.dependencies[\"pouchdb-fauxton\"] = undefined"

json: updated "node_modules/express-pouchdb/package.json" in-place

pkg@4.3.0 Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/notifu/notifu.exe path-to-executable/notifier/notifu.exe Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/notifu/notifu64.exe path-to-executable/notifier/notifu64.exe Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier path-to-executable/notifier/terminal-notifier Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe path-to-executable/notifier/SnoreToast.exe Error! Unexpected token (32:74) /home/mux/Desktop/media-scanner-master/node_modules/prompts/lib/index.js npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! scanner@1.0.0 build-linux: (rm -rf dist || true) && npm run remove-fauxton-linux && pkg -t node8-linux src/index.js -o dist/scanner && cp ./node_modules/leveldown/build/Release/leveldown.node ./dist npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the scanner@1.0.0 build-linux script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/mux/.npm/_logs/2019-08-15T16_07_39_833Z-debug.log

multiflexi commented 5 years ago

What version of node do you have? I used the stock from Ubuntu 18.04 repo.

muxlux commented 5 years ago

Thank you for responding i <3 casparcg but not windows

node version 8.16.0 i'm on ubuntustudio 18.04 & will uninstall node & install ubuntu's default thnaks, again 🤞

On Thu, Aug 15, 2019 at 10:02 AM multiflexi notifications@github.com wrote:

What version of node do you have? I used the stock from Ubuntu 18.04 repo.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CasparCG/media-scanner/issues/42?email_source=notifications&email_token=AARMTYS3GW22QMCXE3YSCV3QEWD3ZA5CNFSM4H65RI4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4MMN2A#issuecomment-521717480, or mute the thread https://github.com/notifications/unsubscribe-auth/AARMTYTYM74EOWT3MGLO3T3QEWD3ZANCNFSM4H65RI4A .

muxlux commented 5 years ago

i got the same version from ubuntu repo & same error :/

On Thu, Aug 15, 2019 at 10:07 AM robb sf99er@gmail.com wrote:

Thank you for responding i <3 casparcg but not windows

node version 8.16.0 i'm on ubuntustudio 18.04 & will uninstall node & install ubuntu's default thnaks, again 🤞

On Thu, Aug 15, 2019 at 10:02 AM multiflexi notifications@github.com wrote:

What version of node do you have? I used the stock from Ubuntu 18.04 repo.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CasparCG/media-scanner/issues/42?email_source=notifications&email_token=AARMTYS3GW22QMCXE3YSCV3QEWD3ZA5CNFSM4H65RI4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4MMN2A#issuecomment-521717480, or mute the thread https://github.com/notifications/unsubscribe-auth/AARMTYTYM74EOWT3MGLO3T3QEWD3ZANCNFSM4H65RI4A .

multiflexi commented 5 years ago

What if I send you the one I built? Would that work?

muxlux commented 5 years ago

i guess something's wrong with my nodejs/npm or casparcg build

i successfully built scanner again on a fresh ubuntu 18.04 install but when i run it on my ubuntustudio 18.04 it throws the old

at error (/snapshot/media-scanner.../lib/sax.js:651:10) as follows:

$ ./scanner pkg/prelude/bootstrap.js:1172 throw error; ^

Error: Unexpected close tag Line: 8 Column: 75 Char: > at error (/snapshot/media-scanner-master/node_modules/sax/lib/sax.js:651:10) at strictFail (/snapshot/media-scanner-master/node_modules/sax/lib/sax.js:677:7) at closeTag (/snapshot/media-scanner-master/node_modules/sax/lib/sax.js:871:9) at SAXParser.write (/snapshot/media-scanner-master/node_modules/sax/lib/sax.js:1436:13) at Parser.exports.Parser.Parser.parseString (/snapshot/media-scanner-master/node_modules/xml2js/lib/parser.js:322:31) at Parser.bind [as parseString] (/snapshot/media-scanner-master/node_modules/xml2js/lib/parser.js:5:59) at Object. (/snapshot/media-scanner-master/src/config.js:0:0) at Module._compile (pkg/prelude/bootstrap.js:1243:22) at Object.Module._extensions..js (module.js:644:10) at Module.load (module.js:552:32)

however :) scanner runs on the fresh install of ubuntu 18.04

i'm going to try again on a fresh install of ubuntustudio to see if something was wrong with my system or ubuntustudio generally

thank you so very much for helping me get back to sanity i'm looking forward to playing with the html producer & updated chromium

On Thu, Aug 15, 2019 at 11:04 AM multiflexi notifications@github.com wrote:

What if I send you the one I built? Would that work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CasparCG/media-scanner/issues/42?email_source=notifications&email_token=AARMTYUNKHQ5FOTONMPRZBTQEWLEJA5CNFSM4H65RI4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4MRR3I#issuecomment-521738477, or mute the thread https://github.com/notifications/unsubscribe-auth/AARMTYXLOXSMQICQORFLUILQEWLEJANCNFSM4H65RI4A .

hreinnbeck commented 5 years ago

That sax.js errors is likely because you have an invalid casparcg.config file. Check your config: https://casparcg.net/validator/

muxlux commented 5 years ago

uhg, i installed nvidia driver 390, rebooted & now i'm back to same error as above when i try to start scanner on ubuntu 18.04

casparcg.config had some backslashes / on the right side of the element tags but it otherwise looked good

server & scanner are now built & running without errors after reinstalling OS & installing nvidia drivers before building from source

thank you for the help