Using Command Line fails on MacOs (Xamarin bridge error)
Scan documents to PDF and other file types, as simply as possible.
Brought to you by:
ben-cyanfish
I am trying to use the command line of NAPS2 to concatenate several pdf files. It works fine on Windows, but not on Mac.
On MacOs (Apple M2, Ventura 13.2), I can run the NAPS2 window. But if I try to run any command on the command line, or even just the alias for "/Applications/NAPS2.app/Contents/MacOS/NAPS2 console", I get the following message:
2024-02-27 17:45:51.866 NAPS2[3141:119359] Microsoft.macOS: xamarin_bridge_call_runtime_initialize: failed to create delegate: -2147024894
zsh: abort /Applications/NAPS2.app/Contents/MacOs/NAPS2 console
Please tell me how to fix this.
Can you try uninstalling and reinstalling NAPS2?
Thanks for your interest. I tried re-installing the "Apple Silicon" version, but with the same result.
So then I tried installing the "Universal" version for the Mac. The command line invocation also fails, but with a different error:
2024-02-29 18:03:01.940 NAPS2[6262:437924] Microsoft.macOS: Failed to initialize the VM
./nan.zsh: line 1: 6262 Abort trap: 6 /Applications/NAPS2.app/Contents/MacOs/NAPS2 console -i 'FmDemo_01.pdf;FmDemo_02.pdf;' -n 0 -o FmDemo.pdf -f
It seems there is a Virtual Machine missing, which needs to also be installed.
Ok I think I see the problem, it should be "Contents/MacOS" not "Contents/MacOs". Weird it's causing that issue, but if you fix the S to capital I think it should fix it.
Many thanks, Ben. Of course, you're right! I suppose I missed the check for precise lettering because the error message indicated weirdly, as you said, a completely different problem, but it clearly stems from an expansion of NAPS2.app.
The ticket can now be closed, thank you.