Closed plochu closed 1 year ago
Hi @plochu,
Thank you for using Bitnami. This question is related to the application, its configuration and the different plugins/extensions you are using and it's out of the scope of this support forum. We suggest you ask in the official forums of SuiteCRM to get more information about the errors you are getting and how to troubleshoot the issue.
I'm also trying to get help from SuiteCRM support. I fully understand you but in my opinion this issue can be related with Bitnami package. Other system that has been deployed manually from very beginning with default settings doesn't have this issue.
You are right, and this may be related to the packaging but please note that this is a very specific issue and the SuiteCRM's team should help you debug the issue or at least let you know how to troubleshoot it. We include some tests in our pipeline to ensure the application works after configuring it but we can't control all scenarios. We will be more than happy to change anything wrong in our packaging if required, but as we do not have complete control over the application, we can't provide support here and if the app doesn't provide the exact error, it's even harder for us.
Please be aware that this situation appears after fresh install of your stack, without any custom modules ect.
The asterisk integration module errors that yu can see in report are inrelavant and to be sure I also confirmed issue starting new instance without any additional changes after "clean" installation from AMI.
The only thing made by me is generating keys in {{suitecrm.root}}/Api/V8/OAuth2
directory. And of course setting proper chown
/ chmod
. This is a must be for API v8 to work.
BTW. I think that you can automaticly generate keys above during installation process.
BTW 2. I reproduced similar issue to described on other system. API was working fine but after upgrade php7 to php8 we recieve 500 error in exacly the same point. This could be completly coincidence but also this could be a good lead. I will try to verify this.
The PHP version change is a good lead. They do not mention anything regarding issues with PHP 8.0 in the documentation but maybe they are not aware of them or the documentation is outdated
https://docs.suitecrm.com/developer/api/developer-setup-guide/requirements/
You are very right. The question is whether you will engage in it. At this point, your product is not properly prepared for basic work.
I understand that you also have to look at it from the business side and the popularity of the stack. I also know that working with the SuiteCRM community can be difficult.
Please note that using PHP 7.x is not possible anymore as they are not supported and we will be introducing bugs and security issues in the product.
https://www.php.net/supported-versions.php
If there is an issue with PHP, this is something the SuiteCRM's developers need to fix. We can't do anything right now to solve this and there was not any note/warning in the documentation that prevented us to update the solution to PHP 8.x
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Guys, we experience identical problem on Bitnami-suitecrm8 stack (PHP 8.1)
Hi @teemk,
As I mentioned above, this seems to be a problem in the application. Please contact them to troubleshoot the issue.
Thanks
Hi @teemk @plochu , Incase this issue is not resolved.
Issue is related to PHP version upgrade. And specifically introduction of class OpenSSLAsymmetricKey.
Suitecrm is using lcobucci/jwt package which they use to sign the oauth keys.
I changed this file to resolve this issue:
vendor/lcobucci/jwt/src/Signer/OpenSSL.php
i'm having the same issue. @sunnykumar347 what is the change you made after fresh install?
vendor/lcobucci/jwt/src/Signer/OpenSSL.php
< this file does not exist in my bitnami suiteCRM instance 8.6.2
@grinono You might not have this issue, because 8.6.2 already using PHP 8 as default version which means lcobucci/jwt would be latest for it.
Please check other things.
BTW file is still there, you can see it after installing dependencies using composer install
@sunnykumar347 i'm not seeing the file. And yes i ran the composer install command.
my logs show
PHP Fatal error: Uncaught LogicException: Invalid key supplied in /bitnami/suitecrm/vendor/league/oauth2-server/src/CryptKey.php:67
stack trace
Stack trace:
#0 /bitnami/suitecrm/public/legacy/Api/V8/Config/services/middlewares.php(48): League\OAuth2\Server\CryptKey->__construct()
#1 /bitnami/suitecrm/vendor/pimple/pimple/src/Pimple/Container.php(122): Api\Core\Resolver\ConfigResolver::{closure}()
#2 /bitnami/suitecrm/vendor/slim/slim/Slim/Container.php(109): Pimple\Container->offsetGet()
#3 /bitnami/suitecrm/public/legacy/Api/V8/Config/routes.php(17): Slim\Container->get()
#4 /bitnami/suitecrm/vendor/slim/slim/Slim/RouteGroup.php(25): Api\Core\Loader\RouteLoader->{closure}()
#5 /bitnami/suitecrm/vendor/slim/slim/Slim/App.php(272): Slim\RouteGroup->__invoke()
#6 /bitnami/suitecrm/public/legacy/Api/V8/Config/routes.php(132): Slim\App->group()
#7 /bitnami/suitecrm/public/legacy/Api/Core/Loader/RouteLoader.php(22): require('...')
#8 /bitnami/suitecrm/public/legacy/Api/Core/app.php(26): Api\Core\Loader\RouteLoader->configureRoutes()
#9 /bitnami/suitecrm/public/legacy/Api/index.php(11): require_once('...')
#10 /bitnami/suitecrm/public/index.php(61): require('...')
#11 {main}
Platform
AWS
bndiagnostic ID know more about bndiagnostic ID
ddefa4cb-128f-ea8a-1755-f85dfae01865
bndiagnostic output
===== Begin of bndiagnostic tool output =====
[Resources]
Your instance has little available RAM memory.
You could try to increase your instance's memory. Please check your cloud provider's documentation for more information.
Press [Enter] to continue: [Apache]
Found recent error or warning messages in the Apache error log.
Please check the following guide to troubleshoot server issues:
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro rs-apache/
===== End of bndiagnostic tool output =====
bndiagnostic was not useful. Could you please tell us why?
still can't find issue source
Describe your issue as much as you can
Hi, here is the case :slight_smile:
Fresh installation in AWS cloud using Bitnami SuiteCRM. Everything works fine but not API. All steps checked with GUIDE
When I call endpoint
https://xxx.xxx.xxx.xxx/Api/access_token
I get 500 response with:
{“error”:“unknown_error”,“message”:"It was not possible to parse your key, reason: "}
There are no errors in Apache error_log. Here is dump from suitecrm.log
Where should I look for error?
BTW. When I use “wrong” credentials I get: for wrong client id (error 500)
{"error":"unknown_error","message":"OAuth2Clients module with id 43c68236-a52e-12ac-0108-637ca367a023a is not found"}
for wrong client_secret (error 401)
{"error":"invalid_client","message":"Client authentication failed"}
So this API works fine, there is some server processing problem. Also I can see from SuiteCRM console that token has ben generated.