### ⚠️ This issue respects the following points: ⚠️
- [X] This is a **bug**, no…t a question or a configuration/webserver/proxy issue.
- [X] This issue is **not** already reported on [Github](https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3Abug) OR [Nextcloud Community Forum](https://help.nextcloud.com/) _(I've searched it)_.
- [X] Nextcloud Server **is** up to date. See [Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) for supported versions.
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Bug description
Hello, sorry for my bad english
I have a Nextcloud server installed on my NAS based on TrueNAS Scale. Nextcloud is behind Nginx Proxy Manager, which is also hosted on my NAS. I have three other users on my Nextcloud server. My account has a strong 40 characters password and Two Authentification through TOTP enabled.
**Today, one user loaded the Nextcloud page (this browser is Brave), but instead of being connected to him account, he was connected to the admin account, so my account. He has access to the full account privileges and files without giving any username, password and TOTP.**
I specified that the user was yesterday connected to his account and this bug appears today then he wants to access Nextcloud.
I didn't know why he had been automatically connected to my admin account by simply loading the page.
### Steps to reproduce
1. Have an other user on the Nextcloud instance.
2. This other user load the Nextcloud page with his browser.
3. The user is connected to the admin account of the Nextcloud instance.
### Expected behavior
The user is not connected to the admin account but only to his own account. And it is not possible to access an account without an username, password and a TOTP code.
### Installation method
Community Docker image
### Nextcloud Server version
27
### Operating system
Other
### PHP engine version
PHP 8.2
### Web server
Nginx
### Database engine version
PostgreSQL
### Is this bug present after an update or on a fresh install?
None
### Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
### What user-backends are you using?
- [X] Default user-backend _(database)_
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
### Configuration report
```shell
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "27.1.1.0",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": "6379"
},
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"upgrade.disable-web": true,
"default_phone_region": "FR",
"share_folder": "\/",
"log_type": "file",
"log_type_audit": "file",
"loglevel": "2",
"logfile": "\/var\/www\/html\/data\/logs\/nextcloud.log",
"logfile_audit": "\/var\/www\/html\/data\/logs\/audit.log",
"logdateformat": "d\/m\/Y H:i:s",
"logtimezone": "Europe\/Paris",
"activity_expire_days": "90",
"trashbin_retention_obligation": "auto",
"versions_retention_obligation": "auto",
"preview_imaginary_url": "http:\/\/mycloud-nextcloud-imaginary:9090",
"enable_previews": "true",
"jpeg_quality": "60",
"preview_max_x": "2048",
"preview_max_y": "2048",
"preview_max_memory": "1024",
"preview_max_filesize_image": "50",
"onlyoffice": "",
"app_install_overwrite": [
"twofactor_admin",
"occweb",
"sharepermissions"
],
"overwrite.cli.url": "https:\/\/mycloud.example.com",
"overwritehost": "mycloud.example.com",
"overwriteprotocol": "https",
"maintenance": false,
"default_language": "fr",
"mail_smtpmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"127.0.0.1",
"localhost",
"mycloud-nextcloud",
"mycloud-nextcloud-*",
"kube.internal.healthcheck",
"http",
"192.168.1.60"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"enabledPreviewProviders": [
"OC\\Preview\\Imaginary",
"OC\\Preview\\BMP",
"OC\\Preview\\GIF",
"OC\\Preview\\JPEG",
"OC\\Preview\\Krita",
"OC\\Preview\\MarkDown",
"OC\\Preview\\MP3",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\PNG",
"OC\\Preview\\TXT",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\SVG",
"OC\\Preview\\TIFF"
]
}
}
```
### List of activated Apps
```shell
Enabled:
- activity: 2.19.0
- announcementcenter: 6.6.2
- bruteforcesettings: 2.7.0
- calendar: 4.5.2
- checksum: 1.2.2
- cloud_federation_api: 1.10.0
- comments: 1.17.0
- contacts: 5.4.2
- contactsinteraction: 1.8.0
- dashboard: 7.7.0
- dav: 1.27.0
- external: 5.2.1
- externalportal: 1.2.0
- federatedfilesharing: 1.17.0
- federation: 1.17.0
- files: 1.22.0
- files_accesscontrol: 1.17.1
- files_antivirus: 5.2.2
- files_external: 1.19.0
- files_mindmap: 0.0.29
- files_pdfviewer: 2.8.0
- files_reminders: 1.0.0
- files_rightclick: 1.6.0
- files_sharing: 1.19.0
- files_texteditor: 2.15.1
- files_trashbin: 1.17.0
- files_versions: 1.20.0
- fileslibreofficeedit: 1.1.0
- forms: 3.3.1
- integration_reddit: 2.0.1
- integration_twitter: 1.0.6
- logreader: 2.12.0
- lookup_server_connector: 1.15.0
- mail: 3.4.0
- metadata: 0.19.0
- nextcloud_announcements: 1.16.0
- notes: 4.8.1
- notifications: 2.15.0
- notify_push: 0.6.3
- oauth2: 1.15.1
- password_policy: 1.17.0
- photos: 2.3.0
- previewgenerator: 5.3.0
- privacy: 1.11.0
- provisioning_api: 1.17.0
- recommendations: 1.6.0
- related_resources: 1.2.0
- serverinfo: 1.17.0
- settings: 1.9.0
- sharebymail: 1.17.0
- spreed: 17.1.1
- support: 1.10.0
- survey_client: 1.15.0
- suspicious_login: 5.0.0
- systemtags: 1.17.0
- tasks: 0.15.0
- text: 3.8.0
- theming: 2.2.0
- twofactor_backupcodes: 1.16.0
- twofactor_totp: 9.0.0
- updatenotification: 1.17.0
- user_status: 1.7.0
- viewer: 2.1.0
- weather_status: 1.7.0
- welcome: 1.0.10
- workflowengine: 2.9.0
```
### Nextcloud Signing status
```shell
No errors have been found.
```
### Nextcloud Logs
```shell
{"reqId":"V6QnXs0h3xtgUBzRyQXD","level":2,"time":"10/10/2023 20:25:18","remoteAddr":"","user":"--","app":"mail","method":"","url":"--","message":"Could not fetch structure detail data to enhance message previews: Authentication failed.","userAgent":"--","version":"27.1.1.0","exception":{"Exception":"Horde_Imap_Client_Exception","Message":"Authentication failed.","Code":102,"Trace":[{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4566,"function":"_responseCode","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],["Horde_Imap_Client_Interaction_Server_Tagged",["stdClass",[],"AUTHENTICATIONFAILED"],3,["Horde_Imap_Client_Tokenize"],"3"]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4314,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4242,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],[["Horde_Imap_Client_Interaction_Command",[],true,false,null,null,["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],["Horde_Imap_Client_Interaction_Server_Tagged",["stdClass",[],"AUTHENTICATIONFAILED"],3,["Horde_Imap_Client_Tokenize"],"3"],"3"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":850,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":512,"function":"_tryLogin","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":2510,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":2493,"function":"_fetchWrapper","class":"Horde_Imap_Client_Base","type":"->","args":["INBOX",["Horde_Imap_Client_Fetch_Query"],[["Horde_Imap_Client_Ids",false]]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MessageMapper.php","line":873,"function":"fetch","class":"Horde_Imap_Client_Base","type":"->","args":["INBOX",["Horde_Imap_Client_Fetch_Query"],[["Horde_Imap_Client_Ids",false]]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/PreviewEnhancer.php","line":86,"function":"getBodyStructureData","class":"OCA\\Mail\\IMAP\\MessageMapper","type":"->","args":[["Horde_Imap_Client_Socket",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log level to debug to see all entries"],true,true],"INBOX",[1,2,3,4,5,"And 11752 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/PreprocessingService.php","line":81,"function":"process","class":"OCA\\Mail\\IMAP\\PreviewEnhancer","type":"->","args":[["OCA\\Mail\\Account"],["OCA\\Mail\\Db\\Mailbox",1],[["OCA\\Mail\\Db\\Message",97],["OCA\\Mail\\Db\\Message",98],["OCA\\Mail\\Db\\Message",99],["OCA\\Mail\\Db\\Message",100],["OCA\\Mail\\Db\\Message",101],"And 11752 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/custom_apps/mail/lib/BackgroundJob/PreviewEnhancementProcessingJob.php","line":94,"function":"process","class":"OCA\\Mail\\Service\\PreprocessingService","type":"->","args":[1695752713,["OCA\\Mail\\Account"]]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Mail\\BackgroundJob\\PreviewEnhancementProcessingJob","type":"->","args":[[3]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]}],"File":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":5030,"message":"Could not fetch structure detail data to enhance message previews: Authentication failed.","exception":{"details":null,"logged":false,"raw_msg":"Authentication failed."},"CustomMessage":"Could not fetch structure detail data to enhance message previews: Authentication failed."}}
{"reqId":"V6QnXs0h3xtgUBzRyQXD","level":2,"time":"10/10/2023 20:25:19","remoteAddr":"","user":"--","app":"mail","method":"","url":"--","message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","userAgent":"--","version":"27.1.1.0","exception":{"Exception":"GuzzleHttp\\Exception\\ClientException","Message":"Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","Code":400,"Trace":[{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":69,"function":"create","class":"GuzzleHttp\\Exception\\RequestException","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":204,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":153,"function":"callHandler","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":[1,"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php","line":48,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":248,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":224,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/lib/private/Http/Client/Client.php","line":301,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["post","https://oauth2.googleapis.com/token",["/var/www/html/data/files_external/rootcerts.crt",30,[["Closure"]],"application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}","And 3 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/custom_apps/mail/lib/Integration/GoogleIntegration.php","line":160,"function":"post","class":"OC\\Http\\Client\\Client","type":"->","args":["https://oauth2.googleapis.com/token",["application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}"]]},{"file":"/var/www/html/custom_apps/mail/lib/Listener/OauthTokenRefreshListener.php","line":55,"function":"refresh","class":"OCA\\Mail\\Integration\\GoogleIntegration","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Mail\\Listener\\OauthTokenRefreshListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"]],"OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/IMAPClientFactory.php","line":77,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php","line":103,"function":"getClient","class":"OCA\\Mail\\IMAP\\IMAPClientFactory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/BackgroundJob/SyncJob.php","line":110,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Mail\\BackgroundJob\\SyncJob","type":"->","args":[[3]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":103,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->","args":[["OC\\BackgroundJob\\JobList"],["OC\\Log"]]}],"File":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php","Line":113,"message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","exception":{},"CustomMessage":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n"}}
{"reqId":"Sy6a46KmmEaXNnhIYUCk","level":2,"time":"10/10/2023 21:24:12","remoteAddr":"**sensitive IP of User1**","user":"adminuser","app":"mail","method":"GET","url":"/apps/mail/","message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"GuzzleHttp\\Exception\\ClientException","Message":"Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","Code":400,"Trace":[{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":69,"function":"create","class":"GuzzleHttp\\Exception\\RequestException","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":204,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":153,"function":"callHandler","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":[1,"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php","line":48,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":248,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->","args":[true]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":224,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/lib/private/Http/Client/Client.php","line":301,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["post","https://oauth2.googleapis.com/token",["/var/www/html/data/files_external/rootcerts.crt",30,[["Closure"]],"application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}","And 3 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/custom_apps/mail/lib/Integration/GoogleIntegration.php","line":160,"function":"post","class":"OC\\Http\\Client\\Client","type":"->","args":["https://oauth2.googleapis.com/token",["application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}"]]},{"file":"/var/www/html/custom_apps/mail/lib/Listener/OauthTokenRefreshListener.php","line":55,"function":"refresh","class":"OCA\\Mail\\Integration\\GoogleIntegration","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Mail\\Listener\\OauthTokenRefreshListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"]],"OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/IMAPClientFactory.php","line":77,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php","line":103,"function":"getClient","class":"OCA\\Mail\\IMAP\\IMAPClientFactory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":142,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/PageController.php","line":145,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\PageController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["mail.page.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php","Line":113,"message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","exception":{},"CustomMessage":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n"}}
{"reqId":"Sy6a46KmmEaXNnhIYUCk","level":3,"time":"10/10/2023 21:24:16","remoteAddr":"**sensitive IP of User1**","user":"adminuser","app":"mail","method":"GET","url":"/apps/mail/","message":"Could not load account mailboxes: IMAP error synchronizing account 3: Authentication failed.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"OCA\\Mail\\Exception\\ServiceException","Message":"IMAP error synchronizing account 3: Authentication failed.","Code":102,"Trace":[{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":142,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/PageController.php","line":145,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\PageController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["mail.page.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php","Line":125,"Previous":{"Exception":"Horde_Imap_Client_Exception","Message":"Authentication failed.","Code":102,"Trace":[{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4566,"function":"_responseCode","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],["Horde_Imap_Client_Interaction_Server_Tagged",["stdClass",[],"AUTHENTICATIONFAILED"],3,["Horde_Imap_Client_Tokenize"],"5"]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4314,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4242,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],[["Horde_Imap_Client_Interaction_Command",[],true,false,null,null,["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],["Horde_Imap_Client_Interaction_Server_Tagged",["stdClass",[],"AUTHENTICATIONFAILED"],3,["Horde_Imap_Client_Tokenize"],"5"],"5"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":850,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":512,"function":"_tryLogin","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1404,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/FolderMapper.php","line":58,"function":"listMailboxes","class":"Horde_Imap_Client_Base","type":"->","args":["*",5,[true,true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php","line":122,"function":"getFolders","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->","args":["*** sensitive parameters replaced ***",["Horde_Imap_Client_Socket",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log level to debug to see all entries"],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":142,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/PageController.php","line":145,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\PageController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["mail.page.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":5030},"message":"Could not load account mailboxes: IMAP error synchronizing account 3: Authentication failed.","exception":{},"CustomMessage":"Could not load account mailboxes: IMAP error synchronizing account 3: Authentication failed."}}
{"reqId":"4jiegHeaT5pLRUTj41t2","level":2,"time":"10/10/2023 21:24:25","remoteAddr":"**sensitive IP of User1**","user":"adminuser","app":"mail","method":"GET","url":"/apps/mail/api/accounts/3/quota","message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"GuzzleHttp\\Exception\\ClientException","Message":"Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","Code":400,"Trace":[{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":69,"function":"create","class":"GuzzleHttp\\Exception\\RequestException","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":204,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":153,"function":"callHandler","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":[1,"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php","line":48,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":248,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->","args":[true]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":224,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/lib/private/Http/Client/Client.php","line":301,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["post","https://oauth2.googleapis.com/token",["/var/www/html/data/files_external/rootcerts.crt",30,[["Closure"]],"application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}","And 3 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/custom_apps/mail/lib/Integration/GoogleIntegration.php","line":160,"function":"post","class":"OC\\Http\\Client\\Client","type":"->","args":["https://oauth2.googleapis.com/token",["application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}"]]},{"file":"/var/www/html/custom_apps/mail/lib/Listener/OauthTokenRefreshListener.php","line":55,"function":"refresh","class":"OCA\\Mail\\Integration\\GoogleIntegration","type":"->","args":[["OCA\\Mail\\Account"]]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Mail\\Listener\\OauthTokenRefreshListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"]],"OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/IMAPClientFactory.php","line":77,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":558,"function":"getClient","class":"OCA\\Mail\\IMAP\\IMAPClientFactory","type":"->","args":[["OCA\\Mail\\Account"]]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/AccountsController.php","line":482,"function":"getQuota","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"getQuota","class":"OCA\\Mail\\Controller\\AccountsController","type":"->","args":[3]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\AccountsController"],"getQuota"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\AccountsController"],"getQuota"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\AccountsController","getQuota",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["3","mail.accounts.getQuota"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/accounts/3/quota"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php","Line":113,"message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","exception":{},"CustomMessage":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n"}}
{"reqId":"4jiegHeaT5pLRUTj41t2","level":3,"time":"10/10/2023 21:24:27","remoteAddr":"**sensitive IP of User1**","user":"adminuser","app":"index","method":"GET","url":"/apps/mail/api/accounts/3/quota","message":"Authentication failed.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"Horde_Imap_Client_Exception","Message":"Authentication failed.","Code":102,"Trace":[{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4566,"function":"_responseCode","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],["Horde_Imap_Client_Interaction_Server_Tagged",["stdClass",[],"AUTHENTICATIONFAILED"],3,["Horde_Imap_Client_Tokenize"],"3"]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4314,"function":"_getLine","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":4242,"function":"_sendCmdChunk","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],[["Horde_Imap_Client_Interaction_Command",[],true,false,null,null,["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]],["Horde_Imap_Client_Interaction_Server_Tagged",["stdClass",[],"AUTHENTICATIONFAILED"],3,["Horde_Imap_Client_Tokenize"],"3"],"3"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":850,"function":"_sendCmd","class":"Horde_Imap_Client_Socket","type":"->","args":[["Horde_Imap_Client_Interaction_Pipeline",[[],[],["Horde_Imap_Client_Exception",null,false,"Authentication failed."]],["Horde_Imap_Client_Fetch_Results"]]]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","line":512,"function":"_tryLogin","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":853,"function":"_login","class":"Horde_Imap_Client_Socket","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Base.php","line":1404,"function":"login","class":"Horde_Imap_Client_Base","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/FolderMapper.php","line":58,"function":"listMailboxes","class":"Horde_Imap_Client_Base","type":"->","args":["*",5,[true,true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":562,"function":"getFolders","class":"OCA\\Mail\\IMAP\\FolderMapper","type":"->","args":[["OCA\\Mail\\Account"],["Horde_Imap_Client_Socket",["HICenv","HICflags","HIChdrs","HICdate","HICsize","And 1 more entries, set log level to debug to see all entries"],true,true]]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/AccountsController.php","line":482,"function":"getQuota","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":[["OCA\\Mail\\Account"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"getQuota","class":"OCA\\Mail\\Controller\\AccountsController","type":"->","args":[3]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\AccountsController"],"getQuota"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\AccountsController"],"getQuota"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\AccountsController","getQuota",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["3","mail.accounts.getQuota"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/accounts/3/quota"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":5030,"CustomMessage":"--"}}
{"reqId":"n8LMOxBlGWKym8EBBIk0","level":2,"time":"10/10/2023 21:24:38","remoteAddr":"**sensitive IP of User1**","user":"adminuser","app":"mail","method":"GET","url":"/apps/mail/box/1/thread/11879","message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"GuzzleHttp\\Exception\\ClientException","Message":"Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","Code":400,"Trace":[{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":69,"function":"create","class":"GuzzleHttp\\Exception\\RequestException","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":204,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":153,"function":"callHandler","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":[1,"*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php","line":48,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":248,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->","args":[true]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":224,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->","args":[]},{"file":"/var/www/html/lib/private/Http/Client/Client.php","line":301,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["post","https://oauth2.googleapis.com/token",["/var/www/html/data/files_external/rootcerts.crt",30,[["Closure"]],"application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}","And 3 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/custom_apps/mail/lib/Integration/GoogleIntegration.php","line":160,"function":"post","class":"OC\\Http\\Client\\Client","type":"->","args":["https://oauth2.googleapis.com/token",["application/json","{\"client_id\":\"398376885386-goms3b2k90lr81q0nv8vilrvvcevq1lg.apps.googleusercontent.com\",\"client_secret\":\"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\",\"grant_type\":\"refresh_token\",\"refresh_token\":\"1\\/\\/03AdLApMwkixvCgYIARAAGAMSNwF-L9Ir6oQfgMf_5EBOFRJ4_So4yHEgp30855j2qIopbHXvGp5wFuoFtFI5_iEiY8yuasEVED8\"}"]]},{"file":"/var/www/html/custom_apps/mail/lib/Listener/OauthTokenRefreshListener.php","line":55,"function":"refresh","class":"OCA\\Mail\\Integration\\GoogleIntegration","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Mail\\Listener\\OauthTokenRefreshListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated",["Symfony\\Component\\EventDispatcher\\EventDispatcher"]]},{"file":"/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[["Closure"]],"OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"],"OCA\\Mail\\Events\\BeforeImapClientCreated"]},{"file":"/var/www/html/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCA\\Mail\\Events\\BeforeImapClientCreated",["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/IMAPClientFactory.php","line":77,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[["OCA\\Mail\\Events\\BeforeImapClientCreated"]]},{"file":"/var/www/html/custom_apps/mail/lib/IMAP/MailboxSync.php","line":103,"function":"getClient","class":"OCA\\Mail\\IMAP\\IMAPClientFactory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Service/MailManager.php","line":142,"function":"sync","class":"OCA\\Mail\\IMAP\\MailboxSync","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/PageController.php","line":145,"function":"getMailboxes","class":"OCA\\Mail\\Service\\MailManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/mail/lib/Controller/PageController.php","line":304,"function":"index","class":"OCA\\Mail\\Controller\\PageController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"thread","class":"OCA\\Mail\\Controller\\PageController","type":"->","args":[1,11879]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"thread"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\PageController"],"thread"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\PageController","thread",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["1","11879","mail.page.thread"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/box/1/thread/11879"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php","Line":113,"message":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n","exception":{},"CustomMessage":"Could not refresh oauth token: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response:\n{\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}\n"}}
```
### Additional info
The user who discovered the bug is using the Brave browser.
My NAS is working on TrueNAS SCALE 22.12
The Nextcloud instance is on Internet behind Nginx Proxy Manager.