cyanfish / naps2

Scan documents to PDF and more, as simply as possible.
https://www.naps2.com
Other
2.72k stars 319 forks source link

Deb Package is missing dependencies #128

Closed xM8WVqaG closed 1 year ago

xM8WVqaG commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

The .deb distributable added in 7.0b5 is missing Depends and Recommends or Suggests. Without libsane NAPS raises an exception when you try to create a profile.

Although some functionality still exists beyond scanning, scanning is fairly important! libsane may be Depends, tesseract-ocr is even more optional, but I expect that's probably worth adding to Recommends at least?

(NOTE: The path in the exception isn't from my computer, I presume it's a maintainers? Feel free to edit this ticket to redact it)

System.Exception: System.Exception: Could not load library: "libsane.so.1". Error:
   at NAPS2.Unmanaged.NativeLibrary.DoLoadLibrary(String path) in /home/ben/naps2/NAPS2.Sdk/Unmanaged/NativeLibrary.cs:line 64
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode )
   at System.Lazy`1.ExecutionAndPublication(LazyHelper , Boolean )
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at NAPS2.Unmanaged.NativeLibrary.get_LibraryHandle() in /home/ben/naps2/NAPS2.Sdk/Unmanaged/NativeLibrary.cs:line 71
   at NAPS2.Unmanaged.NativeLibrary.LoadFunc[T]() in /home/ben/naps2/NAPS2.Sdk/Unmanaged/NativeLibrary.cs:line 81
   at NAPS2.Unmanaged.NativeLibrary.<Load>b__12_0[T]() in /home/ben/naps2/NAPS2.Sdk/Unmanaged/NativeLibrary.cs:line 75
   at NAPS2.Util.CollectionExtensions.Get[TKey,TValue](Dictionary`2 dict, TKey key, Func`1 defaultValue) in /home/ben/naps2/NAPS2.Internals/Util/CollectionExtensions.cs:line 215
   at NAPS2.Unmanaged.NativeLibrary.Load[T]() in /home/ben/naps2/NAPS2.Sdk/Unmanaged/NativeLibrary.cs:line 75
   at NAPS2.Scan.Internal.Sane.Native.SaneNativeLibrary.get_sane_init() in /home/ben/naps2/NAPS2.Sdk/Scan/Internal/Sane/Native/SaneNativeLibrary.cs:line 40
   at NAPS2.Scan.Internal.Sane.Native.SaneClient..ctor(ISaneInstallation saneInstallation) in /home/ben/naps2/NAPS2.Sdk/Scan/Internal/Sane/Native/SaneClient.cs:line 22
   at NAPS2.Scan.Internal.Sane.SaneScanDriver.<>c__DisplayClass8_0.<GetDevices>b__0() in /home/ben/naps2/NAPS2.Sdk/Scan/Internal/Sane/SaneScanDriver.cs:line 56
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object )
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread , ExecutionContext , ContextCallback , Object )
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread , ExecutionContext , ContextCallback , Object )
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& , Thread )
--- End of stack trace from previous location ---
   at NAPS2.Scan.Internal.RemoteScanController.GetDevices(ScanOptions options, CancellationToken cancelToken, Action`1 callback) in /home/ben/naps2/NAPS2.Sdk/Scan/Internal/RemoteScanController.cs:line 23
   at NAPS2.Remoting.Worker.WorkerServiceImpl.GetDevices(GetDevicesRequest request, IServerStreamWriter`1 responseStream, ServerCallContext context) in /home/ben/naps2/NAPS2.Sdk/Remoting/Worker/WorkerServiceImpl.cs:line 117
   at NAPS2.Remoting.RemotingHelper.HandleErrors(Error error) in /home/ben/naps2/NAPS2.Sdk/Remoting/RemotingHelper.cs:line 24
   at NAPS2.Remoting.Worker.WorkerServiceAdapter.GetDevices(ScanOptions options, CancellationToken cancelToken, Action`1 callback) in /home/ben/naps2/NAPS2.Sdk/Remoting/Worker/WorkerServiceAdapter.cs:line 56
   at NAPS2.Scan.Internal.WorkerScanBridge.GetDevices(ScanOptions options, CancellationToken cancelToken, Action`1 callback) in /home/ben/naps2/NAPS2.Sdk/Scan/Internal/WorkerScanBridge.cs:line 27
   at NAPS2.Scan.ScanController.<>c__DisplayClass12_0.<<GetDevices>b__0>d.MoveNext() in /home/ben/naps2/NAPS2.Sdk/Scan/ScanController.cs:line 61
--- End of stack trace from previous location ---
   at NAPS2.Util.AsyncProducers.<>c__DisplayClass1_0`1.<<RunProducer>b__0>d.MoveNext() in /home/ben/naps2/NAPS2.Internals/Threading/AsyncProducers.cs:line 22
   at NAPS2.Util.AsyncSink`1.AsAsyncEnumerable()+MoveNext()
   at NAPS2.Util.AsyncSink`1.AsAsyncEnumerable()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at NAPS2.EtoForms.Ui.SelectDeviceForm.ShowAsyncDeviceList() in /home/ben/naps2/NAPS2.Lib/EtoForms/Ui/SelectDeviceForm.cs:line 66
   at NAPS2.EtoForms.Ui.SelectDeviceForm.ShowAsyncDeviceList() in /home/ben/naps2/NAPS2.Lib/EtoForms/Ui/SelectDeviceForm.cs:line 66

To Reproduce Steps to reproduce the behavior:

  1. Install the new deb artefact with sudo apt-get install ./naps2-7.0b7-linux-x64.deb
  2. Launch with naps2
  3. Create a new profile
  4. Select "Choose device"

Expected behavior A clear and concise description of what you expected to happen.

NAPS should specify dependencies during install so it works without additional configuration.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

$ apt list | grep ^naps
naps2/now 7.0.7 amd64 [installed,local]

Additional context Add any other context about the problem here.

cyanfish commented 1 year ago

Fixed in 7.0b8.