Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Issue with udpPorts & CloudronManifest.json Parsing

    Support
    4
    10
    410
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • murgero
      murgero App Dev last edited by

      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": {}
        }
      }
      

      --
      https://urgero.org
      ~ Professional Nerd. Freelance Programmer. ~
      Matrix: @murgero:urgero.org

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        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?

        murgero 1 Reply Last reply Reply Quote 0
        • murgero
          murgero App Dev @nebulon last edited by

          @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.

          --
          https://urgero.org
          ~ Professional Nerd. Freelance Programmer. ~
          Matrix: @murgero:urgero.org

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            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?

            murgero 1 Reply Last reply Reply Quote 0
            • murgero
              murgero App Dev @nebulon last edited by murgero

              @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.

              --
              https://urgero.org
              ~ Professional Nerd. Freelance Programmer. ~
              Matrix: @murgero:urgero.org

              1 Reply Last reply Reply Quote 0
              • nebulon
                nebulon Staff last edited by

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

                murgero 1 Reply Last reply Reply Quote 2
                • murgero
                  murgero App Dev @nebulon last edited by

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

                  --
                  https://urgero.org
                  ~ Professional Nerd. Freelance Programmer. ~
                  Matrix: @murgero:urgero.org

                  1 Reply Last reply Reply Quote 0
                  • girish
                    girish Staff last edited by

                    This should be fixed in 4.2

                    yusf 1 Reply Last reply Reply Quote 1
                    • yusf
                      yusf @girish last edited by

                      @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
                      

                      🤔

                      1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff last edited by

                        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

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Powered by NodeBB