Panopto / Moodle-2.0-plugin-for-Panopto

Panopto's integration with the Moodle LMS.
http://www.panopto.com
GNU General Public License v3.0
18 stars 38 forks source link

Many warnings in Moodle cronjob #199

Open Richardvi opened 1 year ago

Richardvi commented 1 year ago

I'm running Moodle 4.1.2 with latest Panopto plugin and see a lot of these warnings in the Cronjob log:

Execute adhoc task: block_panopto\task\sync_user_login Adhoc task id: 10342 Adhoc task custom data: {"userid":"4279"} ... started 20:10:54. Current memory use 20.8 MB.

Warning: Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in /home/learndev/public_html/lib/clilib.php on line 45

Warning: fwrite() expects parameter 1 to be resource, string given in /home/learndev/public_html/lib/clilib.php on line 36

Warning: Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in /home/learndev/public_html/lib/clilib.php on line 45

Warning: fwrite() expects parameter 1 to be resource, string given in /home/learndev/public_html/lib/clilib.php on line 36

Warning: Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in /home/learndev/public_html/lib/clilib.php on line 45

Warning: fwrite() expects parameter 1 to be resource, string given in /home/learndev/public_html/lib/clilib.php on line 36

Warning: var_export does not handle circular references in /home/learndev/public_html/blocks/panopto/lib/panopto_user_soap_client.php on line 122

Warning: var_export does not handle circular references in /home/learndev/public_html/blocks/panopto/lib/panopto_user_soap_client.php on line 122

Warning: var_export does not handle circular references in /home/learndev/public_html/blocks/panopto/lib/panopto_user_soap_client.php on line 122

Warning: var_export does not handle circular references in /home/learndev/public_html/blocks/panopto/lib/panopto_user_soap_client.php on line 122

Warning: Use of undefined constant STDOUT - assumed 'STDOUT' (this will throw an Error in a future version of PHP) in /home/learndev/public_html/lib/clilib.php on line 45

Warning: fwrite() expects parameter 1 to be resource, string given in /home/learndev/public_html/lib/clilib.php on line 36 ... used 7 dbqueries ... used 0.10246300697327 seconds Adhoc task complete: block_panopto\task\sync_user_login

jrchamp commented 1 year ago

The STDOUT constant is supposed to be built into the CLI environment so that you don't have to open the php://stdout handle multiple times. Seems a bit odd that it's failing, but the purpose is to print output. The var_export() is very odd, almost like the value being passed in is a very messy object, but it at least points us to problem.

https://github.com/Panopto/Moodle-2.0-plugin-for-Panopto/blob/857a85ac25b91ae34a6a5deff816ff46857c8d59/lib/panopto_user_soap_client.php#L121-L122

The SyncExternalUser function is failing. Now, I'm not sure why, and that's what the "getLastError" is supposed to be explaining, but there's probably a different problem like there's users on Moodle that are not on Panopto or the API call is failing.

jmalmsten-panopto commented 1 year ago

Hi,

I have filed an internal work item to look into this issue.

Thank you for your patience, Joe

Richardvi commented 10 months ago

We updated our test server to Moodle 4.3 and this is showing the same errors. I also see a new error, more or less the same as the old error.

Execute adhoc task: block_panopto\task\ensure_category Adhoc task id: 17355 Adhoc task custom data: {"categoryid":"336"} ... started 21:38:26. Current memory use 7.7 MB. ... used 2 dbqueries ... used 0.11007881164551 seconds Adhoc task failed: block_panopto\task\ensure_category,Undefined constant "STDOUT" Backtrace:

Richardvi commented 10 months ago

And the old one:

Execute adhoc task: block_panopto\task\sync_user_login Adhoc task id: 16987 Adhoc task custom data: {"userid":"17859"} ... started 21:56:05. Current memory use 7.6 MB. ... used 0 dbqueries ... used 0.0084228515625 seconds Adhoc task failed: block_panopto\task\sync_user_login,Undefined constant "STDOUT" Backtrace:

Richardvi commented 10 months ago

Moodle 4.3, PHP 8.0

Richardvi commented 2 weeks ago

Still having these errors. We have upgrade to Moodle 4.4, PHP 8.1

image