KevinTheJedi Something is very strange. If I go to account configuration, save the settings and run the script via cron, the emails are downloaded and enter the ticket system.
However, the new emails are pending, so I have to access the email settings again, change anything, save and run cron to download.
I have already tested running cron without accessing the email settings and saving, and when I do this the emails are not downloaded.
And everything only works if it's via cron. Automatically by feth they do not download.
I've already redid the settings, deleted the emails and email instances and recreated them, but it's still the same thing.
I foud this in php error log:
[11-Jun-2024 21:44:56 UTC] PHP Fatal error: Uncaught Error: Call to a member function setConfigClass() on null in phar://D:/www/ticket/include/plugins/auth-oauth2.phar/oauth2.php:640
Stack trace:
#0 phar://D:/www/ticket/include/plugins/auth-oauth2.phar/oauth2.php(467): GenericEmailOauth2Provider->getPluginInstance()
#1 phar://D:/www/ticket/include/plugins/auth-oauth2.phar/oauth2.php(480): OAuth2ProviderBackend->getEmailAuthBackend()
#2 D:\www\ticket\include\class.email.php(907): OAuth2ProviderBackend->refreshAccessToken()
#3 D:\www\ticket\include\class.email.php(788): EmailAccount->getOAuth2AuthCredentials()
#4 D:\www\ticket\include\class.email.php(760): EmailAccount->getCredentials()
#5 D:\www\ticket\include\class.email.php(748): EmailAccount->getFreshCredentials()
#6 D:\www\ticket\include\class.email.php(474): EmailAccount->hasCredentials()
#7 D:\www\ticket\include\class.mailfetch.php(245): EmailAccount->isActive()
#8 D:\www\ticket\include\class.cron.php(25): osTicket\Mail\Fetcher::run()
#9 D:\www\ticket\include\class.cron.php(110): Cron::MailFetcher()
#10 D:\www\ticket\include\api.cron.php(15): Cron::run()
#11 D:\www\ticket\include\api.cron.php(45): CronApiController->run()
#12 D:\www\ticket\api\cron.php(23): LocalCronApiController::call()
#13 {main}
thrown in phar://D:/www/ticket/include/plugins/auth-oauth2.phar/oauth2.php on line 640