nylas-mail-lives / nylas-mail

:love_letter: An extensible desktop mail app built on the modern web.
MIT License
474 stars 63 forks source link

"Nylas Mail is offline" error despite being connected #169

Closed l2dy closed 6 years ago

l2dy commented 6 years ago

Fresh install of nylas-mail-2.2.2.dmg.

The offline notification won't go away even though emails were successfully retrieved (via IMAP, custom provider):

offline

@seesemichaelj edit: The below is a duplicate of #159 and is not to be considered as part of the issue. I'm keeping it for historical purposes and when I attempt to snooze an email:

screen shot

l2dy commented 6 years ago

The offline notification seems to be caused by using IPv6-only networks. After switching to an IPv4-capable network, it disappeared. The snooze bug however persisted.

mikeseese commented 6 years ago

First, thanks for providing feedback/bug reports! It's difficult for us to test everything so it's awesome that the community is actively running the app and producing bug reports.

Second, please write an issue per bug so that we can stay organized; I can understand if you thought these two issues may be related and I'll give you the benefit of the doubt :+1:. Given your last comment, I'm fairly certain they're separate issues.

In fact a quick search provides your snooze issue is known and being discussed: #159

I have modified this issue to reflect the above. I'm guessing we're pinging some IPv4 address to see if we have network access; probably a super simple fix!

l2dy commented 6 years ago

Yes, I indeed thought they were related. Thanks for pointing out #159 and modifying this issue, I tried to search for feature_usage but didn't find an existing issue. If the error message was included as text in that issue I would have found it and wouldn't report a duplicate bug.

mikeseese commented 6 years ago

fair enough! fixed the title/description of #159 to be easily discoverable :beers:

dweremeichik commented 6 years ago

It looks like we use the is-online npm module in the following file: https://github.com/nylas-mail-lives/nylas-mail/blob/18545f3add6cefe2af36ae80f5dd427bb1752ad2/packages/client-app/src/flux/stores/online-status-store.es6#L1 this is what is responsible for determining if the app is online.

mikeseese commented 6 years ago

looks like there is an option for ipv6: https://github.com/sindresorhus/is-online

dweremeichik commented 6 years ago

Yup, defaults to ipv4, which is the problem.

dweremeichik commented 6 years ago

I am now confused, according to this closed issue, it should fall back automatically. https://github.com/sindresorhus/is-online/issues/15

l2dy commented 6 years ago

browser.js in is-online uses public-ip which doesn't fall back.

mikeseese commented 6 years ago

of course, ben was here already: image

he is everywhere!

mikeseese commented 6 years ago

did some digging on https://github.com/sindresorhus/is-online/issues/15 and it looks like it doesn't fallback, but rather just provide the option of using IPv6, at the devs discrepancy. we'll see if they're willing for a PR/update on their end, otherwise we'll just do a fix on our end to do IPv6 if IPv4 fails

l2dy commented 6 years ago

In some corporate or public WiFi networks, DNS traffic to external servers could be blocked. Since this offline notification is rather prominent and keeps retrying, can we add an option to disable this check?