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

Service Crashes on Multiple Page Scan #806

Closed
CharlieSquared opened this issue Nov 29, 2023 · 1 comment
Closed

Service Crashes on Multiple Page Scan #806

CharlieSquared opened this issue Nov 29, 2023 · 1 comment
Labels

Comments

@CharlieSquared
Copy link

CharlieSquared commented Nov 29, 2023

The second page of a scan gets the same file name as page one causing an unlink error.

Device: HP Officejet Pro 7740

Command line or Docker :

docker run
  -d
  --name='scan-hp-node'
  --net='bridge'
  -e TZ="America/Chicago"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Bakery"
  -e HOST_CONTAINERNAME="scan-hp-node"
  -e 'IP'='10.0.10.37'
  -e 'PATTERN'='"scan"_dd-mm-yyyy_hh-MM-ss'
  -e 'PGID'='100'
  -e 'PUID'='99'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://i.ibb.co/SshKGrH/Colors-HP-Logo.jpg'
  -v '/tmp/scan_temp':'/scan':'rw'
  --hostname Fileserver 'manuc66/node-hp-scan-to:latest'

Error log

Target folder: /scan
Temp folder: /tmp/scan-to-pcGmccBj
Running iteration: 0 - errorCount: 0
Host destinations fetched: Fileserver
Re-using existing destination: Fileserver - /WalkupScanToComp/WalkupScanToCompDestinations/1cac60a9-5f4e-1f09-8164-040e3cf9f1dc
Using: Fileserver
Waiting scan event for: /WalkupScanToComp/WalkupScanToCompDestinations/1cac60a9-5f4e-1f09-8164-040e3cf9f1dc
Start listening for new ScanEvent
Scan event captured, saving scan #0
Waiting user input: 1/50
Waiting user input: 2/50
Selected shortcut: SavePDF
Scan will be converted to pdf, using /tmp/scan-to-pcGmccBj as temp scan output directory for individual pages
ScanPlexMode is : Simplex
Afd is : Loaded
New job created: http://10.0.10.37:8080/Jobs/JobList/87
Ready to download page job page 1 at: /Scan/Jobs/87/Pages/1
Page downloaded to: /tmp/scan-to-pcGmccBj/scan_29-11-2023_04-01-20.jpg
Ready to download page job page 2 at: /Scan/Jobs/87/Pages/2
Page downloaded to: /tmp/scan-to-pcGmccBj/scan_29-11-2023_04-01-20.jpg
Job state: Completed, totalPages: 2:
Scan of page(s) completed totalPages: 2:
The following page(s) have been rendered inside '/scan/scan_29-11-2023_04-01-20.pdf': 
        - page   1 - 1654x2204
        - page   2 - 1654x2204
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, unlink '/tmp/scan-to-pcGmccBj/scan_29-11-2023_04-01-20.jpg'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'unlink',
  path: '/tmp/scan-to-pcGmccBj/scan_29-11-2023_04-01-20.jpg'
}

Node.js v18.18.2
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
@manuc66
Copy link
Owner

manuc66 commented Nov 29, 2023

Reproduced, fix ongoing

manuc66 added a commit that referenced this issue Nov 29, 2023
…rash

Fix Service Crashes on Multiple Page Scan #806
@manuc66 manuc66 closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants