API Error (possible bug?)

To be completed by the original poster:

CMS Version

Version 3.1.1 - PHP Ver: 7.3.29 - Apache setup Ver: 2.4.6 (Manual installation without docker)

Issue

Hi, I’ve been trying to link Xibo to my Canva account for days but without success, I can’t figure out what’s wrong (or if there is a bug related to the location of the certificate).

I have run the guides listed here to the letter and repeatedly and followed each post related to the problem but when connecting I always get this error:

{“error”: 0, “message”: “API configuration problem, consult your administrator”}

this is present in the logs

[2022-05-04 07:39:29] API.ERROR: Unable to read key from file upload_xibo//certs/public.key [] {"method":"GET","route":"/api/","uid":"ede89e1"}
[2022-05-04 07:39:29] API.DEBUG: #0 /var/www/html/xibo/vendor/league/oauth2-server/src/ResourceServer.php(50): League\OAuth2\Server\CryptKey->__construct('upload_xibo//ce...') #1 /var/www/html/xibo/lib/Middleware/ApiAuthorization.php(82): League\OAuth2\Server\ResourceServer->__construct(Object(Xibo\OAuth\AccessTokenRepository), 'upload_xibo//ce...') #2 [internal function]: Xibo\Middleware\ApiAuthorization->Xibo\Middleware\{closure}(Object(DI\Container)) #3 /var/www/html/xibo/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array(Object(Closure), Array) #4 /var/www/html/xibo/vendor/php-di/php-di/src/Definition/Resolver/FactoryResolver.php(80): Invoker\Invoker->call(Object(Closure), Array) #5 /var/www/html/xibo/vendor/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php(64): DI\Definition\Resolver\FactoryResolver->resolve(Object(DI\Definition\FactoryDefinition), Array) #6 /var/www/html/xibo/vendor/php-di/php-di/src/Container.php(380): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\FactoryDefinition), Array) #7 /var/www/html/xibo/vendor/php-di/php-di/src/Container.php(138): DI\Container->resolveDefinition(Object(DI\Definition\FactoryDefinition)) #8 /var/www/html/xibo/lib/Middleware/ApiAuthorization.php(87): DI\Container->get('server') #9 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\ApiAuthorization->process(Object(Slim\Http\ServerRequest), Object(Slim\Routing\RouteRunner)) #10 /var/www/html/xibo/lib/Middleware/State.php(89): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #11 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\State->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #12 /var/www/html/xibo/lib/Middleware/Log.php(59): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #13 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Log->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #14 /var/www/html/xibo/lib/Middleware/Storage.php(61): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #15 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Storage->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #16 /var/www/html/xibo/lib/Middleware/Xmr.php(67): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #17 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\Xmr->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #18 /var/www/html/xibo/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #19 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #20 /var/www/html/xibo/lib/Middleware/TrailingSlashMiddleware.php(68): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #21 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Xibo\Middleware\TrailingSlashMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #22 /var/www/html/xibo/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #23 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #24 /var/www/html/xibo/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #25 /var/www/html/xibo/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Http\ServerRequest)) #26 /var/www/html/xibo/vendor/slim/slim/Slim/App.php(199): Slim\App->handle(Object(Slim\Http\ServerRequest)) #27 /var/www/html/xibo/web/api/index.php(95): Slim\App->run() #28 {main} [] {"method":"GET","route":"/api/","uid":"ede89e1"}

From the logs this jumped my eye:
Unable to read key from file upload_xibo//certs/public.key

it seems to me a wrong directory, but I don’t know in case how to fix it

Can anyone help me?
Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.