Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid option -- 'o' #495

Closed
vbambuch opened this issue Dec 18, 2022 · 15 comments
Closed

invalid option -- 'o' #495

vbambuch opened this issue Dec 18, 2022 · 15 comments
Assignees
Milestone

Comments

@vbambuch
Copy link

Describe the bug
I installed the latest version to my RPI3 and scanning failed for: /usr/bin/scanimage: invalid option -- 'o'

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest version
  2. Try scanning
  3. See the error

Expected behavior
Not sure where exactly is the problem but installing v2.21.0 fixed the issue

Client (please complete the following information):

  • Browser: Chrome
  • Version: 108.0.5359.98

Server (please complete the following information):

  • OS: Debian 10
  • Node version: 16.13
  • NPM version: 8.1

Logs

Dec 18 11:50:33 rpi3 server.js[14205]: [2022-12-18T11:50:33.565Z] ERROR (Http): Error: /usr/bin/scanimage -d 'epson2:libusb:001:011' --mode 'Lineart' --resolution 100 -l 0 -t 0 -x 215.9 -y 297.1 --format 'tiff' -o data/preview/preview.tif exited with code: 1, stderr: scanimage: rounded value of resolution from 100 to 75
Dec 18 11:50:33 rpi3 server.js[14205]: /usr/bin/scanimage: invalid option -- 'o'

Additional context

scanimage -L
device `epson2:libusb:001:004' is a Epson PID 0851 flatbed scanner
@sbs20
Copy link
Owner

sbs20 commented Dec 18, 2022

Most likely this is an old version of scanimage because it's running buster. I will attempt to look into this when I get a chance - I'm always keen to support older systems. But it's also likely resolved if you upgrade to bullseye.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 21, 2022

Hi, I have the same problem. I isolated it to running sudo /usr/bin/scanimage -d 'hpaio:/usb/...' --mode 'Color' --source 'Flatbed' --resolution 300 -l 0 -t 0 -x 210 -y 297 --format 'tiff' --brightness 1000 --contrast 1000 -o data/temp/~tmp-scan-0-0001.tif in terminal, which ends with error:

/usr/bin/scanimage: invalid option -- 'o'

I have older Raspberry OS on this Raspberry Pi. It works well on the second Raspberry Pi with Debian 11. So, could you look at it and possibly add support for older OSes? I though this problem started with the last update.

@sbs20
Copy link
Owner

sbs20 commented Dec 21, 2022

Yeah, I'm working on it. It was this PR

The thing is, that PR fixes other issues... I'm working on it.

Please use an older release for now.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 21, 2022

Thanks for your work. Don't hurry up, it's not too critical.

sbs20 added a commit that referenced this issue Dec 21, 2022
@sbs20 sbs20 self-assigned this Dec 21, 2022
sbs20 added a commit that referenced this issue Dec 21, 2022
sbs20 added a commit that referenced this issue Dec 21, 2022
@sbs20
Copy link
Owner

sbs20 commented Dec 21, 2022

For reference, it was added in 1.0.28 which was after the version used by buster.

This issue is itself a regression because of #417 but only for older versions of scanimage

@sbs20 sbs20 added this to the v2.24.0 milestone Dec 21, 2022
sbs20 added a commit that referenced this issue Dec 21, 2022
sbs20 added a commit that referenced this issue Dec 22, 2022
sbs20 added a commit that referenced this issue Dec 22, 2022
@sbs20
Copy link
Owner

sbs20 commented Dec 22, 2022

Ok. It's not released yet, but the code is on master - would be great if you could give it a go on both buster and debian. I've tested as much as I can but the real world is often different.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 23, 2022

Ok, I'll try it and let you know.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 24, 2022

@sbs20, I tried to run code from the master branch (using similar steps as in https://github.com/sbs20/scanservjs/blob/master/docs/install.md#manual-download-and-install) but I failed. Installation of official release "works" (with the error of this thread). Could you send me any hint, please?

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 24, 2022

Ok, I tried more and finally I got it. On older RaspberryPi OS it works well (the place, where it doesn't work before). The second Raspberry Pi I have is in a different place, so I could test the pre-release after 27th December, if it is ok.

@sbs20
Copy link
Owner

sbs20 commented Dec 24, 2022

Oh nice one! Yeah, no hurry 🎅

@zjph602xtc
Copy link

I have the same problem. Waiting for the new release.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 26, 2022

I have the same problem. Waiting for the new release.

Could you try pre-release version in master branch?

@zjph602xtc
Copy link

I have the same problem. Waiting for the new release.

Could you try pre-release version in master branch?

Thanks for you quick reply.

I tried this: I downloaded the master branch and unzipped it, then

cd /home/pi/Downloads/scanservjs-master/packages
sudo chmod -R 777 server
sudo ./server/installer.sh -i
sudo journalctl -e -u scanservjs

the log shows

Dec 26 05:04:27 raspberrypi systemd[1]: Started scanservjs.
Dec 26 05:04:41 raspberrypi server.js[431]: [2022-12-26T10:04:41.206Z] INFO (server): Started
Dec 26 16:05:33 raspberrypi systemd[1]: Stopping scanservjs...
Dec 26 16:05:33 raspberrypi systemd[1]: scanservjs.service: Main process exited, code=killed, status=15/TERM
Dec 26 16:05:33 raspberrypi systemd[1]: scanservjs.service: Succeeded.
Dec 26 16:05:33 raspberrypi systemd[1]: Stopped scanservjs.
Dec 26 16:18:11 raspberrypi systemd[1]: Started scanservjs.
Dec 26 16:18:11 raspberrypi systemd[13419]: scanservjs.service: Failed to execute command: No such file or directory
Dec 26 16:18:11 raspberrypi systemd[13419]: scanservjs.service: Failed at step EXEC spawning /var/www/scanservjs/server/server.js: No such file or directory
Dec 26 16:18:11 raspberrypi systemd[1]: scanservjs.service: Main process exited, code=exited, status=203/EXEC
Dec 26 16:18:11 raspberrypi systemd[1]: scanservjs.service: Failed with result 'exit-code'.
Dec 26 16:18:11 raspberrypi systemd[1]: scanservjs.service: Service RestartSec=100ms expired, scheduling restart.
Dec 26 16:18:11 raspberrypi systemd[1]: scanservjs.service: Scheduled restart job, restart counter is at 1.
Dec 26 16:18:11 raspberrypi systemd[1]: Stopped scanservjs.

In var/www/scanservjs, there is no server folder, but only the scr folder. I know I did something wrong, but cannot figure out how to do it.

@sbs20 sbs20 closed this as completed Dec 31, 2022
@ceskyDJ
Copy link
Contributor

ceskyDJ commented Dec 31, 2022

Oh, I'm so sorry... I completely forgot about this. The newest release works ok on newer Raspberry Pi with Debian 11, so it should be ok.

@sbs20
Copy link
Owner

sbs20 commented Dec 31, 2022

Oh, I'm so sorry... I completely forgot about this. The newest release works ok on newer Raspberry Pi with Debian 11, so it should be ok.

Ha, don't worry - and certainly no need to apologise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants