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

hplip scanner not found #701

Open
ThomasCr opened this issue Nov 21, 2023 · 3 comments · May be fixed by #726
Open

hplip scanner not found #701

ThomasCr opened this issue Nov 21, 2023 · 3 comments · May be fixed by #726

Comments

@ThomasCr
Copy link

ThomasCr commented Nov 21, 2023

Describe the bug
I use the docker image from docker-hub at sbs20/scanservjs:latest
I have set up my scanner with

environment:
  - DEVICES="hpaio:/net/photosmart_prem_c410_series?ip=192.168.99.134&queue=false"

But it seams, that hpaio is not build in the image. Because a scanimage --device-name="hpaio:/net/photosmart_prem_c410_series?ip=192.168.99.134&queue=false" -A inside the container errors out:
scanimage: open of device hpaio:/net/photosmart_prem_c410_series?ip=192.168.99.134&queue=false failed: Invalid argument

But after I installed the package libsane-hpaio is works. But not at the web gui... there I am getting a dbus error...

A echo hpaio >> /etc/sane.d/dll.conf like shown in your Dockerfile is not need, because it is already there after installing the package:

root@1b54a25693ed:/usr/lib/scanservjs# cat /etc/sane.d/dll.d/hplip 
# dll.conf snippet for hplip
#

hpaio

The dbus error I get is:

{"message":"Command failed: /usr/bin/scanimage -L\nCreated directory: /var/lib/snmp/cert_indexes\ndbus[1896]: arguments to dbus_connection_send() were incorrect, assertion \"connection != NULL\" failed in file ../../../dbus/dbus-connection.c line 3317.\nThis is normally a bug in some application using the D-Bus library.\n\n D-Bus not built with -rdynamic so unable to print a backtrace\nAborted (core dumped)\n","code":134}

Question on that point - is scanimage -L really needed, when I have set my DEVICE environment variable?
It will newer find a scanner automatically, because of the routed docker network.

EDIT:

Ok, I could fix the DBUS error by mount the dbus run dir to the host

    volumes:
      - /var/run/dbus:/var/run/dbus

But the device is still not presented.. It seams, that DEVICES is not handet by current entrypoint.sh

At least I tested to create a config.local.js with the line (like mentioned in https://sbs20.github.io/scanservjs/docs/03-sane.html):

config.devices.push('hpaio:/net/photosmart_prem_c410_series?ip=192.168.99.134&queue=false');

but then I get this error:

+ node ./server/server.js
/etc/scanservjs/config.local.js:1
config.devices.push('hpaio:/net/photosmart_prem_c410_series?ip=192.168.99.134&queue=false');
^
ReferenceError: config is not defined
    at Object.<anonymous> (/etc/scanservjs/config.local.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at new UserOptions (/usr/lib/scanservjs/server/classes/user-options.js:9:22)
    at Application.userOptions (/usr/lib/scanservjs/server/application.js:29:27)
    at Application.config (/usr/lib/scanservjs/server/application.js:39:38)

EDIT2:

okay, got it working with

module.exports = {
  /**
   * @param {Configuration} config
   */
  afterConfig(config) {
        config.devices.push('hpaio:/net/photosmart_prem_c410_series?ip=192.168.99.134&queue=false');
  }
}

but after container restart the addition installed package is lost. Thats not a final solutions.....

Expected behavior
make it possible to use hplip drivers with the docker-hub build.

@ameer1234567890
Copy link

I have this exact problem. Installing libsane-hpaio and refreshing the device list resolves the issue. Please fix.

@itechrene
Copy link

I have this exact problem.

FoxxMD added a commit to FoxxMD/scanservjs-hpaio that referenced this issue Apr 29, 2024
FoxxMD added a commit to FoxxMD/scanservjs-hpaio that referenced this issue Apr 29, 2024
FoxxMD added a commit to FoxxMD/scanservjs-hpaio that referenced this issue Apr 29, 2024
* Removes HPLIP docker stage in favor of installation at run time based on ENV (HP_AIO)
* Automates downloading and installing matching HPLIP binary plugin based on libsane-hpaio installed version using ENV (HP_PLUGIN)

sbs20#701 sbs20#724
@FoxxMD FoxxMD linked a pull request Apr 29, 2024 that will close this issue
@FoxxMD
Copy link

FoxxMD commented Apr 29, 2024

@ThomasCr @ameer1234567890 @itechrene the PR I opened (#726) installs the driver and binary plugin automatically for you when using docker installation. Please check out the docker image I published and let me know if it works for you.

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

Successfully merging a pull request may close this issue.

4 participants