Failed to start app

I am having trouble running any application other than the default ones.
I have tried the template but I can’t get it to work, a page with “Failed to start app” appears.

The journal shows this error:

java.lang.NullPointerException: Cannot invoke "eu.openanalytics.containerproxy.spec.expression.SpelField$String.resolve(eu.openanalytics.containerproxy.spec.ex>
    at eu.openanalytics.containerproxy.model.spec.ContainerSpec.firstResolve(ContainerSpec.java:111) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at eu.openanalytics.containerproxy.model.spec.ProxySpec.lambda$firstResolve$1(ProxySpec.java:107) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
    at java.base/java.util.Collections$2.tryAdvance(Collections.java:4853) ~[na:na]
    at java.base/java.util.Collections$2.forEachRemaining(Collections.java:4861) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[na:na]
    at eu.openanalytics.containerproxy.model.spec.ProxySpec.firstResolve(ProxySpec.java:108) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at eu.openanalytics.containerproxy.service.ProxyService.prepareProxyForStart(ProxyService.java:411) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at eu.openanalytics.containerproxy.service.ProxyService.startOrResumeProxy(ProxyService.java:448) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at eu.openanalytics.containerproxy.service.ProxyService.lambda$startProxy$4(ProxyService.java:279) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at eu.openanalytics.containerproxy.service.ProxyService.lambda$action$11(ProxyService.java:599) ~[containerproxy-1.0.1.jar!/:1.0.1]
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

The steps I done are the following:

  • I have cloned the github repository

git clone https://github.com/openanalytics/shinyproxy-template.git

  • I have built the image

docker build -t test .

  • I have added the application to the configuration
  - id: test
    display-name: Test
    container-cmd: ["R", "-q", "-e", "shiny::runApp('/root/euler')"]
    contaier-image: test

The image runs perfectly using docker run -p 3838:3838 test

More info:
shinyproxy: 3.0.1 (deb)
docker: 23.0.2
OS: Ubuntu 22.04.2
Java: 17.0.7

same problem with all 3.x shinyproxy

Hi @gmrtnz there is a type in your config block, you are using contaier-image: test instead of container-image. Therefore, ShinyProxy fails when trying to start the application. I understand that the error is not very user-friendly, we will try to improve this in the future.

Thanks @tdekoninck. The mystery has been solved. I remember that after trying multiple times it started to work but I had no idea why, I guess I corrected the typo without realizing it.

2 Likes