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

Replication failing #41

Closed
stayallive opened this issue Jan 26, 2019 · 5 comments
Closed

Replication failing #41

stayallive opened this issue Jan 26, 2019 · 5 comments

Comments

@stayallive
Copy link

stayallive commented Jan 26, 2019

I'm back :)

The replication is failing with the folowing error:

PHP Notice:  Undefined index: summary in /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Process/Replicate.php on line 183
PHP Warning:  hash_equals(): Expected known_string to be a string, null given in /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Process/Replicate.php on line 183
PHP Notice:  Undefined index: summary in /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Process/Replicate.php on line 186
PHP Fatal error:  Uncaught ParagonIE\Chronicle\Exception\SecurityViolation: Invalid summary hash. Expected , calculated g_uhhZBFE4iP-k9rPx_TyzdJz6NYfgZYQetvThhAo8M= in /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Process/Replicate.php:185
Stack trace:
#0 /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Process/Replicate.php(116): ParagonIE\Chronicle\Process\Replicate->appendToChain(Array)
#1 /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Scheduled.php(129): ParagonIE\Chronicle\Process\Replicate->replicate()
#2 /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Scheduled.php(86): ParagonIE\Chronicle\Scheduled->doReplication()
#3 /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Scheduled.php(60): ParagonIE\Chronicle\Scheduled->runAll()
#4 /var/www/vhosts/example.com/chronicle.example.com/bin/scheduled-tasks.php(36): ParagonIE\Chronicle\Scheduled->run()
#5 {main}
  thrown in /var/www/vhosts/example.com/chronicle.example.com/src/Chronicle/Process/Replicate.php on line 185

Possibly because of a missing signature in the second to last entry in the chain?

Replicating: https://php-chronicle.pie-hosted.com/chronicle/export

@paragonie-scott
Copy link
Member

The replication is failing with the folowing error:

Thanks, I'm looking at this now.

Possibly because of a missing signature in the second to last entry in the chain?

Nope, Chronicle is agnostic to the contents of, well, contents.

@paragonie-scott
Copy link
Member

At line 173 in src/Chronicle/Process/Replicate.php, can you add these lines to get more information for me?


        if (!isset($entry['summary'])) {
            $db->rollBack();
            var_dump($entry);
            exit;
        }

@stayallive
Copy link
Author

Yeah, no problem. Here is the output:

array(7) {
  ["contents"]=>
  string(188) "{
    "repository": "paragonie\/certainty",
    "sha256": "c1fd9b235896b1094ee97bfb7e042f93530b5e300781f59b45edf84ee8c75000",
    "signature": "",
    "time": "2019-01-25T19:27:54-05:00"
}"
  ["prevhash"]=>
  string(44) "FiHEKXb4oY3EGSKeflCeghU0PGGuyBLxJKF_hlrAGWQ="
  ["currhash"]=>
  string(44) "Lcf4yAcuW4a_NlG43I7IjYqZ2PGU3CZL7yfoGf1sA-g="
  ["summaryhash"]=>
  string(44) "g_uhhZBFE4iP-k9rPx_TyzdJz6NYfgZYQetvThhAo8M="
  ["created"]=>
  string(25) "2019-01-25T19:27:57-05:00"
  ["publickey"]=>
  string(44) "mPLfrUEV_qnwlsNUhbO_ILBulKysO3rPYYWqWAYCA0I="
  ["signature"]=>
  string(88) "NE3t7XjiFOJwRdkKV4bqmU_AMWzQRX8hZE1BTFnVLfACo2lKJh9soMtTgECNQq-lEixAXny3n-_wLG6pQBHdBw=="
}

@paragonie-scott
Copy link
Member

D'oh! Okay, it'll be fixed in v1.1.3.

@stayallive
Copy link
Author

Jep works loads better now 😉 Thanks for the quick fix! 💪

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

2 participants