asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.86k stars 297 forks source link

Could not supply the template Asciidoc Slide #600

Open tkleiber opened 10 months ago

tkleiber commented 10 months ago

I try to create slides, so I have tried "New template -> Asciidoc Slide (reveal.js)" Unfortunately I get follwing error in the log, I think this has something to do with proxy here? I did not find any configuration for the proxy.

234620 [] ERROR c.kodedu.component.TemplateSubMenu - Could not supply the template Asciidoc Slide (Reveal.js)
java.net.ConnectException: null
    at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:896)
    at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
    at com.kodedu.service.TemplateService.download(TemplateService.java:170)
    at com.kodedu.service.TemplateService.provide(TemplateService.java:87)
    at com.kodedu.component.TemplateSubMenu.lambda$templateMenuItemOnClick$4(TemplateSubMenu.java:74)
    at com.kodedu.service.impl.ThreadServiceImpl$1.call(ThreadServiceImpl.java:53)
    at javafx.graphics@20.0.1/javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    at java.base/java.util.concurrent.ThreadPerTaskExecutor$ThreadBoundFuture.run(ThreadPerTaskExecutor.java:352)
    at java.base/java.lang.VirtualThread.run(VirtualThread.java:305)
    at java.base/java.lang.VirtualThread$VThreadContinuation.lambda$new$0(VirtualThread.java:177)
    at java.base/jdk.internal.vm.Continuation.enter0(Continuation.java:327)
    at java.base/jdk.internal.vm.Continuation.enter(Continuation.java:320)
Caused by: java.net.ConnectException: null
    at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1053)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:224)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.checkRetryConnect(PlainHttpConnection.java:259)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$2(PlainHttpConnection.java:235)
    at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
    at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: java.nio.channels.ClosedChannelException: null
    at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:202)
    at java.base/sun.nio.ch.SocketChannelImpl.beginConnect(SocketChannelImpl.java:786)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:874)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(PlainHttpConnection.java:208)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
    at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:210)
    ... 9 common frames omitted
rahmanusta commented 10 months ago

What url do you see in the template config? Did you override the default one?

tkleiber commented 10 months ago

I did not override it, it is "https://github.com/rahmanusta/Asciidoc-RevealJs-Demo".

rahmanusta commented 10 months ago

Do you need to setup a proxy to connect github from a running app?

tkleiber commented 10 months ago

As already mentioned - I did not find configuration options for proxy in AsciidocFX.

rahmanusta commented 8 months ago

In AsciidocFX installation folder there is a vmproperties.txt file. You should be able to configure the proxy through the vm settings.

These two should resolve proxy settings from the system.

-Djavafx.autoproxy.disable=false
-Djava.net.useSystemProxies=true

Other proxy settings can be seen here https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/net/doc-files/net-properties.html

tkleiber commented 8 months ago

Have tried this, but only with partial success. The log shows now:

DEBUG => Downloading template from: https://github.com/rahmanusta/Asciidoc-RevealJs-Demo
DEBUG => Template provided: https://github.com/rahmanusta/Asciidoc-RevealJs-Demo

But there is no directory or file created for a slide. Similar happens for the other templates. Have tried the following too without success:

-Djavafx.autoproxy.disable=true
-Dhttp.nonProxyHosts=<my confgiration>
-Dhttp.proxyHost=<my confgiration>
-Dhttp.proxyPort=<my confgiration>
-Dhttps.proxyHost=<my confgiration>
-Dhttps.proxyPort=<my confgiration>