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

Call to a member function format() on null #130

Closed
theseer opened this issue Feb 6, 2018 · 3 comments
Closed

Call to a member function format() on null #130

theseer opened this issue Feb 6, 2018 · 3 comments

Comments

@theseer
Copy link
Member

theseer commented Feb 6, 2018

Installing with --trust-keys crashes

phive install --trust-gpg-keys 4AA394086372C20A,2A8299CE842DD38C


Phive 0.9.0 - Copyright (C) 2015-2018 by Arne Blankerts, Sebastian Heuer and Contributors
Fetching respository list
Downloading https://phar.io/data/repositories.xml
Downloading https://phar.phpunit.de/phive.xml
Downloading https://phar.phpunit.de/phpunit-6.5.6.phar
Downloading https://phar.phpunit.de/phpunit-6.5.6.phar.asc
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
Downloading https://hkps.pool.sks-keyservers.net/pks/lookup?search=0x4AA394086372C20A&op=get&options=mr
Successfully downloaded key
[ERROR]    An error occurred while processing your request:

          Call to a member function format() on null
          
          #0 src/services/key/PublicKey.php(68)
          #1 src/services/key/KeyService.php(69): PharIo\Phive\PublicKey->getInfo()
          #2 src/services/signature/gpg/GnupgSignatureVerifier.php(40): PharIo\Phive\KeyService->importKey()
          #3 src/services/phar/PharDownloader.php(109): PharIo\Phive\GnupgSignatureVerifier->verify()
          #4 src/services/phar/PharDownloader.php(61): PharIo\Phive\PharDownloader->verifySignature()
          #5 src/services/phar/PharService.php(38): PharIo\Phive\PharDownloader->download()
          #6 src/services/phar/InstallService.php(67): PharIo\Phive\PharService->getPharFromRelease()
          #7 src/commands/install/InstallCommand.php(58): PharIo\Phive\InstallService->execute()
          #8 src/commands/install/InstallCommand.php(44): PharIo\Phive\InstallCommand->installRequestedPhar()
          #9 src/shared/cli/Runner.php(211): PharIo\Phive\InstallCommand->execute()
          #10 src/shared/cli/Runner.php(70): PharIo\Phive\Cli\Runner->execute()
          #11 phive(54): PharIo\Phive\Cli\Runner->run()
          #12 {main}

          Environment: PHP 7.2.2
          Phive Version: 0.9.0

          This should not have happened and is most likely a bug.
          Please report it at /~https://github.com/phar-io/phive/issues, make sure you include
          the full output of this error message. Thank you!
@theseer
Copy link
Member Author

theseer commented Feb 6, 2018

It does not seem to happen for every run.

@theseer
Copy link
Member Author

theseer commented Feb 6, 2018

The only way this can happen is that the response from the keyserver, despite it claiming to be successful, was not actually containing the data the parser expects. That would lead to non of the cases in PublicKey::parseInfo() matching and $this->created not being set.

Not sure how to fix that the right way (tm).

@theseer
Copy link
Member Author

theseer commented Jun 23, 2018

Work on this should continue in #147.

@theseer theseer closed this as completed Jun 23, 2018
theseer added a commit that referenced this issue Jun 23, 2018
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

1 participant