hguerrero / 3scale-cms

To maintain 3scale CMS files locally
MIT License
6 stars 3 forks source link

Container image - CMS download leads to NullPointerException #7

Open jcordes73 opened 1 year ago

jcordes73 commented 1 year ago

cms -k --directory=. --access-token=${ADMIN_PORTAL_URL_B2B_TOKEN} ${ADMIN_PORTAL_URL_B2B_TOKEN} https://${ADMIN_PORTAL_URL_B2B}/ download -u Downloading accounts/users/index.html.liquid (published) Downloading messages/_menu.html.liquid (published) Downloading applications/alerts/index.html.liquid (published) Downloading login java.lang.NullPointerException at com.fwmotion.threescale.cms.cli.DownloadCommand.performDownload(DownloadCommand.java:170) at com.fwmotion.threescale.cms.cli.DownloadCommand.call(DownloadCommand.java:147) at com.fwmotion.threescale.cms.cli.DownloadCommand.call(DownloadCommand.java:26) at picocli.CommandLine.executeUserObject(CommandLine.java:1953) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) at io.quarkus.picocli.runtime.PicocliRunner$EventExecutionStrategy.execute(PicocliRunner.java:26) at picocli.CommandLine.execute(CommandLine.java:2078) at io.quarkus.picocli.runtime.PicocliRunner.run(PicocliRunner.java:40) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:131) at io.quarkus.runtime.Quarkus.run(Quarkus.java:69) at io.quarkus.runtime.Quarkus.run(Quarkus.java:42) at io.quarkus.runner.GeneratedMain.main(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60) at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31)

hguerrero commented 1 year ago

Hi @jcordes73

Are you targeting a SaaS service or a self managed instance?

jcordes73 commented 1 year ago

It is a self-managed instance.

This command doesn't give any error:

cms -k --directory=. --access-token=${ADMIN_PORTAL_URL_B2B_TOKEN} ${ADMIN_PORTAL_URL_B2B_TOKEN} https://${ADMIN_PORTAL_URL_B2B}/ download -n

jcordes73 commented 1 year ago

Now I tried the following:

cms -k --access-token=${ADMIN_PORTAL_URL_B2B_TOKEN} ${ADMIN_PORTAL_URL_B2B_TOKEN} https://${ADMIN_PORTAL_URL_B2B}/ download -u

(basically just removed the --directory=. part)

This seems to work fine in a sense (the owner id is a bit strange which leads to permission issues).