fxlauncher icon indicating copy to clipboard operation
fxlauncher copied to clipboard

Exception when launched with --uri while Internet is disconnected

Open varunsingh001 opened this issue 6 years ago • 4 comments

Application should be launched without network access and the exception should not suppress launching application. Instead received below :

java.lang.IllegalArgumentException: Unable to retrieve embedded or remote manifest. at fxlauncher.AbstractLauncher.createApplicationEnvironment(AbstractLauncher.java:162) at fxlauncher.Launcher.lambda$start$0(Launcher.java:149) at java.lang.Thread.run(Thread.java:748)

Is it possible to configure somehow launching application without seeing exception with uri passed at runtime ?

stopOnUpdateErrors is not overriden

varunsingh001 avatar Jul 30 '18 11:07 varunsingh001

The error message suggests that there was no manifest embedded in the launcher, so where would it get the manifest from in this case? :)

edvin avatar Jul 30 '18 11:07 edvin

I believe it is embed, the issue arrives after I successfully update the app using --uri and then go offline and try to launch again.

below should embed the XML <execution> <id>embed-manifest-in-launcher</id> <phase>package</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>jar</executable> <workingDirectory>${app.dir}</workingDirectory> <arguments> <argument>uf</argument> <argument>fxlauncher.jar</argument> <argument>app.xml</argument> </arguments> </configuration> </execution>

Also I can manually check XML inside jar

varunsingh001 avatar Jul 30 '18 12:07 varunsingh001

It looks like launcher tries to resolve params like --app/--uri to load manifest but if it returns with an exception it wont fallback to the app.xml in cache dir or one embedded in jar, hence instance of manifest is null and throws IllegalArgumentException. Is my understanding correct ?

varunsingh001 avatar Jul 30 '18 13:07 varunsingh001

That sounds about right. Would you like to submit a PR to fix it perhaps? :)

edvin avatar Jul 30 '18 13:07 edvin