bendudz / fpp-zettle

FPP Plugin for Zettle card devices.
5 stars 0 forks source link

Can't update or create a subscription #3

Closed Mat-Moo closed 9 months ago

Mat-Moo commented 9 months ago

When I upgraded fpp I(OS) lost dataplicity, so I reinstalled it and have a new url. However I couldn't update subscription, uninstalled, re-installed, still can't create a subscription, all I get is Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://pusher.izettle.com/organizations/self/subscriptions` resulted in a `400 Bad Request` response: {"developerMessage":"Could not connect to https://xxx:yyy@aaa.dataplicity.io/api/plugin/fpp-zettle (truncated...) in /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create() #1 /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}() #2 /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler() #3 /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/pr in /home/fpp/media/plugins/fpp-zettle/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113 But if I run the same endpoint through postman it works as expected (Is that the whole url as it just seems to be JSONdata about the plugin) Even tried deleting api keys in zettle and making new ones

PiSignage commented 9 months ago

Thank you for submitting the problem. Try and remove your UI password from Fpp and try again. Dataplicity does not take the ui password into cass.

dawsmac commented 9 months ago

I just had the same issue.. @PiSignage removing the UI Password fixed this. Can I reenable it after the account has been created?

Mat-Moo commented 9 months ago

I'm not adding the username and password, just the url, the plugin must be adding it - but I tested with postman both ways and it worked anyway

Mat-Moo commented 9 months ago

image

PiSignage commented 9 months ago

Based on your output you had https://xxx:yyy@aaa.dataplicity.io/api/plugin/fpp-zettle. The system will automatically add username and password by default and append it to the url. This is xxx:yyyy@

Dataplicity for some reason does not ask for the password even if you have one set. I have a help number of people with this problem soon as they remove the ui password all was good.

An update will be out soon adding warning about the ui password and I will remove the ui password function to stop it being added to the url and some other changes and code optimizations

PiSignage commented 9 months ago

@dawsmac for some reason dataplicity does not ask for the ui password even if it is set. At the moment the plugin will automatically add the ui detail the url you input. A update will we out soon removing this to stop this error repeating itself

Mat-Moo commented 9 months ago

Thank you for submitting the problem. Try and remove your UI password from Fpp and try again. Dataplicity does not take the ui password into cass.

Oh hold one, cross wires here - do you mean, actually remove the password form the FPP UI, or from the input field?

Mat-Moo commented 9 months ago

Ok I disabled the FPP UI password and then it worked - I thought you meant do add the basic AUTH to the URL, which I wasn't doing