You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start a fresh install of development commit a076916
Continue the installation until you reach the Finalization page.
At the Finalization page, click <Launch>.
Expected behaviour
The finalization steps should complete successfully without any errors displayed or logged.
Actual behaviour
As shown in the screenshot below, checkmarks appeared beside all 3 finalization steps, but error "[ERROR] Answer from server is empty." was also displayed immediately to the left of the <Launch> button. The following error appeared in the Apache log:
[Fri Sep 01 14:29:54.266055 2017] [php7:notice] [pid 5657] [client 192.168.240.120:53747] PHP Fatal error: Uncaught Defuse\\Crypto\\Exception\\BadFormatException: Encoded data is shorter than expected. in /opt/teampass/teampass__TEST__20170901-a076916/includes/libraries
/Encryption/Encryption/Encoding.php:168\nStack trace:\n#0 /opt/teampass/teampass__TEST__20170901-a076916/includes/libraries/Encryption/Encryption/Key.php(38): Defuse\\Crypto\\Encoding::loadBytesFromChecksummedAsciiSafeString('\\xDE\\xF0\\x00\\x00', false)\n#1 /opt/teampa
ss/teampass__TEST__20170901-a076916/install/install.queries.php(92): Defuse\\Crypto\\Key::loadFromAsciiSafeString(false)\n#2 /opt/teampass/teampass__TEST__20170901-a076916/install/install.queries.php(1043): encryptFollowingDefuse('test12345...', false)\n#3 {main}\n
thrown in /opt/teampass/teampass__TEST__20170901-a076916/includes/libraries/Encryption/Encryption/Encoding.php on line 168, referer: https://www.example.com/tptest/install/install.php
NOTE: If <Restart> was immediately clicked without clearing out the database, the SK directory, etc., then the installation completed successfully. I snapshotted the file-tree for both the 1st and 2nd tries. There were two overall differences:
includes/config/settings.php was missing after the 1st try, but present after the 2nd try.
You are right, this error could happen randomly depending on what order is done some installation tasks. In your previous ticket, you have written that this error happens randomly .. this word was very important ;)
Let me explain. During this step of the installation, a set of tasks need to be performed.
Those tasks are put in a stack and executed. Meaning that potentially the tasks are not done in an expected order. So as I have added a dependency between 2 tasks, the error happens if taskB is performed before taskA.
Tested 6 times against fresh installs of development commit 6bb32ae. Successful completion each time - no errors observed in the apache logs, and no error messages observed on the Finalization page after clicking <Launch>. Was able to login successfully as administrator each time after completing the install. Closing this issue.
Speaking as someone who started coding professionally in 1991, I absolutely hate bugs that appear to manifest randomly. Of-course they turn out to be quite predictable once their root-cause is finally determined, but that doesn't help much beforehand. Thanks for chasing this one down so quickly.
Steps to reproduce
Expected behaviour
The finalization steps should complete successfully without any errors displayed or logged.
Actual behaviour
As shown in the screenshot below, checkmarks appeared beside all 3 finalization steps, but error "[ERROR] Answer from server is empty." was also displayed immediately to the left of the <Launch> button. The following error appeared in the Apache log:
NOTE: If <Restart> was immediately clicked without clearing out the database, the SK directory, etc., then the installation completed successfully. I snapshotted the file-tree for both the 1st and 2nd tries. There were two overall differences:
Failure Screenshot
Server configuration
Operating system: Fedora 26 (x86_64)
Web server: Apache 2.4
Database: MariaDB 10.1
PHP version: 7.1
Teampass version: Development commit a076916
Teampass configuration file:
Updated from an older Teampass or fresh install: Fresh Install
Client configuration
Browser: FireFox 55 (64-bit)
Operating system: Windows 10
Logs
Web server error log
See above in Actual Behaviour
The text was updated successfully, but these errors were encountered: