Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App install fails with "Failed to provision ports : argument of type 'NoneType' is not iterable" #2362

Open
milouse opened this issue Mar 14, 2024 · 1 comment
Labels
👾 bug Something isn't working

Comments

@milouse
Copy link

milouse commented Mar 14, 2024

Describe the bug

This is a bug I encountered now several time, with different applications (that’s why I’m not pushing it to any specific app repository). It first block me to install ethercalc, and now umami. Each time it’s the same thing, the installation of the app fails very quickly at the beginining of the process, with the following logs: https://paste.yunohost.org/raw/utoboqoqup

Context

  • Hardware: VPS bought online
  • YunoHost version: 11.2.10.3 (stable)
  • I have access to my server: happen both through SSH and webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: I don’t think so
  • Using, or trying to install package version/branch: umami or ethercalc (at least)

To reproduce

sudo yunohost app install umami

Expected behavior

The app install without problems.

Logs

https://paste.yunohost.org/raw/utoboqoqup

I’m not sure how to make logs more verbose, don’t hesitate to give me hints. I’m willing to help as much as I can.

At first I though it was only related to ethercalc only, but now that it fails also with umami, it seems to be a more generic issue. Now I wonder if the problem could comes from the fact these apps have to be installed on their own domain (instead of subpath?) But what is weird is that I successfully installed nextcloud on its own subdomain in the mean time (but it’s a PHP app, which does not require custom ports maybe?)

@milouse milouse added the 👾 bug Something isn't working label Mar 14, 2024
@milouse
Copy link
Author

milouse commented Mar 14, 2024

Ok, after some digging, I’ve found the origin of the error.

In the function firewall_disallow, this check is failing because my current firewall retrieved configuration is like this:

{
    'ipv4': {
        'TCP': [<redacted>],
        'UDP': [<redacted>]
    },
    'ipv6': {
        'TCP': [<redacted>],
        'UDP': [<redacted>]
    },
    'uPnP': {
        'TCP': [<redacted>],
        'TCP_TO_CLOSE': [<redacted>],
        'UDP': None,
        'enabled': False
    }
}

The interesting part is the UDP value in uPnP, which is "None" instead of an empty list I guess. This is because there is no UDP property for uPnP in the yaml file.

I made it works by replacing the previously named check by:

if upnp and isinstance(firewall["uPnP"][p], list) and port in firewall["uPnP"][p]:

Does it worths an MR or did I misunderstood something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👾 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant