Update BB after installtion with Image fails


#1

Hi all,

After a couple of weeks testing, I tried last week to modify some parts of the software. Obviously this didn't work well, at least for the BB. So I got myself an SDcard and installed the image OpenROV-2.5-05.img.7z.

This works very well and I can see the Cockpit and use it.

BUT, as soon as i would like to update to the latest release, the cockpit disappears and is not available. (Chrom replies Oops)

I tried it with the script and with the manual way. If I do the manual way, then after step 5 (Start the OpenROV software again), the cockpit is not available.

Then I tried step 6, which ends with the following message:

root@OpenROV:/opt/openrov# cd /opt/openrov

root@OpenROV:/opt/openrov# rm -rf node_modules

root@OpenROV:/opt/openrov# npm install

bash: npm: command not found

root@OpenROV:/opt/openrov#

The error log shows the following message after the automatic update script:

root@OpenROV:/opt/openrov# sudo /etc/init.d/openrov start

* Starting OpenROV NodeJS server openrov * ---> started OpenROV NodeJS server openrov [ OK ]

root@OpenROV:/opt/openrov# tail -200 /var/log/openrov.log

/opt/openrov/src/cockpit.js:27

app.configure(function () {

^

TypeError: Object function (req, res, next) {

app.handle(req, res, next);

} has no method 'configure'

at Object.<anonymous> (/opt/openrov/src/cockpit.js:27:5)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Function.Module.runMain (module.js:497:10)

at startup (node.js:119:16)

at node.js:901:3

/opt/openrov/src/cockpit.js:27

app.configure(function () {

^

TypeError: Object function (req, res, next) {

app.handle(req, res, next);

} has no method 'configure'

at Object.<anonymous> (/opt/openrov/src/cockpit.js:27:5)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Function.Module.runMain (module.js:497:10)

at startup (node.js:119:16)

at node.js:901:3

/opt/openrov/src/cockpit.js:27

app.configure(function () {

^

TypeError: Object function (req, res, next) {

app.handle(req, res, next);

} has no method 'configure'

at Object.<anonymous> (/opt/openrov/src/cockpit.js:27:5)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Function.Module.runMain (module.js:497:10)

at startup (node.js:119:16)

at node.js:901:3

',

OpenROVController: './lib/OpenROVController',

FirmwareInstaller: './lib/FirmwareInstaller',

Hardware: './lib/Hardware' }

info: socket.io started

config { debug: true,

debug_commands: false,

production: true,

sample_freq: 20,

dead_zone: 10,

video_frame_rate: 10,

video_resolution: 'SXGA',

video_device: '/dev/video0',

video_port: 8090,

port: 8080,

serial: '/dev/ttyO1',

serial_baud: 115200,

preferences:

{ stores: { file: [Object], defaults: [Object] },

sources: [],

version: '0.6.9',

Argv: [Getter],

Env: [Getter],

File: [Getter],

Literal: [Getter],

Memory: [Getter],

key: [Function],

path: [Function],

loadFiles: [Function],

loadFilesSync: [Function],

formats: { json: [Object], ini: [Object] },

Provider: [Function] },

OpenROVCamera: './lib/OpenROVCamera',

OpenROVController: './lib/OpenROVController',

FirmwareInstaller: './lib/FirmwareInstaller',

Hardware: './lib/Hardware' }

info: socket.io started

cockpit.js has exited after 3 restarts

root@OpenROV:/opt/openrov#


#2

In my experience I've just been using the latest image files on the github releases page(and telling my friends to do the same). I am not sure if that cooler auto-update stuff works yet.


#3

Thanks Matthew, I tried this too, sadly no success (as i would like to use the actual release code)

I had some kind of progress, after I was able to start npm install routine with /opt/node/bin/npm install

the following error appears:

node-pre-gyp http 404 https://node-serialport.s3.amazonaws.com/serialport/v1.4.0/Release/...
node-pre-gyp ERR! Source compile required: 404 status code downloading tarball

I deleted the serial-monitor plugin, but stil no success... :-(

Attached is the putty output. To be honest, I don't know what else I could try, excepting using the old code from Dec 13

637-PuttyOutput.txt (10.3 KB)

#4

Hey everyone,

We are working on some better more full proof update in place solutions. We made some fairly major moves to the github repo and I have not tested to ensure the update.sh still works as is or if we need to modify it do do a completly clean update:

cd /opt/openrov

git fetch origin git reset --hard origin/master

The update.sh should then work. As for the the serialport... there is something odd about that package. Someone thought there may still be some permission issues but the thing is, if you try a couple times it will eventually compile properly. It has not been very high priority to troubleshoot as most people are updating based on just refreshing the SD card with the latest image (the daily build is coming). If you do figure it out what is going on with the serialport package, please let us know!

-Brian


#5

i have the same problem last week but manage to fix it. the main issues are with node module configuration and installation. here is some my note

  • serialport--> need to compile using node v11 -->sudo apt-get upgrade node

  • socket.io--> socket.io-client --> active-x-obfuscator-->zeparser: don’t know why this package didn’t automatically update--> manual update

  • the source code in /opt/openrov/src is compatible with express <4.0, so need to downgrade express to 3.4.8 -->edit package.json in /opt/openrov: change '>=3.4.8' to '3.4.8'


#6

I'll look in to your first two findings. The express update has been pinned to 3.4.8 in the master repo as of yesterday.

Thanks!

-Brian


#7

Hi Brian,

Thanks for your help!

I managed to fix it with your comment:

cd /opt/openrov

git fetch origin git reset --hard origin/master

This helped finally and I could do my first sea trials :-)


#8

Hi Brian

I tried the git fetch origin git reset --hard origin/master but had an error where it did not know the hard option.

I tried it with out and it seemed to work ok. git fetch origin git

/opt/openrov

git fetch origin git

sudo rm -rf node_modules

npm install

all seemed to go ok without error.

after rebooting the BBB I was not able to browse to the cockpit on port 8080 but I could get to port 3131 and could 9

is there something that i am missing?

Thanks