Issue with udpPorts & CloudronManifest.json Parsing



  • Need some assistance with this error message:

    Jan 01 00:00:00 Cannot use 'in' operator to search for 'MINETEST_PORT' in undefined
    Jan 01 00:00:00 at createSubcontainer (/home/yellowtent/box/src/docker.js:206:35)
    Jan 01 00:00:00 at Object.createContainer (/home/yellowtent/box/src/docker.js:310:5)
    Jan 01 00:00:00 at createContainer (/home/yellowtent/box/src/apptask.js:134:12)
    Jan 01 00:00:00 at /home/yellowtent/box/node_modules/async/dist/async.js:3880:24
    Jan 01 00:00:00 at replenish (/home/yellowtent/box/node_modules/async/dist/async.js:1011:17)
    Jan 01 00:00:00 at iterateeCallback (/home/yellowtent/box/node_modules/async/dist/async.js:995:17)
    Jan 01 00:00:00 at /home/yellowtent/box/node_modules/async/dist/async.js:969:16
    Jan 01 00:00:00 at /home/yellowtent/box/node_modules/async/dist/async.js:3885:13
    Jan 01 00:00:00 at /home/yellowtent/box/src/apptask.js:90:16
    Jan 01 00:00:00 at /home/yellowtent/box/src/appdb.js:476:16
    

    This happens during the "Downloading Image..." portion of an app install I am working on. Removing udpPorts from the config works, however we need a UDP port open here.

    The manifest:

    {
      "id": "net.minetest.cloudronapp",
      "title": "Minetest Server",
      "author": "Minetest",
      "description": "file://DESCRIPTION.md",
      "icon": "file://logo.png",
      "changelog": "file://CHANGELOG",
      "tagline": "Multiplayer Server for Minetest",
      "version": "1.0.0",
      "healthCheckPath": "/api/v1/healthcheck",
      "tags": [ "game", "multiplayer" ],
      "memoryLimit": 1342177280,
      "httpPort": 3000,
      "udpPorts": {
        "MINETEST_PORT": {
          "title": "Server Port",
          "description": "Server Port where Minetest clients connect",
          "defaultValue": 30000,
          "containerPort": 30000
        }
      },
      "manifestVersion": 1,
      "website": "https://minecraft.net/",
      "contactEmail": "support@cloudron.io",
      "mediaLinks": [
        "https://s3.amazonaws.com/cloudron-app-screenshots/net.minecraft.cloudronapp/2e986e7d52a3abf2f68cec5704b1717e8d2de8bc/minecraft-01.png"
      ],
      "addons": {
        "localstorage": {},
        "ldap": {}
      }
    }
    


  • Which version of Cloudron is this running against and also does that happen during a fresh installation of the app or cloudron install over an existing one?



  • @nebulon

    Which version of Cloudron is this running against

    Latest public stable version - 4.1.7


    does that happen during a fresh installation of the app or cloudron install over an existing one?

    Both fresh and already installed apps that reference updPorts breaks in this way.


    I'd like to note this is a vanilla install of Cloudron on ubuntu 18.04. There are no modifications beyond a couple custom app packages.



  • For some reason I cannot reproduce this error. Do you have an upstream git repository where I could test this with the exact package you are trying to install?



  • @nebulon Are you available on Matrix or another way to PM? It's a private repo so I don't want post a link here publicly just yet.

    Edit: Actually, you can change tcpPorts to udpPorts in the minecraft app package and it causes the error for me.



  • Oh! I can reproduce the issue now. It is however fixed already but only part of the next release, which should go out soon.



  • @nebulon Fantastic, thank you for the information! I look forward to confirming that 🙂



  • This should be fixed in 4.2



  • @girish Seems not. By doing this:

      "udpPorts": {
        "SERVER_PORT": {
          "title": "Server Port",
          "description": "Server Port where Minetest clients connect",
          "defaultValue": 30000,
          "containerPort": 30000
        }
      },
    

    I get this when trying:

    Cannot use 'in' operator to search for 'SERVER_PORT' in undefined
    

    🤔



  • I can reproduce this. Fixed in https://git.cloudron.io/cloudron/box/commit/7cbe60a484cf03c9373c8f57307ad0d9b49a695a . It's a simple change, in case you want apply it locally on your cloudron


Log in to reply