Skip to content
This repository was archived by the owner on Jan 26, 2025. It is now read-only.

PHP Fatal error: Uncaught Http\Discovery\Exception\DiscoveryFailedException: Could not find resource using any discovery strategy #79

@aaronpk

Description

@aaronpk

In a brand new install of this library, I am getting the following error:

PHP Fatal error:  Uncaught Http\Discovery\Exception\DiscoveryFailedException: Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors
 - Puli Factory is not available
 - No valid candidate found using strategy "Http\Discovery\Strategy\CommonClassesStrategy". We tested the following candidates: .
 - No valid candidate found using strategy "Http\Discovery\Strategy\CommonPsr17ClassesStrategy". We tested the following candidates: Phalcon\Http\Message\ResponseFactory, Nyholm\Psr7\Factory\Psr17Factory, Zend\Diactoros\ResponseFactory, GuzzleHttp\Psr7\HttpFactory, Http\Factory\Diactoros\ResponseFactory, Http\Factory\Guzzle\ResponseFactory, Http\Factory\Slim\ResponseFactory, Laminas\Diactoros\ResponseFactory, Slim\Psr7\Factory\ResponseFactory.

In an empty folder, I ran:

composer require okta/jwt-verifier firebase/php-jwt guzzlehttp/psr7

Then created a file test.php containing:

<?php
require('vendor/autoload.php');

$jwtVerifier = (new \Okta\JwtVerifier\JwtVerifierBuilder())
    ->setIssuer('foo')
    ->setAudience('api://default')
    ->setClientId('foo')
    ->setAdaptor(new \Okta\JwtVerifier\Adaptors\FirebasePhpJwt())
    ->build();

When running php test.php I get the above error. I tried installing the mentioned libraries at the link in the error:

composer require php-http/curl-client guzzlehttp/psr7 php-http/message

but still get the same errors.

I am running PHP 7.4.16

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions