Hi.

We just started getting these cron errors on every firing of cron.

PHP Fatal error: Uncaught Error: Call to a member function getObject() on null in /home/www/mysite/include/class.thread.php:1400
Stack trace:
#0 /home/www/mysite/include/class.mailfetch.php(865): ThreadEntry::lookupByEmailHeaders(Array, true)
#1 /home/www/mysite/include/class.mailfetch.php(939): MailFetcher->createTicket(17)
#2 /home/www/mysite/include/class.mailfetch.php(1019): MailFetcher->fetchEmails()
#3 /home/www/mysite/include/class.cron.php(25): MailFetcher::run()
#4 /home/www/mysite/include/class.cron.php(110): Cron::MailFetcher()
#5 /home/www/mysite/include/api.cron.php(19): Cron::run()
#6 /home/www/mysite/include/api.cron.php(40): CronApiController->run()
#7 /home/www/mysite/api/cron.php(23): LocalCronApiController::call()
#8 {main}
thrown in /home/www/mysite/include/class.thread.php on line 1400

I'm unable to figure it out, but we are using Amazon SES as our mail service. And did receive this email from them a few days ago. So I am wondering if that is part of the problem?
Can someone please tell me how to troubleshoot or fix this?

Hello,
As we had previously communicated, we are deprecating Signature Version 3 in favor of Signature Version 4 which offers enhanced security for authentication and authorization of Amazon SES customers.

We are extending support for Signature version 3 until February 28, 2021 (the previously announced deprecation date was October 1, 2020). Beginning March 1 2021, support for Signature Version 3 will be turned off in Amazon SES, and only Signature Version 4 will be supported going forward. Amazon SES customers who are currently using Signature Version 3 must migrate to Signature Version 4 by February 28, 2021. After that, Amazon SES will only accept requests that are signed using Signature Version 4.

You can easily identify API requests that use Signature Version 3 by looking at the request headers. Requests that use the Signature Version 3 resemble the following example (note the "AWS3"):
X-Amzn-Authorization: AWS3-HTTPS AWSAccessKeyId=AKIAIOSFOEXAMPLE,Algorithm=HMACSHA256,Signature=lBP67vCvGl ...

To move to Signature Version 4:

If you are self-signing your requests, refer to our documentation for Authenticating requests to the Amazon SES API [1] and creating a canonical request for Signature Version 4 [2].

If you are not self-signing your requests, simply update your SDK/CLI to the latest version.

[1] https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-ses-api-authentication.html
[2] https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html

Sincerely,
Amazon Web Services

@Danielc1234

I do not think it is related (I could be wrong though).

Looking at the code, it's saying it cannot call getObject() on null. Looking deeper it appears that the system finds a Thread Entry in the database and when it calls getThread() it returns null hence the error message saying Call to a member function getObject() on null. I would take a look at the db and make sure all thread entries have a thread and are not orphaned. You can run the following query to check:

SELECT * FROM `ost_thread_entry` `te`
LEFT JOIN `ost_thread` `t` ON (`t`.`id` = `te`.`thread_id`)
WHERE `t`.`id` IS NULL;

Cheers.

@Danielc1234

I forgot to mention, v1.14.1 is pretty outdated. You should consider upgrading to v1.14.6 or v1.15.1.

Cheers.

@KevinTheJedi
Yes, you are correct. There are quite a few orphaned. I think what happened is I cleared the log file from the db instead of selecting and deleting in the admin.

How can I fix this? Just delete the entries that are showing now?

Thanks

Write a Reply...