Hi everyone,
I try to configured email account authentication method as ‘OAuth’ and its shown below error message please guide anyone how to configure email account based on OAuth.
Traceback with variables (most recent call last):
File “apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 494, in get_inbound_mails
email_server = self.get_incoming_server(in_receive=True, email_sync_rule=email_sync_rule)
process_mail = <function EmailAccount.get_inbound_mails..process_mail at 0x7f1051b06050>
email_sync_rule = ‘UNSEEN’
mails = []
self = <EmailAccount: Vijayk>
File “apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 208, in get_incoming_server
self.check_email_server_connection(email_server, in_receive)
self = <EmailAccount: Vijayk>
in_receive = True
email_sync_rule = ‘UNSEEN’
oauth_token = Traceback (most recent call last):
File “env/lib/python3.10/site-packages/traceback_with_variables/core.py”, line 222, in to_cropped_str
raw = print(obj)
TypeError: _get_sanitizer...() takes 0 positional arguments but 1 was given
args = {'email_account_name': 'Vijayk', 'email_account': 'Vijayk', 'host': 'outlook.office365.com', 'use_ssl': 1, 'use_starttls': 0, 'username': 'vijayk@online.com', 'use_imap': 1, 'email_sync_rule': 'UNSEEN', 'incoming_port': 993, 'initial_sync_count': '250', 'use_oauth': True, 'access_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyIsImtpZCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyJ9.eyJhdWQiOiIwMDAwMDAwMi0wMDAwLTAwMDAtYzAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8wNDA1ZGJiOC1kYmIyLTQ2YTgtOGQyOC1lOTYwNTU4MjQ5OTUvIiwiaWF0IjoxNjc1NDA4Mjg4LCJuYmYiOjE2NzU0MDgyODgsImV4cCI6MTY3NTQxMzA2NiwiYWNyIjoiMSIsImFpbyI6IkFWUUFxLzhUQUFBQXZnRDNGQWJ6dFo0dTMwLzN3K0E4ZjhJSFJ1ZkViTCsybWQraXhwR0RWT0FxSytzM0tKdWdQZFRBRjlsR0ttbElrSmowQnZpNDJZbGJzY2JVRU5FYTI1OGZpNlNrL2Y5b3Q4VkxRZzhNTVZBPSIsImFtciI6WyJwd2QiLCJtZmEiXSwiYXBwaWQiOiJlYmQyZjhmOS0yZmQzLTRhMTAtYTJhMC1mNmE3ZTAxOWI5ZWYiLCJhcHBpZGFjciI6IjEiLCJmYW1pbHlfbmFtZSI6IksiLCJnaXZlbl9uYW1lIjoiVmlqYXlhIEt1bW...
email_server = <frappe.email.receive.EmailServer object at 0x7f10505f0370>
File “apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 246, in check_email_server_connection
frappe.throw(cstr(e))
self = <EmailAccount: Vijayk>
email_server = <frappe.email.receive.EmailServer object at 0x7f10505f0370>
in_receive = True
auth_error_codes = [‘authenticationfailed’, ‘loginfailed’]
other_error_codes = [‘err[auth]’, ‘errtemporaryerror’, ‘loginviayourwebbrowser’]
all_error_codes = [‘authenticationfailed’, ‘loginfailed’, ‘err[auth]’, ‘errtemporaryerror’, ‘loginviayourwebbrowser’]
message = ‘authenticatefailed.’
File “apps/frappe/frappe/init.py”, line 525, in throw
msgprint(
msg = ‘AUTHENTICATE failed.’
exc = <class ‘frappe.exceptions.ValidationError’>
title = None
is_minimizable = False
wide = False
as_list = False
File “apps/frappe/frappe/init.py”, line 493, in msgprint
_raise_exception()
title = None
as_table = False
as_list = False
indicator = ‘red’
alert = False
primary_action = None
is_minimizable = False
wide = False
sys = <module ‘sys’ (built-in)>
out = {‘message’: ‘AUTHENTICATE failed.’, ‘title’: ‘Message’, ‘indicator’: ‘red’, ‘raise_exception’: 1}
_raise_exception = <function msgprint.._raise_exception at 0x7f105258a050>
_strip_html_tags = <functools._lru_cache_wrapper object at 0x7f105014c9e0>
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘AUTHENTICATE failed.’
raise_exception = <class ‘frappe.exceptions.ValidationError’>
strip_html_tags = <function strip_html_tags at 0x7f105320aa70>
File “apps/frappe/frappe/init.py”, line 442, in _raise_exception
raise raise_exception(msg)
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘AUTHENTICATE failed.’
raise_exception = <class ‘frappe.exceptions.ValidationError’>
frappe.exceptions.ValidationError: AUTHENTICATE failed.