tomolimo / processmaker

GLPI plugin that provides an interface with ProcessMaker (http://www.processmaker.com/)
30 stars 11 forks source link

RuntimeException: session id was not set. #154

Closed kofe88 closed 11 months ago

kofe88 commented 1 year ago

Hi!

GLPI 9.5.7

processmaker Name: Process Maker Version: 4.0.11 State: Enabled

ProcessMaker Ver. 3.3.0-community-RE-1.7

System Exception.
RuntimeException:
session id was not set.
At Sessions->verifySession()
in /opt/processmaker-server/workflow/public_html/sysGeneric.php line 984
At include() in /opt/processmaker-server/workflow/public_html/app.php line 45
At include() in /opt/processmaker-server/workflow/public_html/glpi/app.php line 314

image

But from another PC all is ok.

tomolimo commented 1 year ago

Hello @kofe88 Could you detail the steps in order to reproduce the issue? Thank you, Regards, Tomolimo

kofe88 commented 1 year ago

@tomolimo yes, have two servers: 1 - GLPI 9.5.7 port 44444 ssl 2 - Processmaker port 8080 ssl In same domain name.

When logging in from some PCs (which are in the domain, but the user does not have Internet access) the iframe is not loaded with processmaker, writes an error. If you log in to the same PC as a user (meaning a WIndows AD user, not in glpi) who has Internet access, everything works as it should. All PCs and servers are on the same network.

image

tomolimo commented 1 year ago

Hello @kofe88 Could you also have a look into the php error logs? Thank you Regards, Tomolimo

kofe88 commented 1 year ago

@tomolimo yes

error.log from GLPI server

[Wed Sep 07 08:17:41.806982 2022] [php7:warn] [pid 17475] [client 192.168.13.8:52214] PHP Warning:  ldap_search(): Search: Bad search filter in /var/www/html/glpi/inc/user.class.php on line 1798
[Wed Sep 07 08:17:41.807122 2022] [php7:warn] [pid 17475] [client 192.168.13.8:52214] PHP Warning:  ldap_get_entries() expects parameter 2 to be resource, bool given in /var/www/html/glpi/inc/authldap.class.php on line 3729
[Wed Sep 07 08:17:41.807208 2022] [php7:warn] [pid 17475] [client 192.168.13.8:52214] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /var/www/html/glpi/inc/user.class.php on line 1803
[Wed Sep 07 08:17:52.063495 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Undefined index: pluginprocessmaker in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.063568 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.063589 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.081341 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'status_code' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.form.php on line 60, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.081421 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'caseId' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.form.php on line 65, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.145041 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Undefined index: pluginprocessmaker in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.145123 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.145160 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.160286 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'status_code' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 51, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.203386 2022] [php7:warn] [pid 16629] [client 192.168.13.8:52215] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : br in Entity, line: 1 in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 102, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.206292 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'processId' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 118, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207096 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'currentUsers' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 150, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207135 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 150, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207152 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'delIndex' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 151, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207165 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'caseStatus' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 151, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207200 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'caseId' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 154, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207215 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'delIndex' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 154, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207226 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'caseNumber' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 154, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207237 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'processName' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 154, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207259 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Undefined index: pluginprocessmaker in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207285 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207302 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to access array offset on value of type null in /var/www/html/glpi/plugins/processmaker/inc/processmaker.class.php on line 230, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207316 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'caseId' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 157, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php
[Wed Sep 07 08:17:52.207480 2022] [php7:notice] [pid 16629] [client 192.168.13.8:52215] PHP Notice:  Trying to get property 'processName' of non-object in /var/www/html/glpi/plugins/processmaker/front/processmaker.helpdesk.form.php on line 162, referer: https://support.my-site.ru:44444/plugins/processmaker/front/tracking.injector.php

error.log from processmaker server

[Wed Sep 07 08:17:52.353831 2022] [php7:notice] [pid 23750] [client 192.168.8.250:53046] PHP Notice:  Undefined index: file in /opt/processmaker-server/framework/src/templates/Exception.phtml on line 84
[Wed Sep 07 08:17:52.353991 2022] [php7:notice] [pid 23750] [client 192.168.8.250:53046] PHP Notice:  Undefined index: line in /opt/processmaker-server/framework/src/templates/Exception.phtml on line 84
[Wed Sep 07 08:17:52.433005 2022] [php7:notice] [pid 23753] [client 192.168.8.250:53050] PHP Notice:  Undefined index: file in /opt/processmaker-server/framework/src/templates/Exception.phtml on line 84
[Wed Sep 07 08:17:52.433076 2022] [php7:notice] [pid 23753] [client 192.168.8.250:53050] PHP Notice:  Undefined index: line in /opt/processmaker-server/framework/src/templates/Exception.phtml on line 84
tomolimo commented 1 year ago

Hello @kofe88, Could you check that user who is logged in GLPI, is also existing in PM server administration? For me it looks like the current GLPI user is not logged into PM server -> i.e.: it doesn't exist in PM server or is not in the "GLPI Users" default group in PM server (group defined in PM plugin config). Thank you, Regards, Tomolimo

kofe88 commented 1 year ago

@tomolimo

Exactly, you are absolutely right! The user was not imported automatically into PM.

It turns out that the automatic action "pmusers" is not performed. There are errors in the logs, in sql.

[2022-09-07 10:05:46] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/inc/dbmysql.class.php line 335
  *** MySQL query error:
  SQL: INSERT INTO `GROUP_USER` (`GRP_UID`, `USR_UID`) VALUES ('3269604196131e090ef5d22010845697', '4681002296131e07c129b78015656085')
  Error: Duplicate entry '3269604196131e090ef5d22010845697-4681002296131e07c129b7801565...' for key 'PRIMARY'
  Backtrace :
  inc/dbmysql.class.php:1174
  ...ns/processmaker/inc/processmaker.class.php:1470 DBmysql->insert()
  inc/crontask.class.php:943                         PluginProcessmakerProcessmaker::cronPMUsers()
  front/crontask.form.php:49                         CronTask::launch()
  {"user":"7@support","mem_usage":"0.003\", 6.16Mio)"}
[2022-09-07 10:05:46] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/inc/dbmysql.class.php line 335
  *** MySQL query error:
  SQL: INSERT INTO `GROUP_USER` (`GRP_UID`, `USR_UID`) VALUES ('3269604196131e090ef5d22010845697', '4391743876131e07e17e3f6033429124')
  Error: Duplicate entry '3269604196131e090ef5d22010845697-4391743876131e07e17e3f603342...' for key 'PRIMARY'
  Backtrace :
  inc/dbmysql.class.php:1174
  ...ns/processmaker/inc/processmaker.class.php:1470 DBmysql->insert()
  inc/crontask.class.php:943                         PluginProcessmakerProcessmaker::cronPMUsers()
  front/crontask.form.php:49                         CronTask::launch()
  {"user":"7@support","mem_usage":"0.000\", 6.16Mio)"}
[2022-09-07 10:05:46] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/inc/dbmysql.class.php line 335
  *** MySQL query error:
  SQL: INSERT INTO `GROUP_USER` (`GRP_UID`, `USR_UID`) VALUES ('3269604196131e090ef5d22010845697', '2170275176131e0867fe427031066466')
  Error: Duplicate entry '3269604196131e090ef5d22010845697-2170275176131e0867fe42703106...' for key 'PRIMARY'
  Backtrace :
  inc/dbmysql.class.php:1174
  ...ns/processmaker/inc/processmaker.class.php:1470 DBmysql->insert()
  inc/crontask.class.php:943                         PluginProcessmakerProcessmaker::cronPMUsers()
  front/crontask.form.php:49                         CronTask::launch()
  {"user":"7@support","mem_usage":"0.000\", 6.16Mio)"}
[2022-09-07 10:05:46] glpisqllog.ERROR: DBmysql::query() in /var/www/html/glpi/inc/dbmysql.class.php line 335
  *** MySQL query error:
  SQL: INSERT INTO `GROUP_USER` (`GRP_UID`, `USR_UID`) VALUES ('3269604196131e090ef5d22010845697', '4293824546131e08ebdf180055612301')
  Error: Duplicate entry '3269604196131e090ef5d22010845697-4293824546131e08ebdf18005561...' for key 'PRIMARY'
  Backtrace :
  inc/dbmysql.class.php:1174
  ...ns/processmaker/inc/processmaker.class.php:1470 DBmysql->insert()
  inc/crontask.class.php:943                         PluginProcessmakerProcessmaker::cronPMUsers()
  front/crontask.form.php:49                         CronTask::launch()
  {"user":"7@support","mem_usage":"0.000\", 6.16Mio)"}

image

Automatic - NOT OK:

image

Manual - OK:

image

At the same time, it is performed manually.

tomolimo commented 1 year ago

Hello @kofe88 Then try to delete the users in the group which has GRP_UID = '3269604196131e090ef5d22010845697' Like: DELETE FROM GROUP_USER WHERE GRP_UID = '3269604196131e090ef5d22010845697'; Then re-add manually all users of PM server user list into the default GLPI group (you have to be sure that '3269604196131e090ef5d22010845697' is the UID of the default GLPI group (to be checked in GLPI DB in the glpi_plugin_processmaker_configs table, field is pm_group_guid). To re-add users, go to the PM server group list, and then add all PM users (at least allo the GLPI users) into that group. and check next pmusers automatic action logs. Thank you, Regards, Tomolimo

tomolimo commented 11 months ago

Hello @kofe88 I close this issue as there is no answer to my last suggestion. Feel free to re-open if needed. Thank you Regards, Tomolimo