# Error during Migration 0028\_delete\_legacy\_xmpp\_permission

**URL:** <https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197>\
**Category:** Support\
**Tags:** bookworm, english\
**Created:** [November 23, 2024, 10:33pm UTC](https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197 "2024-11-23T22:33:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_t](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/779978/32.png) [@m\_t](https://forum.yunohost.org/u/m_t)\
**Post date:** [November 23, 2024, 10:33pm UTC](https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197/1 "2024-11-23T22:33:20Z")

</div>

**What type of hardware are you using** : Other(?)  
**What YunoHost version are you running** : 12.0.7  
**How are you able to access your server** : The webadmin  
SSH  
**Are you in a special context or did you perform specific tweaking on your YunoHost instance ?** : No

### Describe your issue

Hello!

I’ve done the Bookworm upgrade this evening via ssh.

The upgrade didn’t complete the first time, finishing with this error:

```auto
Info: Starting YunoHost core upgrade…
Info: Downloading...
Info: [....................] > 0.0% Installing python3-all
Info: [....................] > 2.7% Installing lua-rex-pcre2
Info: [#...................] > 5.4% Installing lua-basexx
Info: [#...................] > 8.2% Installing lua-luaossl
Info: [##..................] > 10.9% Installing lua-logging
Info: [##..................] > 13.6% Installing lua-cjson
Info: [###.................] > 16.3% Installing ssowat
Info: [###.................] > 19.0% Installing python3-passlib
Info: [####................] > 21.8% Installing python3-magic
Info: [####................] > 24.5% Installing python3-typing-extensions
Info: [#####...............] > 27.2% Installing python3-pydantic
Info: [#####...............] > 29.9% Installing python3-email-validator
Info: [######..............] > 32.7% Installing libmilter1.0.1
Info: [#######.............] > 35.4% Installing opendkim
Info: [#######.............] > 38.1% Installing moulinette
Info: [########............] > 40.8% Installing yunohost
Warning: E: Sub-process /usr/bin/dpkg returned an error code (1)
Warning: Traceback (most recent call last):
Warning: File "/usr/bin/yunohost", line 77, in <module>
Warning: yunohost.cli(
Warning: File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 41, in cli
Warning: ret = moulinette.cli(
Warning: ^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/moulinette/ __init__.py", line 115, in cli
Warning: ).run(args, output_as=output_as, timeout=timeout)
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 498, in run
Warning: ret = self.actionsmap.process(args, timeout=timeout)
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 561, in process
Warning: return func(**arguments)
Warning: ^^^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/yunohost/app.py", line 1658, in app_ssowatconf
Warning: default_app = _get_raw_domain_settings(domain).get("default_app")
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: AttributeError: 'NoneType' object has no attribute 'get'
Warning: dpkg: error processing package yunohost (--configure):
Warning: installed yunohost package post-installation script subprocess returned error exit status 1
Warning: Errors were encountered while processing:
Warning: yunohost
Info: [....................] > 0.0% Installing yunohost
Warning: E: Sub-process /usr/bin/dpkg returned an error code (1)
Warning: Traceback (most recent call last):
Warning: File "/usr/bin/yunohost", line 77, in <module>
Warning: yunohost.cli(
Warning: File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 41, in cli
Warning: ret = moulinette.cli(
Warning: ^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/moulinette/ __init__.py", line 115, in cli
Warning: ).run(args, output_as=output_as, timeout=timeout)
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 498, in run
Warning: ret = self.actionsmap.process(args, timeout=timeout)
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 561, in process
Warning: return func(**arguments)
Warning: ^^^^^^^^^^^^^^^^^
Warning: File "/usr/lib/python3/dist-packages/yunohost/app.py", line 1658, in app_ssowatconf
Warning: default_app = _get_raw_domain_settings(domain).get("default_app")
Warning: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: AttributeError: 'NoneType' object has no attribute 'get'
Warning: dpkg: error processing package yunohost (--configure):
Warning: installed yunohost package post-installation script subprocess returned error exit status 1
Warning: Errors were encountered while processing:
Warning: yunohost
Error: Migration 0027_migrate_to_bookworm did not complete, aborting. Error: Failed to run command 'aptitude full-upgrade --show-why -o Dpkg::Options::='--force-confold' yunohost yunohost-admin yunohost-portal moulinette ssowat libluajit2-5.1-2 '
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241123-212137-tools_migrations_migrate_forward' to get help

```

I still had access to the web admin, while the portal ends up on a 404.  
In the admin, going into the “update” section, I still had those packages listed:

```auto
libconfig-inifiles-perl (from 3.000003-1 to 3.000003-2)
yunohost-admin (from 11.3.0 to 12.0.3.5) 

```

And a warning for the remaining migrations.

I launched the migration again, and ended up with this error message this time:

```auto
mt@server:~$ sudo yunohost tools migrations run --accept-disclaimer
Info: Running migration 0028_delete_legacy_xmpp_permission…
Info: Creating a backup of LDAP database and apps settings prior to the actual migration.
Info: The operation 'Delete permission 'xmpp'' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241123-222054-permission_delete-xmpp' to get help
Warning: Could not migrate… trying to roll back the system.
Info: System rolled back.
Error: Migration 0028_delete_legacy_xmpp_permission did not complete, aborting. Error: 'NoneType' object has no attribute 'get'
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20241123-222052-tools_migrations_migrate_forward' to get help
Info: Running migration 0029_postgresql_13_to_15…
Info: No YunoHost app seem to require postgresql... Skipping!
Success! Migration 0029_postgresql_13_to_15 completed
Info: Running migration 0030_rebuild_python_venv_in_bookworm…
Success! Migration 0030_rebuild_python_venv_in_bookworm completed
Info: Running migration 0031_terms_of_services…
Success! Migration 0031_terms_of_services completed

```

Now, the migration list only displays ` 28. migration_description_0028_delete_legacy_xmpp_permission`.

Before trying anything else, I wanted to check if there was a known workaround.

Thank you!

### Share relevant logs or error messages

Full log for the first migration error:  
[https://paste.yunohost.org/raw/uzikekewej](https://paste.yunohost.org/raw/uzikekewej)

Log for the retry:  
[https://paste.yunohost.org/raw/ivebupunup](https://paste.yunohost.org/raw/ivebupunup)

---

<div class="post-metadata">

**Author:** ![m\_t](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/779978/32.png) [@m\_t](https://forum.yunohost.org/u/m_t)\
**Post date:** [November 24, 2024, 8:06am UTC](https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197/2 "2024-11-24T08:06:27Z")

</div>

Good morning!

After looking at the migration script, I’ve tried moving forward with this command:

```auto
aptitude full-upgrade --show-why -o Dpkg::Options::='--force-confold' yunohost yunohost-admin yunohost-portal moulinette ssowat libluajit2-5.1-2 

```

The issue seem to stem from configuring `yunohost` itself:

```auto
Regenerating configuration, this might take a while...
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 77, in <module>
    yunohost.cli(
  File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 41, in cli
    ret = moulinette.cli(
          ^^^^^^^^^^^^^^^

```

> **Full log**
>
> ```auto
> mt@server:~$ sudo aptitude full-upgrade --show-why -o Dpkg::Options::='--force-confold' yunohost yunohost-admin yunohost-portal moulinette ssowat libluajit2-5.1-2 
> yunohost is already installed at the latest version (12.0.7), so it will not be upgraded
> moulinette is already installed at the latest version (12.0.3), so it will not be upgraded
> ssowat is already installed at the latest version (12.0.3), so it will not be upgraded
> libluajit2-5.1-2 is already installed at the latest version (2.1-20230119-1), so it will not be upgraded
> yunohost is already installed at the latest version (12.0.7), so it will not be upgraded
> moulinette is already installed at the latest version (12.0.3), so it will not be upgraded
> ssowat is already installed at the latest version (12.0.3), so it will not be upgraded
> libluajit2-5.1-2 is already installed at the latest version (2.1-20230119-1), so it will not be upgraded
> The following NEW packages will be installed:
> yunohost-portal  
> The following packages will be upgraded:
> yunohost-admin  
> The following partially installed packages will be configured:
> yunohost  
> 1 packages upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
> Need to get 0 B/6,371 kB of archives. After unpacking 2,034 kB will be used.
> Do you want to continue? [Y/n/?] Y
> Reading changelogs... Done               
> Setting up yunohost (12.0.7) ...
> Regenerating configuration, this might take a while...
> Traceback (most recent call last):
> File "/usr/bin/yunohost", line 77, in <module>
> yunohost.cli(
> File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 41, in cli
> ret = moulinette.cli(
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/moulinette/ __init__.py", line 115, in cli
> ).run(args, output_as=output_as, timeout=timeout)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 498, in run
> ret = self.actionsmap.process(args, timeout=timeout)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 561, in process
> return func(**arguments)
> ^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/yunohost/app.py", line 1658, in app_ssowatconf
> default_app = _get_raw_domain_settings(domain).get("default_app")
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> AttributeError: 'NoneType' object has no attribute 'get'
> dpkg: error processing package yunohost (--configure):
> installed yunohost package post-installation script subprocess returned error exit status 1
> Errors were encountered while processing:
> yunohost
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> Setting up yunohost (12.0.7) ...
> Regenerating configuration, this might take a while...
> Traceback (most recent call last):
> File "/usr/bin/yunohost", line 77, in <module>
> yunohost.cli(
> File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 41, in cli
> ret = moulinette.cli(
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/moulinette/ __init__.py", line 115, in cli
> ).run(args, output_as=output_as, timeout=timeout)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 498, in run
> ret = self.actionsmap.process(args, timeout=timeout)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 561, in process
> return func(**arguments)
> ^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3/dist-packages/yunohost/app.py", line 1658, in app_ssowatconf
> default_app = _get_raw_domain_settings(domain).get("default_app")
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> AttributeError: 'NoneType' object has no attribute 'get'
> dpkg: error processing package yunohost (--configure):
> installed yunohost package post-installation script subprocess returned error exit status 1
> Errors were encountered while processing:
> yunohost
> 
> ```

If this can help with debugging:

```auto
mt@server:~$ sudo dpkg --list | grep "yunohost\|moulinette"
ii moulinette 12.0.3 all prototype interfaces with ease in Python
iF yunohost 12.0.7 all manageable and configured self-hosting server
ii yunohost-admin 11.3.0 all web administration interface for yunohost

```

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [December 24, 2024, 8:06am UTC](https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197/3 "2024-12-24T08:06:51Z")

</div>

Closed on December 24, 2024, 8:06am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)\
**Post date:** [January 1, 2025, 2:33pm UTC](https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197/4 "2025-01-01T14:33:22Z")

</div>

Opened on January 1, 2025, 2:33pm UTC



---

<div class="post-metadata">

**Author:** ![m\_t](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/779978/32.png) [@m\_t](https://forum.yunohost.org/u/m_t)\
**Post date:** [February 10, 2025, 1:47pm UTC](https://forum.yunohost.org/t/error-during-migration-0028-delete-legacy-xmpp-permission/32197/5 "2025-02-10T13:47:19Z")

</div>

Hello,  
If anyone is looking at this, I gave up on the broken install and wiped/installed a fresh version.
