cyanfish / naps2

Scan documents to PDF and more, as simply as possible.

Home Page:https://www.naps2.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to import document after scanning Canon MF3010

ostasevych opened this issue · comments

Hi! I used to use naps2 quite long time ago, converting usual MFAs to the network scanning/printing devices with the help of OpenWrt+p910nd+saned on a small router side (eg nexx or gl.inet), and the sanetwain middleware on the Windows 10 clients.

Last week I've got Canon MF3010, which is good with local scanning/printing, however there's an issue when trying to perform networking scanning through TWAIN option. The naps2 client initiates the scanning but fails to import the results of the scanning using internal (native or memory) transfer without any error. I tried different options for the transfer, none of them were working.

Though, using the native sanetwain interface it works well, but it complicates the usage of the software.

Is it possible to fix that somehow? If yes, how?

Please follow these instructions to collect debug logs.

You can also try setting up AirSane-OpenWrt which will let NAPS2 connect using "ESCL Driver" directly, no middleware needed.

Sadly, my device Nexx WT3020F has only 8M so airsane is not possible to install (at least without building custom image):

Regarding the debug logs, here are they:

2024-02-10 16:32:46.3773 11080 Debug: Using new dsm. 
2024-02-10 16:32:46.5100 11080 Debug: NTwain internal message loop is starting. 
2024-02-10 16:32:46.5479 11080 Debug: Thread 14: OpenManager. 
2024-02-10 16:32:46.5957 11080 Debug: Using TWAIN2 memory functions. 
2024-02-10 16:32:46.5977 11080 Debug: Source id = 1 
2024-02-10 16:32:46.5977 11080 Debug: Source id = 2 
2024-02-10 16:32:46.5977 11080 Debug: Source id = 3 
2024-02-10 16:32:46.5977 11080 Debug: Thread 14: CloseManager. 
2024-02-10 16:32:50.8747 10640 Debug: Using new dsm. 
2024-02-10 16:32:50.9595 10640 Using TWAIN DSM: C:\Program Files\NAPS2\lib\_win32\twaindsm.dll 
2024-02-10 16:32:50.9595 10640 NAPS2.TW - Opening session 
2024-02-10 16:32:50.9784 10640 Debug: Thread 1: OpenManager. 
2024-02-10 16:32:51.0233 10640 NAPS2.TW - StateChanged (to 3) 
2024-02-10 16:32:51.0233 10640 Debug: Using TWAIN2 memory functions. 
2024-02-10 16:32:51.0233 10640 NAPS2.TW - Finding source 
2024-02-10 16:32:51.0233 10640 Debug: Source id = 1 
2024-02-10 16:32:51.0233 10640 NAPS2.TW - Opening source 
2024-02-10 16:32:51.0422 10640 NAPS2.TW - Name: SaneTwain; Manu: Herman Kuiper; Family: SaneTwain bridge; Version: 1.37 Version 1.37; Protocol: 1.8 
2024-02-10 16:32:51.0422 10640 Debug: Thread 1: OpenSource. 
2024-02-10 16:32:54.9140 10640 NAPS2.TW - StateChanged (to 4) 
2024-02-10 16:32:54.9140 10640 Debug: Registered callback2 OK. 
2024-02-10 16:32:54.9140 10640 NAPS2.TW - Configuring source 
2024-02-10 16:33:13.1889 10640 NAPS2.TW - Enabling source 
2024-02-10 16:33:13.1960 10640 Debug: Thread 1: EnableSource with NoUI. 
2024-02-10 16:33:14.3702 10640 NAPS2.TW - Finishing with error 
2024-02-10 16:33:14.3702 10640 Debug: Thread 1: CloseSource. 
2024-02-10 16:33:14.3702 10640 Debug: Registered callback2 OK. 
2024-02-10 16:33:14.3792 10640 Debug: Thread 1: CloseManager. 
2024-02-10 16:33:14.6746 10640 NAPS2.TW - StateChanged (to 2) 

Please, give your advice, what may be improved?

It looks like NAPS2 isn't logging the error correctly. Can you use this test version, turn on debug logging in it, and try again? (And then the debuglog.txt file will be in the Data folder of the extracted zip.)

naps2-7.3.1-testtwain.zip

It looks like NAPS2 isn't logging the error correctly. Can you use this test version, turn on debug logging in it, and try again? (And then the debuglog.txt file will be in the Data folder of the extracted zip.)

naps2-7.3.1-testtwain.zip

@cyanfish Here is the debug log:

2024-02-13 14:05:08.0929 2452 Debug: Using new dsm. 
2024-02-13 14:05:08.1836 2452 Using TWAIN DSM: C:\Users\Administrator\Downloads\naps2-7.3.1-testtwain\App\lib\_win32\twaindsm.dll 
2024-02-13 14:05:08.1946 2452 NAPS2.TW - Opening session 
2024-02-13 14:05:08.2035 2452 Debug: Thread 1: OpenManager. 
2024-02-13 14:05:08.2534 2452 NAPS2.TW - StateChanged (to 3) 
2024-02-13 14:05:08.2534 2452 Debug: Using TWAIN2 memory functions. 
2024-02-13 14:05:08.2534 2452 NAPS2.TW - Finding source 
2024-02-13 14:05:08.2534 2452 Debug: Source id = 1 
2024-02-13 14:05:08.2534 2452 NAPS2.TW - Opening source 
2024-02-13 14:05:08.2723 2452 NAPS2.TW - Name: SaneTwain; Manu: Herman Kuiper; Family: SaneTwain bridge; Version: 1.37 Version 1.37; Protocol: 1.8 
2024-02-13 14:05:08.2723 2452 Debug: Thread 1: OpenSource. 
2024-02-13 14:05:12.7055 2452 NAPS2.TW - StateChanged (to 4) 
2024-02-13 14:05:12.7184 2452 Debug: Registered callback2 OK. 
2024-02-13 14:05:12.7184 2452 NAPS2.TW - Configuring source 
2024-02-13 14:05:26.9707 2452 NAPS2.TW - Enabling source 
2024-02-13 14:05:26.9707 2452 Debug: Thread 1: EnableSource with NoUI. 
2024-02-13 14:05:28.9020 2452 NAPS2.TW - Finishing with error NAPS2.Scan.Exceptions.AlreadyHandledDriverException: Exception of type 'NAPS2.Scan.Exceptions.AlreadyHandledDriverException' was thrown.
   at void NAPS2.Scan.Internal.Twain.TwainSessionScanRunner.Init()
2024-02-13 14:05:29.1295 2452 Debug: Thread 1: CloseSource. 
2024-02-13 14:05:29.1295 2452 Debug: Registered callback2 OK. 
2024-02-13 14:05:29.1295 2452 Debug: Thread 1: CloseManager. 
2024-02-13 14:05:29.2620 2452 NAPS2.TW - StateChanged (to 2) 

@cyanfish I am sorry to ask, are any updates on that?

Yes, in this test version I've added a new option "Show native TWAIN progress" under "Advanced" in your profile settings, can you try checking that and see if it makes a difference?

naps2-7.3.1-testtwain2.zip

Hi @cyanfish! So, I've ticked the box, tried to scan, and nothing happened: just a small delay and any other window.
Please, find the debug logs:

2024-02-19 17:05:55.4362 10424 Debug: Using new dsm. 
2024-02-19 17:05:55.5280 10424 Using TWAIN DSM: C:\Users\Administrator\Downloads\naps2-7.3.1-testtwain2\App\lib\_win32\twaindsm.dll 
2024-02-19 17:05:55.5360 10424 NAPS2.TW - Opening session 
2024-02-19 17:05:55.5360 10424 Debug: Thread 1: OpenManager. 
2024-02-19 17:05:55.5978 10424 NAPS2.TW - StateChanged (to 3) 
2024-02-19 17:05:55.5978 10424 Debug: Using TWAIN2 memory functions. 
2024-02-19 17:05:55.5978 10424 NAPS2.TW - Finding source 
2024-02-19 17:05:55.5978 10424 Debug: Source id = 1 
2024-02-19 17:05:55.5978 10424 NAPS2.TW - Opening source 
2024-02-19 17:05:55.6157 10424 NAPS2.TW - Name: SaneTwain; Manu: Herman Kuiper; Family: SaneTwain bridge; Version: 1.37 Version 1.37; Protocol: 1.8 
2024-02-19 17:05:55.6157 10424 Debug: Thread 1: OpenSource. 
2024-02-19 17:05:58.1842 10424 NAPS2.TW - StateChanged (to 4) 
2024-02-19 17:05:58.1982 10424 Debug: Registered callback2 OK. 
2024-02-19 17:05:58.1982 10424 NAPS2.TW - Configuring source 
2024-02-19 17:06:09.0436 10424 NAPS2.TW - Enabling source 
2024-02-19 17:06:09.0526 10424 Debug: Thread 1: EnableSource with NoUI. 
2024-02-19 17:06:09.7715 10424 NAPS2.TW - Finishing with error NAPS2.Scan.Exceptions.AlreadyHandledDriverException: Exception of type 'NAPS2.Scan.Exceptions.AlreadyHandledDriverException' was thrown.
   at void NAPS2.Scan.Internal.Twain.TwainSessionScanRunner.Init()
2024-02-19 17:06:10.0137 10424 Debug: Thread 1: CloseSource. 
2024-02-19 17:06:10.0137 10424 Debug: Registered callback2 OK. 
2024-02-19 17:06:10.0137 10424 Debug: Thread 1: CloseManager. 
2024-02-19 17:06:10.0766 10424 NAPS2.TW - StateChanged (to 2) 

Hi @cyanfish! Are any updates on this issue?

Sorry, I don't think there's anything else I can do for this, it's just a SaneTwain bug.

Closing in favor of #327 (since SANEWinDS is open source and thus fixable)