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

Error updating from 2.1.27.36 to #3269

Open
seko5553 opened this issue Aug 3, 2022 · 3 comments
Open

Error updating from 2.1.27.36 to #3269

seko5553 opened this issue Aug 3, 2022 · 3 comments

Comments

@seko5553
Copy link

seko5553 commented Aug 3, 2022

Steps to reproduce

  1. sudo wget https://github.com/nilsteampassnet/TeamPass/archive/refs/heads/master.zip
  2. sudo unzip master.zip
  3. sudo cp -r html Backup
  4. sudo rsync -rvl ./TeamPass-master/ ./html/
  5. sudo chmod 0777 install/ includes/ includes/config/ includes/avatars/ includes/libraries/csrfp/libs/ includes/libraries/csrfp/js/ includes/libraries/csrfp/log/ files/ upload/

The last step seems necessary, for the upgrade to work. Otherwise some of the checks fail.
After that I tried to update the mysql as stated in the upgrade-notice:

  1. sudo mysql
  2. use teampass
  3. ALTER TABLE teampass_misc CHANGE id increment_id INT(12) NOT NULL AUTO_INCREMENT;

This caused the first error (discribed in Actual behaviour).
I Ignored it and ran the upgrade process by using the /install/upgrade.php

During the process, I made a database dump.
Further I stored the old table into old_* during the UTF8 conversion. Not shure, why this step would be necessary, as I'was anaware, that the database is not already UTF8.

All checks out, starting the conversion. With me it takes about 90min to complete. All good, just the very last step creates a problem:
I get stuck at the mail sending process.

Expected behaviour

SQL-Update runs smoothly.
Mail sending works within a couple of seconds, all should be delivered and the update should complete.
Needless to say, I waited several hours on that last email-sending-step.

Actual behaviour

ERROR 1054 (42S22): Unknown column 'id' in 'teampass_misc'
Confirmed after checking:
show columns from teampass_misc;
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+----------------+
| increment_id | int | NO | PRI | NULL | auto_increment |
| type | varchar(50) | NO | | NULL | |
| intitule | varchar(100) | NO | | NULL | |
| valeur | varchar(500) | NO | | none | |
+--------------+--------------+------+-----+---------+----------------+

No column called 'id' present.

The second problem of not sendig the emails: To one of the Users, the new password gets sent (its highly probable that this user is the first in the databank, as its the administrator). No other user are getting the new "temproray password". Although it should not be necessary to receive a message at all, as we are using LDAP as authentification method. Further the upgrade progress gets stuck at following message:
Now sending new users password by email ...
freeze

Server configuration

Operating system: Ubuntu Linux Release 20.04.1 LTS (virtual machine on a microsoft server 2012R2)

Web server: Apache 2.4.41

Database: mysql Ver 8.0.30

PHP version: 7.4.3

Teampass version: Starting from 2.1.27.36 upgrading to 3.0.0.18

Teampass configuration file:
tp.config.php.txt

Client configuration

Browser: Firefox 91.4.0esr

Operating system: Windows 10

@nilsteampassnet
Copy link
Owner

Thank you for this complete description.

I don't understand from what step of the upgrade you can have this error ???
Field id in table misc was removed from the upgrade code ...
Are you sure this error occurs when reaching step "sending email to users ..."?

Regarding you second comment, it has nothing to do with ldap.
The upgrade protocol is sending the encryption code unique for each user, it is not the login password.
With this code, each user will be able to have the private key decrypted and re-encrypted with their own login password.

@seko5553
Copy link
Author

Point one I agree, I mixed up the stuff, that I tried during figuring out what I did wrong. Please consider the database-change-attempts as an error from my side. Sorry about that.

The second point:
As you see in the screenshot, I get stuck at that (probably) very last point, where the emails should get send (longest waiting time was now something like 14 hours at that stage - no change). It's strange, as I tried several times to make the update, using different browsers (edge and Firefox). Sadly, they both behave the same.
I'd expect that it sends the mails in a matter of seconds. Further I would think, that if a mailbox is full or cannot be reached (spelling-mistake? I checked twice, but you never know), that the update process would just ignore this and continue anyway.

The table of users contains with ID 1 the administrator (email address behind it is mine). However, no email is being generated for this user. I guess that makes sense.
The next two users seem to be some system accounts:
ID 9999991 OTV
ID 9999999 API
Both have no email address. I guess that’s normal.
Real users have the ID 10000001 and following, thus should be contacted in this sequence I presume. This first mail should therefore go to me, as my user account has this ID. That works without problems.
The actual issue starts at the second user with ID 10000002. He does not get any mail, although, his mail address is set up correctly.
I use an old Exchange 2013, but the queues are all empty.

@osennte
Copy link

osennte commented Aug 24, 2022

Hello, the same repeatedly happened during my upgrade attempts: One mail was sent, then the WebUI seemed to be stuck. A following install/upgrade.php run (that lasts for hours) just sends the mail for the next user!

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

No branches or pull requests

3 participants