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

Upgrade to 1.5.1 failed #126

Open
TheNomad11 opened this issue Nov 29, 2021 · 33 comments
Open

Upgrade to 1.5.1 failed #126

TheNomad11 opened this issue Nov 29, 2021 · 33 comments
Labels

Comments

@TheNomad11
Copy link

Describe the bug

Upgrade from 1.50. to 1.5.1 failed

Context

  • Hardware: *VPS bought online /
  • YunoHost version: 4.3.4.1 (stable)
  • I have access to my server: Through SSH | through the webadmin.
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no

Steps to reproduce

  • Upgrade via the webadmin

Expected behavior

Upgrade succeeded

Logs

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

@ericgaspar ericgaspar added the bug label Nov 29, 2021
@MayeulC
Copy link

MayeulC commented Nov 29, 2021

Exactly the same issue here: https://paste.yunohost.org/raw/ibojoyekan

@sys4-fr
Copy link

sys4-fr commented Nov 29, 2021

The same when upgrading from the CLI too: https://paste.yunohost.org/raw/ohoricugim

@TheNomad11
Copy link
Author

TheNomad11 commented Nov 29, 2021

Now, 13 hours later than my initial post, the upgrade (via webadmin) worked without any issues!

@mdic
Copy link

mdic commented Nov 30, 2021

I have just retried upgrading from 1.5.0ynh2 to 1.5.1ynh1 and I'm still unable to do so, due to the issue outlined above - setup is equivalent to @TheNomad11's

@TheNomad11
Copy link
Author

Oh that was weird, it showed up as an available upgrade again, it was not upgraded, there was no error message. The upgrade was for two apps at the same time (dokuwiki also). When I run the upgrade for Roundcube only, the error message about failed upgrade appeared again

@isAAAc
Copy link

isAAAc commented Dec 1, 2021

upgrade KO here too, on 2 different servers: (same error msg):

Info: DEBUG - [FAILED]
Info: DEBUG - ERROR: [1050] Table 'collected_contacts' already exists

@nathanael-h
Copy link

It seems the url for the package changed :

https://packagist.org/?query=automatic_addressbook&type=roundcube-plugin

sblaisot/automatic_addressbook $automatic_addressbook_version"

- sblaisot/automatic_addressbook $automatic_addressbook_version"
+ projectmyst/automatic_addressbook $automatic_addressbook_version"

I dit not tried the new package.

@ericgaspar
Copy link
Member

Thanks! here is a branch to test: https://github.com/YunoHost-Apps/roundcube_ynh/tree/change-url-package

@nathanael-h
Copy link

Thanks for the branch!
Tested, unfortunately failed. The error is the same. Creating database schema... ERROR: [1050] Table 'collected_contacts' already exists
Here are full logs : https://paste.yunohost.org/raw/zocipuqixe

@nathanael-h
Copy link

Error is known upstream, and a fix has been suggested: HostOncilla/roundcube-automatic_addressbook#3

@ericgaspar
Copy link
Member

Yes I have seen the proposed fix. I was wondering why the error pops out now and not in the previous 1.5.0 Roundcube version... 🤔 automatic_addressbook plugin hasn't been updated since 2017.

@massimilian0
Copy link

Question.
Any idea when this fix wil be applyed?
Or is there a way we can make this upgrade work with a workaround?

@pp-r
Copy link
Contributor

pp-r commented Dec 24, 2021

Hello,

I try to just upgrade to 1.5.1 from #123 by making a fork https://github.com/pp-r/roundcube_ynh/tree/ppr_test_upgrade_1.5.1.
It failed and the log is here : https://paste.yunohost.org/raw/firosanobe
Hope it could helps.

ppr

@ericgaspar
Copy link
Member

I may have found the bug... 🙄
This is a mistake I did in the config file by removing // installed plugins. This line get replaced by the list of installed plugins

in the config file (var/www/roundcube/config/config.inc.php), after L.142, ('enigma',) we should have two other plugins declared:

'enigma',
'contextmenu',
'automatic_adressbook',

If any are missing, you can add them to the list.

I haven't tested the upgrade from 1.50. to 1.5.1.

#129 should fix the issue (or part of it)

sudo yunohost app install https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug
or
sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug

@pp-r
Copy link
Contributor

pp-r commented Dec 28, 2021

Hi,

I try to add 'contextmenu', and 'automatic_adressbook', after 'enigma', but the upgrade failed (https://paste.yunohost.org/raw/linehilara)
Before applying these adds i've tryed to upgrade but it failed too (https://paste.yunohost.org/raw/pirifoxono)

In these 2 cases this error is still here :

2021-12-28 18:23:22,716: DEBUG - - Removing roundcube/plugin-installer (0.2.0)
2021-12-28 18:23:22,752: DEBUG - - Installing roundcube/plugin-installer (0.3.1): Extracting archive
2021-12-28 18:23:22,793: DEBUG - Failed to extract roundcube/plugin-installer: (9) '/usr/bin/unzip' -qq '/var/www/roundcube/vendor/composer/tmp-886e191f7512bc2ede33bcea3cf9ae2b' -d '/var/www/roundcube/vendor/composer/d00e91e1'
2021-12-28 18:23:22,793: DEBUG -
2021-12-28 18:23:22,794: DEBUG - unzip: cannot find or open /var/www/roundcube/vendor/composer/tmp-886e191f7512bc2ede33bcea3cf9ae2b.
2021-12-28 18:23:22,794: DEBUG -
2021-12-28 18:23:22,794: DEBUG - This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
2021-12-28 18:23:22,794: DEBUG - See composer/installers@5006d0c for an example fix`

Unfortunately i can't help you to solve it.
I can only test your patch and share log.

ppr

@nathanael-h
Copy link

A few lines after the plugin plugin-installer (0.3.1) seems to be ok.
But the same error raises again : 2021-12-28 09:30:54,451: DEBUG - Creating database schema... ERROR: [1050] Table 'collected_contacts' already exists (SQL Query: CREATE TABLE ``collected_contacts`` (

@isAAAc
Copy link

isAAAc commented Jan 17, 2022

any update on this blocking issue ?

@rodinux
Copy link

rodinux commented Jan 21, 2022

Well, me too I failed with the upgrade, I have also try sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug here the logs https://paste.yunohost.org/raw/arinemikuy

@rodinux
Copy link

rodinux commented Jan 21, 2022

Also a problem with the database and Table 'collected_contacts' already exists

2022-01-21 01:26:21,233: DEBUG - Creating database schema... ERROR: [1050] Table 'collected_contacts' already exists (SQL Query: CREATE TABLE `collected_contacts` (
2022-01-21 01:26:21,233: DEBUG -  `contact_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
2022-01-21 01:26:21,234: DEBUG -  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
2022-01-21 01:26:21,234: DEBUG -  `del` tinyint(1) NOT NULL DEFAULT '0',
2022-01-21 01:26:21,234: DEBUG -  `name` varchar(128) NOT NULL DEFAULT '',
2022-01-21 01:26:21,235: DEBUG -  `email` text NOT NULL,
2022-01-21 01:26:21,235: DEBUG -  `firstname` varchar(128) NOT NULL DEFAULT '',
2022-01-21 01:26:21,238: DEBUG -  `surname` varchar(128) NOT NULL DEFAULT '',
2022-01-21 01:26:21,238: DEBUG -  `vcard` longtext NULL,
2022-01-21 01:26:21,238: DEBUG -  `words` text NULL,
2022-01-21 01:26:21,239: DEBUG -  `user_id` int(10) UNSIGNED NOT NULL,
2022-01-21 01:26:21,239: DEBUG -  PRIMARY KEY(`contact_id`),
2022-01-21 01:26:21,240: DEBUG -  CONSTRAINT `user_id_fk_collected_contacts` FOREIGN KEY (`user_id`)
2022-01-21 01:26:21,240: DEBUG -    REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
2022-01-21 01:26:21,242: DEBUG -  INDEX `user_collected_contacts_index` (`user_id`,`del`)
2022-01-21 01:26:21,242: DEBUG - ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */)
2022-01-21 01:26:21,242: DEBUG - [FAILED]
2022-01-21 01:26:21,243: DEBUG - ERROR: [1050] Table 'collected_contacts' already exists
2022-01-21 01:26:21,277: DEBUG - + ynh_exit_properly

@MayeulC
Copy link

MayeulC commented Jan 21, 2022

The upgrade to 1.5.2 succeeded for me 🎉

@pedro-nonfree
Copy link

pedro-nonfree commented Jan 21, 2022

@MayeulC not working for me, did you apply something else? (I did nothing, just upgrade)

admin@fbv:~$ sudo yunohost tools update
Info: Fetching available upgrades for system packages...
Info: Updating application catalog...
Success! The application catalog has been updated!
apps: 
  current_version: 1.5.0~ynh1
  id: roundcube
  label: Roundcube
  new_version: 1.5.2~ynh1
system: 
admin@fbv:~$ sudo yunohost tools upgrade system
Info: Nothing to do. Everything is already up-to-date.
Info: Upgrading packages...
Success! System upgraded
admin@fbv:~$ sudo yunohost tools upgrade apps
(...)

sudo yunohost log share 20220121-104851-app_upgrade-roundcube -> https://paste.yunohost.org/raw/fumikowili

@milouse
Copy link

milouse commented Jan 21, 2022

I make the install succeed by stupidly droping the two involved tables: collected_addresses and collected_contacts. In my case I barely trust those "collected" addresses as I only use contacts already sync by caldav. Thus by dropping the tables… obviously the creation step succeeded and everything worked fine.

If anyone want to do the same you just have to open mysql client:

sudo mysql --defaults-file=/etc/mysql/debian.cnf

Then, at mysql prompt, switch to the roundcube database

use roundcube;

If you want to review first the content of those tables you can do:

select * from collected_addresses;
select * from collected_contacts;

And if you have no problem losing those data, just do

drop table collected_addresses;
drop table collected_contacts;

Quit mysql client with exit, and then run again the roundcube upgrade. It will pass.

If you don’t want to loose your data, maybe waiting for a fix is safer. Or maybe you can try to dump first the content of those table, then dropping them, upgrade roundcube, and finally import back your backup.

@isAAAc
Copy link

isAAAc commented Jan 22, 2022

dump first the content of those table, then dropping them, upgrade roundcube, and finally import back your backup.

could this be automated in the upgrade process script ?

@klahaha
Copy link

klahaha commented Feb 2, 2022

@nathanael-h says "sblaisot/automatic_addressbook" replaced by "projectmyst/automatic_addressbook"

but 1line patch stay dormant after november: HostOncilla/roundcube-automatic_addressbook#3

maybe fork and publish new pkg to packagist to fix error? it take 5 minutes if you have packagist account

@nathanael-h
Copy link

Do you have one? Could you publish this fork? I don't.

@isAAAc
Copy link

isAAAc commented Feb 25, 2022

Do you have one? Could you publish this fork? I don't.

@alexAubin @maniackcrudelis @kay0u @Psycojoker
some of you has the good rights to do this please ?

@frederic-moulis
Copy link

Hi, same here !
https://paste.yunohost.org/raw/ejemevixez
(1.4.11 to 1.5.2)

@isAAAc
Copy link

isAAAc commented Mar 16, 2022

without any fix since november 21, i removed roundcube, and reinstalled it in the good fresh version (no data loss),
but in any case, present upgrade is broken

@ericgaspar
Copy link
Member

One solution is to remove automatic addressbook plugin from the install script. I don't know how users will feel about that...

@vladp
Copy link

vladp commented Mar 20, 2022

@isAAAc I am running into this problem. I am now worried that in next yunohost system update, I will end up with a broken system, as email (roundcube) is the only app I am using.
how did you remove/reinstall without loosing all the data?

can you provide commands (or steps if you did it via UI) ?

thx

@isAAAc
Copy link

isAAAc commented Mar 28, 2022

@vladp yunohost app remove roundcube && yunohost app install roundcube
;)

@TheNomad11
Copy link
Author

TheNomad11 commented Apr 21, 2022

@vladp yunohost app remove roundcube && yunohost app install roundcube ;)

Thanks! It worked. Some settings got lost, but the filters were still there

@MayeulC
Copy link

MayeulC commented Apr 21, 2022

@MayeulC not working for me, did you apply something else? (I did nothing, just upgrade)

It actually just showed as successful somehow, but it didn't succeed. I will try to reinstall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests