Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Error loading request metadata. Server returned an error response. #76

Open
salarmehr opened this issue Mar 11, 2019 · 6 comments
Open

Comments

@salarmehr
Copy link

It says "loading request metadata. returned an error response."
How can I see the error itself?

// PHP page
<?php

require_once __DIR__.'/../vendor/autoload.php';

$clockwork = Clockwork\Support\Vanilla\Clockwork::init([ 'api' => '/temp/server.php' ]);
$clockwork->requestProcessed();

API endpoint

<?php

require_once __DIR__.'/../vendor/autoload.php';

$clockwork = Clockwork\Support\Vanilla\Clockwork::init();
$clockwork->returnMetadata();

@salarmehr
Copy link
Author

The server.php returns null when I see it directly.

@itsgoingd
Copy link
Owner

Hey, the $clockwork->returnMetadata() method expects the request id in a "request" get parameter by default. This means you want your api endpoint set to /temp/server.php?request=, as Clockwork apps will append the requested id to the configured endpoint uri.

@salarmehr
Copy link
Author

@itsgoingd thanks for your response. it still does not work

It says "loading request metadata. returned an error response."
How can I see the error itself?

@salarmehr
Copy link
Author

Do you have please a minimum working example? the minimal code in the client page and server page.

@salarmehr
Copy link
Author

Would be great if you update the plugin to show the server error too instead of saying "Server returned an error response."

@itsgoingd
Copy link
Owner

I've published an example vanilla app here, let me know if it helps - https://github.com/underground-works/clockwork-examples/tree/master/Integrations/Vanilla-PHP

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

No branches or pull requests

2 participants