-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add check that convert
is a file and not a directory
#156
Comments
Hi. I just did a clean install on a pi and it seems to work. Did you use the install script? The problem you are seeing is on "preview". Specifically, scanservjs is running My further guess is that the owner of [sbs20 @ pi]: ~> $ ls -al /var/www/scanservjs/data/preview/
total 3168
drwxr-xr-x 2 scanservjs users 4096 Apr 1 09:01 . The software is meant to run as the same user Whereas it looks above like you're running this as the default Just try: |
Yes, I've used the install script. I've tried it again:
Checked the folder permission |
UPDATE I thought I'd reproduced the issue, but it was a leftover test case from earlier today where I'd forcibly set the owner of Thanks for the update. Very odd. Would you be up for trying the following? It recreates what scanimage is doing: # Change PWD to app dir
cd /var/www/scanservjs
# Be the scanservjs user
sudo su scanservjs
# Run a scan
/usr/bin/scanimage -d 'hpaio:/usb/Photosmart_C4200_series?serial=MY78OJM0MZ04VP' --mode 'Color' --source 'Flatbed' --resolution 75 -l 0 -t 0 -x 215 -y 296 --format 'tiff' --brightness 0 --contrast 0 > ./data/temp/~tmp-scan-0-0001.tif
# See what's created
ls -al ./data/temp/
# Create the preview - it's this which is failing
/usr/bin/convert './data/temp/~tmp-scan-0-0001.tif' -background '#808080' -extent '634.8425196850394x874.0157480314961-0-0' -resize 868 './data/preview/preview.tif' |
I found the error. The last command failed, because
Now it works. Either the previous installation was corrupt or not suitable for scanservjs (I've used this one before I found scanservjs) or while trying to fix the error I've made a mistake. Thank you so much for your fast help! Is there a way I can buy you a coffee/beer? |
Hooray!! I'm so pleased you found the problem - I even installed node 15 to see if that would recreate it! Thank you for letting me know. I am going to reopen this issue and add a check that
My pleasure! I don't have a way at the moment, but it's a kind offer. Just pay it forward 😄 |
convert
is a file and not a directory
Describe the bug
I can't save the scan after scanning.
To Reproduce
Steps to reproduce the behavior:
TypeError: NetworkError when attempting to fetch resource.
appears{"message":"/usr/bin/convert './data/temp/~tmp-scan-0-0001.tif' -background '#808080' -extent '634.8425196850394x874.0157480314961-0-0' -resize 868 './data/preview/preview.tif' exited with code: 126, stderr: /bin/sh: 1: /usr/bin/convert: Permission denied\n","code":-1
. Hopefully I haven't made any spelling mistakes, the error message cannot be copied.Expected behavior
The scan is downloaded
Screenshots
First error:
Second error:
Error when running node server/server.js:
Client (please complete the following information):
Server (please complete the following information):
Logs
scanservjs.log.installed.txt
The text was updated successfully, but these errors were encountered: