Getting "Request timed out" alert when i try to save an gmail account

hey guys i am getting an alert saying “Request timed out” when i try to save my gmail account , my email id and password are correct and i tried for two ports also 465 and 587 but i am getting the same error. please help me in configuring my email

This means that you either have your details incorrectly added, or that you require to lessen the security settings on your Google account in able to make it work withb ERPNext.

You will find a number of previous queries on this forum with answers below. Please search in the forum and the docs first as this question has been asked and answered (so) many times already

here

and thsi one from just a few days ago

2 Likes

hey,I have given correct details and i have given access to less secure apps in google account also.

i used bench migrate as u suggested to do in one of the docs whole application crashed im not even able to log in.

Can you post the traceback for the error when the application crashed?

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 39, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 133, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 149, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 156, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 169, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 15, in get_context
context = get_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 35, in get_page_context
page_context = make_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 43, in make_page_context
context = resolve_route(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 21, in resolve_route
return get_page_context_from_doctype(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 75, in get_page_context_from_doctype
page_info = get_page_info_from_doctypes(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 97, in get_page_info_from_doctypes
controller = get_controller(doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 36, in get_controller
module = load_doctype_module(doctype, module_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 185, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(module_name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 704, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/newsletter/newsletter.py”, line 10, in 
from frappe.email.queue import check_email_limit
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py”, line 17, in 
from frappe.utils.scheduler import log
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 47, in 
“all”: “0/” + str((frappe.get_conf().scheduler_interval or 240) // 60) + " * * * *",
TypeError: unsupported operand type(s) for //: ‘unicode’ and ‘int’

Can you share how you configured your email account here as well as your frappe and erpnext versions?

Thanks

is there any command to check the versions?
i tried configuring my gmail by going to email accounts->jobs and gave my email id and password set server to GMail and tried to save but was getting that alert instead of saving

For the versions, in the top right part of the navigation pane go to Help > About.
If you have access to the server terminal, go to the frappe-bench folder and type
bench version
to get the version of frappe, erpnext and the other apps installed.

For the email accounts setup, can you give us a screenshot? You can blot out the email address and other sensitive information.

ERPNext: v10.1.38 (master)

Frappe Framework: v10.1.36 (master)

refer to fix here Uncaught Server Exception TypeError: unsupported operand type(s) for //: 'unicode' and 'int' - #5 by Mandeep_B_C

it was me only who posted that query there:slight_smile:
im not getting the solution for gmail configuration

Yes gmail is fussy for eg poll for inbound mail more often than say every 10 minutes and it ignore your requests.

Timeout errors often are due to an incorrect port or the correct port is closed in your network.

A forum search will you will find lots of reports and learnings.

Please don’t forget to add your resolution here for all to benefit, thanks

“Yes gmail is fussy for eg poll for inbound mail more often than say every 10 minutes and it ignore your requests.”

Re the above and your schedule_interval value of 300 here Uncaught Server Exception TypeError: unsupported operand type(s) for //: 'unicode' and 'int' - #4 by clarkej

You may want to increase that to 600-900 seconds!?

see here post 17 and 22 JobTimeoutException: Job exceeded maximum timeout value (300 seconds) - #17 by abhinavjain

no luck with that i set the interval to 900 and again same error is coming, i tried in local system it worked,but in digital ocean i’m getting this error.
Please help to solve this

@Mandeep_B_C Yeah, I too still didn’t fix it and unable to fix it. If you have solved kindly let me know.

Thanks.

i can save incoming email account but getting error in outgoing email account.

“i tried in local system it worked,but in digital ocean i’m getting this error”

That helps - divide and conquer - now test digital ocean with this Email Domain Setup - Stuck One Saving - #12 by shikher

A digital ocean help faq or support forum could shed light here too?

nc -vv smtp.gmail.com 587
nc: connect to smtp.gmail.com port 587 (tcp) failed: Connection timed out
Connection to smtp.gmail.com 587 port [tcp/submission] succeeded!
220 smtp.gmail.com ESMTP e17-v6sm14407139pfd.15 - gsmtp

i’m getting this output

How do I enable IPv6 SMTP?

We currently do not allow SMTP traffic over IPv6 as a side effect of how email black lists treat IPv6 addresses.

You can give priority to IPv4 addresses over IPv6 so that you can continue to send out email without disabling IPv6. You would do that by editing the Droplet’s /etc/gai.conf file and removing the comment (#) from the following line:

Default Configuration: #precedence ::ffff:0:0/96 100

Configuration with Priority to IPv4: precedence ::ffff:0:0/96 100
I solved my problem using this procedure.