timche / gmail-desktop

:postbox: Nifty Gmail desktop app for macOS, Linux & Windows
MIT License
832 stars 91 forks source link

Requests at launch #214

Closed muuuh closed 3 years ago

muuuh commented 3 years ago

Hello,

I'm using the v2.20.2 of https://github.com/timche/gmail-desktop/releases I have disabled the menu item Settings/Auto Update and restarted the app.

I still had to block requests with LittleSnitch to

The menu item Settings/Advanced/Debug Mode (after restart) reveals the menu item Help/View Logs. The file log.log contains the entry

[2020-11-02 10:21:47.654] [error] Error: Error: net::ERR_ADDRESS_UNREACHABLE at SimpleURLLoaderWrapper. (electron/js2c/browser_init.js:93:6395) at SimpleURLLoaderWrapper.emit (events.js:223:5)

I haven't found these in the code https://github.com/timche/gmail-desktop.

Is there a way to disable these connections?

Thank you and best regards,

timche commented 3 years ago

I assume these calls are made by this line: https://github.com/timche/gmail-desktop/blob/master/src/app.ts#L249 which is making a request to https://www.whatismybrowser.com.

I understand your privacy concern and we could make this configurable.

muuuh commented 3 years ago

Hi, thank you for your answer. I suppose this is the correct line.

With the newest version there seem to be much more connection tries, like the ip-addresses of resolver1.opendns.com, resolver2.opendns.com, ...

Could you please make a change to make this configurable (although I don't understand why these requests are necessary at all)?

Thank you and best regards,

timche commented 3 years ago

It's required to fix the User Agent issue: https://github.com/timche/gmail-desktop#i-cant-sign-in-this-browser-or-app-may-not-be-secure

timche commented 3 years ago

Normally the call is only made when this setting is true. When the app is trying to fix the User Agent, it will automatically set it to false after it has finished. Please check your config and set it to false to disable it.

muuuh commented 3 years ago

Hmm, I cannot confirm this. I have the following settings: { "autoUpdate": false, "lastWindowState": { "bounds": { "x": 397, "y": 218, "width": 1096, "height": 603 }, "fullscreen": false, "maximized": false }, "compactHeader": true, "hideFooter": true, "hideSupport": true, "debugMode": false, "launchMinimized": false, "autoHideMenuBar": false, "enableTrayIcon": false, "autoFixUserAgent": false, "trustedHosts": [], "confirmExternalLinks": false, "hardwareAcceleration": true, "hideRightSidebar": true }

timche commented 3 years ago

I've reworked the custom user agent logic, so there's no request made to whatismybrowser.com anymore, instead it reads it from a JSON file that's shipped with the app: 24fdf5aa2d95627f2268305543c432d6ef5f06e9

Hope resolves your problem.

muuuh commented 3 years ago

Hi, thank you for your efforts. I'm sorry, but I cannot confirm that this changed the behavior. The client (release 2.24.0) still continuously tries to make the above connections. I have removed "~/Library/Application Support/Gmail Desktop" in attempt to try to minimize errors (mismatching config) on my side.

Perhaps it's a different function as the requests go to icanhazip.com, etc. and not to whatismybrowser.com.

I also have a problem to get an updated log file as the file "~/Library/Logs/Gmail Desktop" does not get updated (Debug Mode doesn't seem to do much currently).

Thank you and best regards,

timche commented 3 years ago

The only request that is being made in the app is https://mail.google.com. Can you please check if this the same requests are made when you open https://mail.google.com in your browser?

muuuh commented 3 years ago

I think it is https://github.com/sindresorhus/is-online

timche commented 3 years ago

Thanks. I'll take a look at what can be done.

timche commented 3 years ago

Fixed in https://github.com/timche/gmail-desktop/releases/tag/v2.24.1

muuuh commented 3 years ago

Thank you! It's working.