Testing: Update to v4 crashes, on RaspberryPi4

Hi, if I try my usual “sudo apt full upgrade” I receive this:

What to do? :frowning:

Its a Raspberry 4 with Raspian Bullseye.

Hi,

this would suggest that the migration files are duplicate, which is not expected and which I can reproduce only by manually duplicating one of the migration files. Could you indicate us:

  1. the content of the migrations directory:
    sudo ls /etc/passbolt/Migrations

  2. the list of the migrations that have been run in the past:
    sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations status" www-data

Based on this, we might see a bit clearer.

sudo ls /etc/passbolt/Migrations
20170830064410_V162InitialMigration.php
20170830065037_V200ActiveMustBeBoolean.php
20170830065038_V200DropUnusedProfileFields.php
20170830065039_V200IncreaseEmailSize.php
20170830065040_V200DropUnusedCreatedBy.php
20170830065041_V200MigrateUUID.php
20170830065042_V200MigrateKeyField.php
20171002061834_V200DropUnusedResourceFields.php
20171006141922_V200AddFavoriteModifiedField.php
20171009093000_V200DropUnusedPermissionTypesTable.php
20171009093001_V200MigrateEmailsTable.php
20171009093002_V200MigrateFileStorageTable.php
20171025154754_V200AddCommentsUserIdField.php
20180102065042_V200MigrateForeignIdField.php
20180102180000_V200DropUnusedTables.php
20180102221500_V200AddMissingTablesIndexes.php
20180413171600_V202ForceColumnsCharset.php
20180503135810_V210InstallAccountSettingsPlugin.php
20180930151500_V240AddAuthenticationTokenType.php
20181002171600_V240ExtendAccountSettingsPlugin.php
20181024124300_V250ChangeMfaAccountSettingsDataFormat.php
20181210170000_V270AddMissingIndexes.php
20190106170300_V280AdditionalEmailMigration.php
20190106170301_V280AdditionalFileStorageMigration.php
20190106170302_V280FileDirectoryPathsMigrations.php
20190112124290_V270AddActionsTable.php
20190112124300_V270AddActionLogsTable.php
20190121111100_V270AddEntitiesHistoryTable.php
20190121121100_V270AddPermissionsHistoryTable.php
20190211124300_V270AddSecretsHistoryTable.php
20190221124300_V270AddSecretAccessesTable.php
20190512115400_V2100AddOrganizationSettingsTable.php
20190623143400_V2110ExtendKeyIdSizeField.php
20190923103000_V2120UpdateEmailQueue.php
20191119092944_V2130AddFoldersTable.php
20191119092945_V2130AddFoldersHistoryTable.php
20191119160000_V2120DropUnusedTables.php
20191216092944_V2130AddFoldersRelationsTable.php
20191216092945_V2130AddFoldersRelationsHistoryTable.php
20200108135000_V2130DropLegacyAnonymousUser.php
20200205135000_V2130AddResourcesFoldersRelations.php
20200319135000_V2130SoftDeleteGpgKeysForSoftDeletedUsers.php
20200501182000_V2130ReconcileLoginHistory.php
20200609192000_V2130AddMissingFoldersIndexes.php
20200806110200_V300ExtendSecretsDataField.php
20200806110201_V300AddResourceTypeIdField.php
20200806110202_V300AddResourceTypesTable.php
20200806110203_V300AddResourceTypesDefaultData.php
20200806110204_V300AddResourceTypesToResources.php
20200824191900_V2136CleanupUnusedActionLogs.php
20200824191901_V2136AddActionLogsRelatedIndexes.php
20201221093528_V300DeleteMetadataOfSoftDeletedResources.php
20210111163200_V300AddActionLogsExtraIndex.php
20210121141742_V320AddAvatarsTable.php
20210125212543_V320TransferFileStorageToAvatars.php
20210206521254_V320DropFileStorage.php
20210329110000_V320FixResourceTypesDefaultData.php
20210427124200_V330AddMobileTransferTable.php
20211027202137_V331ConvertEmailVariablesToJson.php
20211121231000_V3120MigrateASCIIFieldsEncodingFolders.php
20211121231300_V340MigrateASCIIFieldsEncoding.php
20211121232400_V340AddFoldersRelationsExtraIndexes.php
20211122732400_V350ConvertIdFieldsToUuidFields.php
20211215180000_V350RemovePermissionsTypeIndex.php
20211215180001_V350AddPermissionsCombinedIndex.php
20220103180000_V350IncreaseResourcesNameUsernameColumnsSize.php
20220103180001_V350IncreaseResourcesNameUsernameLengthInResourceTypes.php
20220405232411_V360RemoveAuthLoginLoginGetActionFromLogs.php
20220405234003_V360RemoveAuthCheckSessionCheckSessionGetFromLogs.php
20220405234359_V360RemoveAuthIsAuthenticatedIsAuthenticatedFromLogs.php
20220802151030_V380AlterNameAndSlugOnResourceTypes.php
20220802151740_V380TrimSpacesOnResourceTypesNameAndSlug.php
20220809190030_V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance.php
20220824081645_V380AlterNameLengthOnFolders.php
20220913233909_V380SaveSmtpSettingsInDb.php
20220915150002_V380AlterNameLengthOnFoldersHistory.php
20220922082044_V380SaveMfaOrganizationSettingsInDb.php
20230202094451_V3110SaveMfaOrganizationSettingsInDbInDuoV4Format.php
20230308124720_V3120DropActionLogsDuplicateIndexes.php
20230414124720_V3122DeleteDescriptionForResourceOfTypePasswordAndDescription.php
20230418103007_V400AddTotpResourceTypes.php

sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake migrations status” www-data
using migration paths

  • /etc/passbolt/Migrations
    using seed paths
  • /etc/passbolt/Seeds
    using environment default
    2023-05-17 09:17:26 error: [InvalidArgumentException] Duplicate migration - “/etc/passbolt/Migrations/20170830065037_V200ActiveMustBeBoolean.php” has the same version as “2147483647” in /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php on line 783

[cant add the output of the HTML, beacuase the forum allows only 2 links]

An Internal Error Has Occurred

An Internal Error Has Occurred.

Thank you for the info. You do not seem to have duplicated migration files.

Could you provide us with the content of the phinxlog table? On mysql, this command would do it:

SELECT * FROM phinxlog;

Also, are you using Raspberry 4 on 32 or 64 bits?

The issue is probably due to the fact that you are on 32 bit, and some dependencies needed by passbolt require 64 bit. I am further investigating on how to get rid of this dependency.

Yes, its the 32 bit version of Raspian.

Regarding the mysql: unfortunately I have no glue how to do this.
Id need a step-by-setp guide.

Maybe I have to mention I can use Passbolut without any errors! I added anew entry which worked. But I have not tested if sharing or creation of new users will work. But I can look at my entries, create and delete.

It shows also 4.0.0 / 3.12.0 (I am using Firefox) if I hover of the heart. I think the version in front of the slash is the server-version.

Thank you for the info.
The 32 bit is the issue, we do not have to further investigate on the content of the DB.
I am not an expert of Raspian. Would migrating to a 64 bit system be an option?

Thank you, a migration to 64 bit is no option at this time.

I think a lot people will use the 32 bit version of Raspbian/Debian. Because that was the default option for “download raspbian”. I think they changed this a few moth ago. But prior this, the 64 bit version was very well hidden.

I could live with this error so far if could get the “sudo apt upgrade” working again. Because Passbolt itself seems to work fine. Id apprechiate a “real” solution nevertheless, because (as mentioned above), I really believe I am not the only person using Passbolt on a 32 Bit Raspbian.

Thanks for the info on Raspbian. Indeed we are working on a stable solution so we keep supporting 32 bit systems.
I will keep you posted!

2 Likes

On 4.0 CE there is only one migration that is not important (it inserts TOTP as resource type, as it’s useful for current development on mobile, but it’s not available yet). Let us know if you encounter any other issues.

I did now a restore from a recent backup and throw in:
sudo apt-mark hold passbolt-ce-server

Because I was unable to get rid of this error by disabling/hold-back the package via apt or dpkg. This broke my whole ansilbe-update-playbook.

Please inform me when a solution is available.

We have a fix ready for this. This should be fixed soon. I will post you as soon as we have released that.

Hello @sysadmin ,

the v4.0.1 has been released today. It features a fix for the issue you reported. Let us kindly know if this solved your issue.

2 Likes

Hello,

i am facing the same error. Thank you for creating a fix for this issue.
I did a update && upgrade. Sadly without success. Did my pi get the newest release? It says 4.0.1-1 when upgrading… The same error persists as described above.

I also get 502 Bad gateway when i try to access the webpage of the server


Sorry. Not facing the same error, but a new one. Uploading Screenshot.

Hello @duSa and welcome to the forum,

thanks for the report. I am investigating on this!

Hello again @duSa ,

we have released a fix for that. It is still in release candidate version, v4.0.2-rc.1. If you would like to test it, that would be very helpful.

Here is how to, in case you do:

a. Edit the following file
sudo nano /etc/apt/sources.list.d/passbolt.sources
replacing stable by testing

b. Run
sudo apt-get update

c. And
sudo apt-get install passbolt-ce-server

Best of luck!

Hello. Thank you for a fast response @pabloelcolombiano
I did the update v4.0.2-rc.1. The update went through the migration TOTP. The update was a success.
Sadly i still get http error code 502 on ‘raspberry ip’/healthcheck and firefox extensions get also 500 (internal server error). Maybe even the same 502 error.

I have a backup from a v3 passbolt. Dont know what version exactly, but its is before v4 passbolt. I could restore it and try an update again, if you wish so. Please give me feedback if you would like me to do the restore. Or if you wish me to wait so you can future investigate this bug.
I would be happy to help.
Otherwise I plan to restore the passwords and create a backup, so I can migrate to 64bit version of debian.

I also did a restart of nginx and a reboot of the raspberry pi. Sorrowfully nothing changed.

Thanks for the info @duSa . Let me have a look at it first.

1 Like