garronej / chan-dongle-extended-pages

https://garronej.github.io/chan-dongle-extended-pages/
8 stars 5 forks source link

An error occurred: 'Cannot read property '1' of null #8

Open MatejKovacic opened 1 year ago

MatejKovacic commented 1 year ago

I am opening a new issue, because I just realised #2 is closed.

So, I have run into the same error. I have RaspberryPi 4, running RasPBX (Raspbian GNU/Linux 10 (buster) - Linux raspbx 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux).

I ran: wget -nc -q -O - garronej.github.io/chan-dongle-extended-pages/install.sh | sudo bash

And this happens:

[sudo] password for matej: 
/tmp/dongle.tar.gz  100%[===================>]  24,98M  2,26MB/s    in 11s     
Extracting.........................................................................---Installing chan_dongle---
Installing or upgrading git package...DONE
Looking for python ... python executable found. OK
Installing or upgrading python-pip package...DONE
Looking for python-setuptools ... python-setuptools is installed. OK
Installing virtualenv...DONE
Looking for build-essential ... build-essential is installed. OK
Installing or upgrading libudev-dev package...DONE
Building node_modules dependencies if needed...DONE
An error occurred: 'Cannot read property '1' of null

OK, what I did next...

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g npm@latest-5

git clone https://github.com/garronej/chan-dongle-extended

cd chan-dongle-extended/

npm run partial_install
npm run release

That went well. Then I run: npm install, and got this error:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.10.103-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release"
gyp ERR! cwd /home/matej/chan-dongle-extended/node_modules/serialport
gyp ERR! node -v v10.24.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
make: *** [serialport.target.mk:97: Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/home/matej/chan-dongle-extended/node_modules/serialport/build'
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/matej/chan-dongle-extended/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.10.103-v7l+
node-pre-gyp ERR! command "/usr/bin/node" "/home/matej/chan-dongle-extended/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/matej/chan-dongle-extended/node_modules/serialport
node-pre-gyp ERR! node -v v10.24.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp gypERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release' (1)
 ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.10.103-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/matej/chan-dongle-extended/node_modules/serialport/build/Release"
gyp ERR! cwd /home/matej/chan-dongle-extended/node_modules/serialport
gyp ERR! node -v v10.24.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@github:EmergingTechnologyAdvisors/node-serialport#4a2a3cfae7ecba4e22e9c6d4cf7dfb7ec64324f6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the serialport@github:EmergingTechnologyAdvisors/node-serialport#4a2a3cfae7ecba4e22e9c6d4cf7dfb7ec64324f6 install 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/matej/.npm/_logs/2022-12-07T21_26_24_765Z-debug.log

I am also attaching full error log (in the next message). Any idea what does all this means and what could be the problem?

MatejKovacic commented 1 year ago

Full debug log: 2022-12-07T21_26_24_765Z-debug.log

garronej commented 1 year ago

Hi @MatejKovacic,

Sorry it's been a long time since I touched this project.
It's probably not much, it needs some adaptation to the latest Raspbian version.
Unfortunately I don't have a Raspberry PI setup at the moment.
If you setup an SSH access to your PI I might find the time to see what's up and provide a patch this week end.

I can't promise anything though

MatejKovacic commented 1 year ago

Hi, unfortunately I was unable to set up access to my RaspberryPi, because I am using it behind NAT.

But I managed to run the installer with the help of my friend. We used NPM 10.

Anyway, it is not working, because it requires installation of asterisk-dev package:


---Installing chan_dongle---
Assertion failed
Assertion failed
Installing or upgrading asterisk-dev package... 
$ apt-get update || true 
$ apt-get -y install asterisk-dev 
Command failed: apt-get -y install asterisk-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
An error occurred: 'Command failed: apt-get -y install asterisk-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ rm -rf /etc/udev/rules.d/98-chan_dongle.rules {"stdio":"pipe"}
$ systemctl restart udev.service {"stdio":"pipe"}
$ rm -f /lib/modules/$(uname -r)/kernel/drivers/misc/tty0tty.ko {"stdio":"pipe"}
$ rm -r /home/matej/chan-dongle-extended/working_directory {"stdio":"pipe"}
$ systemctl enable ModemManager {"stdio":"pipe"}
$ systemctl start ModemManager {"stdio":"pipe"}

My friend says the project needs a lot of further development and it is not usable in current state. So if you have some spare time...

garronej commented 1 year ago

Not a lot, just some little adjustments...
You should be able to connect to your box and forward ports to your raspberry pi...

MatejKovacic commented 1 year ago

I will try to do that. Will send you access. Do you have some e-mail or something, that I do not publish access to my server here?

garronej commented 1 year ago

joseph.garrone.gj@gmail.com