hp-setup loop on asking permission

Asked by Francois Ochsenbein

I'm blocked in using hp-setup to install my new HP printer (Envy-photo 7134 ) on a Raspberry by a problem which looks stupid: after entering the various details, hp-setup asks for Username/Password for adding the printer, but whatever is chosen as a user accepted by CUPS, including root, with its associated passwprd (which is correct, verified with a "su" which works) the addition is refused : in gui mode, the Enter Username/Password always comes back, and in line mode (via "hp-setup -i) and finally terminates with

error: Printer queue setup failed. Error : successful-ok-ignored-or-substituted-attributes

Executing hp-setup as root (sudo hp-setup -i) does not solve the problem.

I did use hplip a few years ago, and did not experience such a problem.

Could someone help ? I'm completely lost...

Versions used:
Raspbian Debian 10.4 ; Linux version 5.4.51-v7l+
HPLIP installed: 3.18.12+dfsg0-2+b2

I tried an installation with debug mode (hp-setup -g -i) that I have saved, I could forward if needed.

Thank you in advance for any help

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Francois Ochsenbein
Solved:
Last query:
Last reply:
Revision history for this message
Francois Ochsenbein (f0x1) said :
#1

If this may help, trying to print gives the following error in /var/log/cups/error_log:

E [30/Jul/2020:01:22:23 +0200] HP_ENVY_Photo_7100_series: File \"/usr/lib/cups/filter/hpcups\" not available: No such file or directory
W [30/Jul/2020:01:22:36 +0200] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'HP_ENVY_Photo_7100_series-Gray..\' already exists
W [30/Jul/2020:01:22:36 +0200] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'HP_ENVY_Photo_7100_series-RGB..\' already exists
E [30/Jul/2020:01:22:36 +0200] HP_ENVY_Photo_7100_series: File \"/usr/lib/cups/filter/hpcups\" not available: No such file or directory

Should this file be a script or a binary ?

Revision history for this message
shivani mandora (shivani1708) said :
#2

Hi ,

Looks like your printer ppd has some issue so queue setup is failing.

Can you please provide the output of below command:
$ cupstestppd /usr/share/ppd/HP/envy_photo_7100_series.ppd (first unzip the ppd with .gz )

Revision history for this message
Francois Ochsenbein (f0x1) said :
#3

Hi,

Thank you for your answer ! But there is apparently no cuch file, the contents of /usr/share/ppd/ is minimal:

ls -lR /usr/share/ppd
/usr/share/ppd:
total 8
drwxr-xr-x 2 root root 4096 Sep 8 2019 cupsfilters
drwxrwsr-t 2 root lpadmin 4096 Aug 21 2019 custom

/usr/share/ppd/cupsfilters:
total 92
-rw-r--r-- 1 root root 10936 Apr 17 2019 Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd
-rw-r--r-- 1 root root 10126 Apr 17 2019 Generic-PDF_Printer-PDF.ppd
-rw-r--r-- 1 rootls -lR /usr/share/ppd
/usr/share/ppd:
total 8
drwxr-xr-x 2 root root 4096 Sep 8 2019 cupsfilters
drwxrwsr-t 2 root lpadmin 4096 Aug 21 2019 custom

/usr/share/ppd/cupsfilters:
total 92
-rw-r--r-- 1 root root 10936 Apr 17 2019 Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd
-rw-r--r-- 1 root root 10126 Apr 17 2019 Generic-PDF_Printer-PDF.ppd
-rw-r--r-- 1 root root 18232 Apr 17 2019 HP-Color_LaserJet_CM3530_MFP-PDF.ppd
-rw-r--r-- 1 root root 21204 Apr 17 2019 Ricoh-PDF_Printer-PDF.ppd
-rw-r--r-- 1 root root 9737 Apr 17 2019 pxlcolor.ppd
-rw-r--r-- 1 root root 9468 Apr 17 2019 pxlmono.ppd

/usr/share/ppd/custom:
total 0
 root 18232 Apr 17 2019 HP-Color_LaserJet_CM3530_MFP-PDF.ppd
-rw-r--r-- 1 root root 21204 Apr 17 2019 Ricoh-PDF_Printer-PDF.ppd
-rw-r--r-- 1 root root 9737 Apr 17 2019 pxlcolor.ppd
-rw-r--r-- 1 root root 9468 Apr 17 2019 pxlmono.ppd

/usr/share/ppd/custom:
total 0

I checked the hplip*deb files I have:
 ls -l /var/cache/apt/archives/hplip*
-rw-r--r-- 1 root root 6742264 Dec 10 2018 /var/cache/apt/archives/hplip-data_3.18.12+dfsg0-2_all.deb
-rw-r--r-- 1 root root 671528 Dec 10 2018 /var/cache/apt/archives/hplip-doc_3.18.12+dfsg0-2_all.deb
-rw-r--r-- 1 root root 100852 Dec 10 2018 /var/cache/apt/archives/hplip-gui_3.18.12+dfsg0-2_all.deb
-rw-r--r-- 1 root root 276248 Dec 21 2018 /var/cache/apt/archives/hplip_3.18.12+dfsg0-2+b1_armhf.deb
-rw-r--r-- 1 root root 276220 Apr 25 19:22 /var/cache/apt/archives/hplip_3.18.12+dfsg0-2+b2_armhf.deb

... but no ppd included therein,
for f in /var/cache/apt/archives/hplip*; do dpkg -c $f | grep ppd ; done
it looks like no

Could womething be wrong with the deb files ? Did I miss some package ?

Revision history for this message
Francois Ochsenbein (f0x1) said :
#4

Finally I removed & purged CUPS and HPLIP packages on my Raspberry, and re-installed those. I could finally run hp-setup, and get the "/etc/cups/ppd/ENVY_Photo_7100.ppd" file -- alas, the very last operation (print a test page) fails... and a look in the cups error_log file contains the error:

prnt/backend/hp.c 824: ERROR: open device failed stat=12: hp:/usb/ENVY_Photo_7100_series?serial=TH04XFT09T
PID 32089 (/usr/lib/cups/backend/hp) stopped with status 1.

... and any attempt to print ends up with this error.

I tried the "hp-check" utility , which returns:

/Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 265, in walkFiles
    names = os.listdir(root)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 267, in walkFiles
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/hp-check", line 861, in <module>
    dep.core.init()
  File "/usr/share/hplip/installer/core_install.py", line 527, in init
    self.check_dependencies(callback)
  File "/usr/share/hplip/installer/core_install.py", line 620, in check_dependencies
    self.have_dependencies[d] = self.dependencies[d][3]()
  File "/usr/share/hplip/installer/core_install.py", line 1241, in check_policykit
    if check_file('PolicyKit.conf', "/etc/PolicyKit") and check_file('org.gnome.PolicyKit.AuthorizationManager.service', "/usr/share/dbus-1/services"):
  File "/usr/share/hplip/installer/dcheck.py", line 107, in check_file
    for w in utils.walkFiles(dir, recurse=True, abs_paths=True, return_folders=False, pattern=f):
RuntimeError: generator raised StopIteration

Never saw such a "/etc/PolicyKit" file... any idea about what I could do to solve the problem ?

Thans you in advance !

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

This looks similar to Bug #1796864

Revision history for this message
Francois Ochsenbein (f0x1) said :
#6

Thank you, but I couldn't find therein an immediate solution for my problem... but finally I could have the printer working by removing and installing the printer within cups ! But when installing the printer via cups, its queue name is ENVY_Photo_7100, and the printer is not found by hp-toolbox ; and when installed it again via hp-setup, its queue name is HP_ENVY_Photo_7100_series, and can be seen by hp-toolbox ! At least the printer is working, I'll look further in the other options of bug#1796864, especially the driverless possibilities. However hp-check still doesn't work, and hp-octor stops immediately with lthe message

error: cupsext not present in the system. Please re-install HPLIP.

which I can't understand either...

Revision history for this message
Francois Ochsenbein (f0x1) said :
#7

Sorry, I didn't check more about the driverless possibilities; let's say the problem is solved, even if some utilities don't work ; by the way, the problem with hp-doctor is that it's the last utility using python2, and the cupsext function to be imported are compiled only for python3 ; I guess a future release will use python3 instead of python2 ? Should this problem with hp-doctor be marked as a bug ? Is there a way to easily fix the problem ?

Anyway, I'm marking the problem as solved :-)