caprover / caprover-cli

Command Line Interface for https://github.com/caprover/caprover
72 stars 40 forks source link

Error 500 on /user/apps/appDefinitions/register #68

Closed qoddiapps closed 3 years ago

qoddiapps commented 3 years ago

Hi everyone,

I can't figure how to make de /user/apps part of the API work, the GET functions are working well but when I try a POST function I always get an error :

Call generic CapRover API [Experimental Feature]... Ensuring authentication... Something bad happened calling API /user/apps/appDefinitions/register at ams02. Error Code: 1000 Message: Push failed: Error: (HTTP code 500) server error - invalid reference format

Here's the caprover.json :

{"caproverName":"test01","path":"/user/apps/appDefinitions/register","method":"POST","data":{"appName":"akjlsdlkjsfd","hasPersistentData":"1"}}

please let me know if you have any idea! Thanks!

qoddiapps commented 3 years ago

Edit :

same issue with changing the JSON to (persistent data true instead of 1) : {"caproverName":"test01","path":"/user/apps/appDefinitions/register","method":"POST","data":{"appName":"akjlsdlkjsfd","hasPersistentData":"true"}}

Also, the CLI user running the script is already logged in on the server and GET functions works.

Thanks!

githubsaturn commented 3 years ago

Change your URL to /user/apps/appDefinitions/register?detached=1

Does it resolve the issue?

qoddiapps commented 3 years ago

It does!! thanks a lot!