Problems with SuiteCRM 8.6.1 and 8.6.2 on Ubuntu 22.04

All of a sudden I get the following error when trying to enter the Accounts module:

Error occurred while fetching metadata

Sometimes it does work, but no sub-panels are visible anymore. What does this error mean? Is the cause logged somewhere? I cannot find anything in the suitecrm.log and/or apache log. Any ideas how to investigate this further?

So, I thought it a good idea to upgrade from 8.6.1 to 8.6.2, but I get the following error, when I try to run the upgrade-finalize step…

./bin/console suitecrm:app:upgrade-finalize -t SuiteCRM-8.6.2

In SystemConfigHandler.php line 112:

App\SystemConfig\LegacyHandler\SystemConfigHandler::__construct(): Argument #29 ($sessionExpiredConfig) must be of type array, Symfony\Component\HttpFoundation\Session\Sessio
n given, called in /var/www/html/cache/prod/Container6zWmeOY/App_KernelProdContainer.php on line 634

Regards,

Tom

It could be simply permission and ownership issue. Try to set them again and run your finalize step.

You can search for errors in logs/prod/prod.log

Specifically look for Fatal errors in there

Thank you!

This one looks suspicious:

request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: “Invalid CSRF token” at /var/www/html/core/backend/Security/CSRFValidationListener.php line 95 {“exception”:“[object] (Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException(code: 0): Invalid CSRF token at /var/www/html/core/backend/Security/CSRFValidationListener.php:95)”} []

Clearing all the cookies in the browser and relogin did not resolve this.

Regrettably this still does not work. Also it only accurs in the Accounts module! The rest is just working fine. So how can that be a CSFR token issue…

Suggested steps to debug the issue:

  1. On the front end be ready to go the accounts page (which is giving the error) in one click. Like if the error is on detail page of an account. Open the browser on accounts listpage
  2. Clear the prod.log file
  3. Open the page giving the error
  4. Check the prod.log especially near the end of the file
    You should find critical or fatal type of error
  5. Post the error here or maybe the error text will give you an idea of the issue

Thank you. I tried to do this, but onec I moved the prod.log out of the way, no new file is created. Even after creating the file and setting the ownership and restarting the whole VM, the file remains empty. Any ideas?

Open the inspect window Ctrl+shift+I in windows
Go to the page giving the error
Go to the network tab and look at the graphql calls responses . Probably one of them will have an error in them
Additionally any errors in the console might give you an idea of the error

I managed to upgrade SuiteCRM to 8.6.2, but that did not solve the issue. Also I installed latest Dutch language pack. Also, that did not make a difference (either in English or in Dutch)

I get lots and lots of errors (all INFO as far as I can tell) in prod.deprecations.log

I get this error in the console:

node_modules_angular_core_fesm2022_core_mjs.3e1a513b7cb4915e.js:1 ERROR Error: Uncaught (in promise): ApolloError: Internal server error
ApolloError
at new e (node_modules_apollo-angular_fesm2022_ngApollo_mjs-_63b60.6beb10d2ab674fd4.js:1:31534)
at node_modules_apollo-angular_fesm2022_ngApollo_mjs-_63b60.6beb10d2ab674fd4.js:1:76738
at A (node_modules_apollo-angular_fesm2022_ngApollo_mjs-_63b60.6beb10d2ab674fd4.js:1:39578)
at node_modules_apollo-angular_fesm2022_ngApollo_mjs-_63b60.6beb10d2ab674fd4.js:1:39493
at new n (polyfills.8b11d31048ab8f48.js:1:19099)
at Object.then (node_modules_apollo-angular_fesm2022_ngApollo_mjs-_63b60.6beb10d2ab674fd4.js:1:39460)
at Object.next (node_modules_apollo-angular_fesm2022_ngApollo_mjs-_63b60.6beb10d2ab674fd4.js:1:39588)
at Se (core_app_shell_src_bootstrap_ts.07e790b4dacc88d1.js:1:169674)
at Oe (core_app_shell_src_bootstrap_ts.07e790b4dacc88d1.js:1:170228)
at C.next (core_app_shell_src_bootstrap_ts.07e790b4dacc88d1.js:1:170736)
at ve (polyfills.8b11d31048ab8f48.js:1:16679)
at ve (polyfills.8b11d31048ab8f48.js:1:16218)
at polyfills.8b11d31048ab8f48.js:1:17522
at x.invokeTask (polyfills.8b11d31048ab8f48.js:1:7831)
at Object.onInvokeTask (node_modules_angular_core_fesm2022_core_mjs.3e1a513b7cb4915e.js:1:168446)
at x.invokeTask (polyfills.8b11d31048ab8f48.js:1:7752)
at te.runTask (polyfills.8b11d31048ab8f48.js:1:3175)
at j (polyfills.8b11d31048ab8f48.js:1:9872)
at k.invokeTask [as invoke] (polyfills.8b11d31048ab8f48.js:1:8915)
at N (polyfills.8b11d31048ab8f48.js:1:21511)

I think you need yo look in the network tab to identify which graphql call is failing

Hi,

You can perform the following points to resolve this issue:
  1. Clear SuiteCRM Cache: rm -rf cache/*

  2. Clear the cache using SuiteCRM’s console: ./bin/console cache:clear

  3. Check SuiteCRM logs and Apache logs carefully. Sometimes, errors can be logged in different places or with different levels of verbosity.

  4. Check for Custom Code Issues: If you have custom modules or code, ensure they are compatible with the current version of SuiteCRM. Custom code or extensions may interfere with module functionality.

Error Explanation:

The error message suggests that the SystemConfigHandler class is expecting an argument of type array, but it’s receiving an instance of Symfony\Component\HttpFoundation\Session\Session. This is likely a mismatch between expected and actual argument types in the class or an issue with the upgrade script.

Locate the SystemConfigHandler class and inspect the constructor to ensure it matches the expected argument types.

File: custom/src/SystemConfig/LegacyHandler/SystemConfigHandler.php

Ensure that the constructor definition matches the expected type in the latest version. If necessary, manually adjust it to align with the changes in the newer version.