NRC-Research / SNAP-issues

This repository was created to provide a public location to record and display the status of "issues" for the SNAP application. The SNAP developers will acknowledge, provide (and maybe request) feedback on the reported issues, and in general use the information to improve SNAP code.
3 stars 0 forks source link

Headless SNAP installation on Windows Failure #47

Closed NRCgg closed 1 year ago

NRCgg commented 1 year ago

When using the "SNAP.def" file under windows OS for headless installation of SNAP, I encountered a problem:

NOTE: This following just confirms what I used for the SNAP.def file

PS C:\temp\snapdist413> more .\SNAP.def
INSTALL_DIR "C:\Program Files\snap"
DISABLE_GUI true
DISABLE_PROMPTS true

NOTE: The following shows the actual command execution

PS C:\temp\snapdist413> java -jar .\SnapInstaller.jar
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at VersionCheck.main(VersionCheck.java:42)
Caused by: java.lang.NullPointerException
at java.io.File.(Unknown Source)
at com.apt.install.client.Updater.loadDefaults(Updater.java:1228)
at com.apt.install.client.Updater.install(Updater.java:266)
at Installer.runInstall(Installer.java:205)
at Installer.main(Installer.java:155)
... 5 more

WDunsford commented 1 year ago

Remove the quotes from the INSTALL_DIR and double up the \ characters. So:

INSTALL_DIR C:\\Program\ Files\\snap

That should solve this problem. Clearly some decent examples and documentation are required. Also better error handling. It took me forever to figure out that it was including the '"' in the path because the error message just stated "Missing write permissions for target directory.". This will be cleaned up in the next version of the installer.

NRCgg commented 1 year ago

Yep, that solved the issue! Thanks!

BTW, I did notice that a graphic files request came up asking to close the Calculation Server, and then another appeared later confirming that the Calculation Server wasn't running anyway. Is this something that be directed to text output instead?

Closing this issue.