Scanserv-JS Support Thread


moritzf

Recommended Posts

The web interface shows "[object Object]" in the Device drop-down selector, and there's a pop-up error alert which says "Found no devices", but if I drop to Docker console and run scanimage -L, then sane correctly identifies my network attached scanner (both escl and airscan entries). I tried forcing the IP address and airscan entry through the variables, as well as clearing cache, and clearing devices + reload through web interface, but same result. As scanimage finds the scanner, it could it be an issue with the web interface - I'm guessing(!!!) that it doesn't play nice with a web scanner which serves over 443 but does not present a valid certificate....?

 

scanimage -L

device `escl:https://192.168.2.124:443' is a OKI MC363-01C095 flatbed scanner
device `airscan:e0:OKI-MC363-01C095' is a eSCL OKI-MC363-01C095 ip=192.168.2.124

 

Link to comment

Making similar experiences. My scanner is not supported out of the box, but after driver installation scanimage -L works as well. Unfortunately the scanner is not found in the web interface either.

 

Is there anything that needs to be adjusted in the Docker variables?

 

# Installation Epson Drivers inside Docker (temporarily)
docker exec -it scanservjs bash
cp /app/config/iscan-gt-f720-bundle-2.30.4.x64.deb.tar.gz /tmp/
cd /tmp/
tar -xvf iscan-gt-f720-bundle-2.30.4.x64.deb.tar.gz
cd /app/config/iscan-gt-f720-bundle-2.30.4.x64.deb/
./install.sh
...
scanimage -L

Created directory: /var/lib/snmp/cert_indexes
device `epkowa:interpreter:001:009' is a Epson Perfection V30 flatbed scanner

 

image.thumb.png.ad422a17dd17d500e7cb729e6e73d89b.png

 

image.thumb.png.6809d3a74661e7587eb646cd6a4ff28f.png

Edited by Kulisch
Link to comment
2 minutes ago, TheRedSalamander said:

changing the DEVICES variable to what was returned by 'scanimage -L' seems to work for me (i.e. 'epkowa:interpreter:001:009' in your case)

Thanks... After trying various combinations, just having the DEVICES container variable set (not forcing IP or airscan entry) worked. Having more than one variable set pointing to the same scanner resulted in error or mixed results in finding the scanner. 

Link to comment
  • 4 weeks later...

Hi, I have a similiar problem.

 

Printer: Samsung C460FW

This printer is connected over Wifi with address 192.168.178.42 and works fine with all other devices (Windows, Smartphones, etc.). I've installed the scanservjs image from Apps in UNRAID and configured my device with this IP. I've got the error "[object Object]" in the webinterface and no device found.

 

If I try to scan with scanimage in the container it works fine. I use this command:
 

scanimage -d 'airscan:w1:C460W' --format=png --batch='scan_out%d.png' --batch-count=1 --source Flatbed --resolution 150 --mode Color

 

The "airscan:w1:C460W" can be replaced with the IP, it does not make any difference.

In the log from the container I see this log:

 

text  error  warn  system  array  login  


# Test using the following form:
# export SANED_NET_HOSTS="a|b" AIRSCAN_DEVICES="c|d" DELIMITER="|"; ./run.sh

# turn off globbing
set -f
+ set -f

# split at newlines only (airscan devices can have spaces in)
IFS='
'
+ IFS=


# Get a custom delimiter but default to ;
DELIMITER=${DELIMITER:-;}
+ DELIMITER=;

# Insert a list of net hosts
if [ ! -z "$SANED_NET_HOSTS" ]; then
  hosts=$(echo $SANED_NET_HOSTS | sed "s/$DELIMITER/\n/")
  for host in $hosts; do
    echo $host >> /etc/sane.d/net.conf
  done
fi
+ [ ! -z  ]

# Insert airscan devices
if [ ! -z "$AIRSCAN_DEVICES" ]; then
  devices=$(echo $AIRSCAN_DEVICES | sed "s/$DELIMITER/\n/")
  for device in $devices; do
    sed -i "/^\[devices\]/a $device" /etc/sane.d/airscan.conf
  done
fi
+ [ ! -z 192.168.178.42 ]
+ echo 192.168.178.42
+ sed s/;/\n/
+ devices=192.168.178.42
+ sed -i /^\[devices\]/a 192.168.178.42 /etc/sane.d/airscan.conf

unset IFS
+ unset IFS
set +f
+ set +f

node ./server/server.js
+ node ./server/server.js
[2022-11-24T12:18:12.100Z] INFO (server): Started
[2022-11-24T12:19:10.914Z] DEBUG (Http): request:  { method: 'GET', path: '/context' }
[2022-11-24T12:19:10.917Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:19:10.917Z] DEBUG (Devices): Config.devices:  []
[2022-11-24T12:19:10.979Z] DEBUG (Http): request:  { method: 'POST', path: '/preview' }
[2022-11-24T12:19:10.981Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:19:10.981Z] DEBUG (Devices): Config.devices:  []
[2022-11-24T12:19:22.834Z] DEBUG (Http): request:  { method: 'GET', path: '/context' }
[2022-11-24T12:19:22.835Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:19:22.835Z] DEBUG (Devices): Config.devices:  []
[2022-11-24T12:19:22.898Z] DEBUG (Http): request:  { method: 'POST', path: '/preview' }
[2022-11-24T12:19:22.899Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:19:22.899Z] DEBUG (Devices): Config.devices:  []
[2022-11-24T12:31:13.332Z] DEBUG (Http): request:  { method: 'GET', path: '/context' }
[2022-11-24T12:31:13.333Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:31:13.333Z] DEBUG (Devices): Config.devices:  []
[2022-11-24T12:31:13.398Z] DEBUG (Http): request:  { method: 'POST', path: '/preview' }
[2022-11-24T12:31:13.399Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:31:13.399Z] DEBUG (Devices): Config.devices:  []


My docker setting looks like this:

image.thumb.png.26eb6569c6f2e3475fe05519062e6d47.png

 

If I enter the IP address into Devices, then I got this (Invalid Argument):
 

node ./server/server.js
+ node ./server/server.js
[2022-11-24T12:38:44.341Z] ERROR (Devices): Ignoring 192.168.178.42. Error: Error: Command failed: /usr/bin/scanimage -d '192.168.178.42' -A
Output format is not set, using pnm as a default.
scanimage: open of device 192.168.178.42 failed: Invalid argument

[2022-11-24T12:38:44.390Z] ERROR (Devices): Ignoring 192.168.178.42. Error: Error: Command failed: /usr/bin/scanimage -d '192.168.178.42' -A
Output format is not set, using pnm as a default.
scanimage: open of device 192.168.178.42 failed: Invalid argument

[2022-11-24T12:38:39.707Z] INFO (server): Started
[2022-11-24T12:38:44.310Z] DEBUG (Http): request:  { method: 'GET', path: '/context' }
[2022-11-24T12:38:44.313Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:38:44.313Z] DEBUG (Devices): Config.devices:  [ '192.168.178.42' ]
[2022-11-24T12:38:44.384Z] DEBUG (Http): request:  { method: 'POST', path: '/preview' }
[2022-11-24T12:38:44.386Z] DEBUG (Devices): devices.json contains no devices. Reloading
[2022-11-24T12:38:44.386Z] DEBUG (Devices): Config.devices:  [ '192.168.178.42' ]

 

I've tried the last 2 days similiar solutions and so on and don't have any idea how to fix this :( I hope some other person have an idea for this.
Thanks!

Regards

trekki

Link to comment
  • 2 months later...

Good Evening, I'm trying to setup my Scanner (Fujitsu S1500) to scan directly to a folder.
Ideally i'd like to achieve something like this https://chrisschuld.com/2020/01/network-scanner-with-scansnap-and-raspberry-pi/ whereby i can use the button on the scanner too.
I've managed to get scanserv to detect the printer but when I try and scan anything from the webgui, I get errors like these:

 

{"message":"/usr/bin/scanimage -d 'fujitsu:ScanSnap S1500:14890' --mode Color --source 'ADF Duplex' --resolution 300 --page-width 215.8 --page-height 279.3 -l 0 -t 0 -x 215.8 -y 279.3 --format tiff --brightness 0 --contrast 0 --batch=data/temp/~tmp-scan-1-%04d.tif exited with code: 1, stderr: scanimage: open of device fujitsu:ScanSnap S1500:14890 failed: Invalid argument\n","code":-1}

 

or 

 

{"message":"/usr/bin/scanimage -d 'fujitsu:ScanSnap S1500:14890' --mode Lineart --source 'ADF Front' --resolution 600 --page-width 215.8 --page-height 279.3 -l 0 -t 0 -x 215.8 -y 279.3 --format tiff --brightness 0 -o data/temp/~tmp-scan-0-0001.tif exited with code: 9, stderr: scanimage: rounded value of page-width from 215.8 to 215.809\nscanimage: rounded value of page-height from 279.3 to 279.301\nscanimage: rounded value of br-x from 215.8 to 215.809\nscanimage: rounded value of br-y from 279.3 to 279.301\nscanimage: sane_read: Error during device I/O\n","code":-1}


Any idea what i'm doing wrong?

Edited by karldonteljames
Link to comment
  • 7 months later...

Found this in unRAID tools,system devices

Bus 001 Device 005 Port 1-1.1ID 04a9:190a Canon, Inc. CanoScan LiDE 210

From docker termial " sane-find-scanner -q "

got back

found USB scanner (vendor=0x04a9 [Canon], product=0x190a [CanoScan], chip=GL124) at libusb:001:005

" scanimage -L "

Created directory: /var/lib/snmp/cert_indexes
device `genesys:libusb:001:005' is a Canon LiDE 210 flatbed scanner

Change docker Config. add device

/dev/bus/usb/001/005;genesys:libusb:001:005

this works in privileged mode.

Now udev and usb permmisions. Oh my.

 

Link to comment
  • 1 month later...

I had this working with an old Canon Pixima 410 but my replacement scanner will not load in the web interface. I have tried several variations including subbing in the IP address and leaving the Devices field blank in the docker settings menu on Unraid. My Brother ADS-1700W scanner isn't selectable regardless which values I use. From what I understand, I shouldn't need to install additional drivers if the scanimage -L command shows my device. 

# scanimage -L
Created directory: /var/lib/snmp/cert_indexes
device `airscan:w1:ADS1700W' is a WSD ADS1700W ip=192.168.1.123

 

Current docker settings:
Untitled.jpg

Link to comment
  • 3 weeks later...

Hello! Thank you for bringing this docker image into unraid.  I was able to get the scanservjs webserver working. I am able to scan files from the flatbed + feeder and can download the documents from the web server directly.

 

My issue is that scanserv does not save the file to the output folder. I mapped my output folder to a zfs pool first and then my cache pool. I was able to confirm that scanserv can create folders by mapping it to a non-existing folder. How do I begin troubleshooting this? 

 

Of note, the appdata config folder is completely empty. I am not sure if this is normal or related to the folder not being able to write files.

 

RELEVANT INFORMATION:

Unraid version: 6.12.6

Printer: Canon MF264dw

Printer connected by forcing devices from "scanimage -L" into devices variable 

Link to comment
  • 4 weeks later...

I'm in the same boat as cvincible, the scanning works great and I can download the file directly from the Files page, but nothing I scan ends up in the output folder I specified. My appdata config folder is also empty.

 

I'm running Unraid 6.12.6 and I'm scanning with an HP ENVY 5055.

 

Thanks!

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.