KartikTalwar / gmail.js

Gmail JavaScript API
MIT License
3.74k stars 456 forks source link

Gmail chat issues when Chrome extension is on #745

Open MattIrineu opened 1 year ago

MattIrineu commented 1 year ago

I have a Chrome extension that uses the Gmail-js with email ID to work.

Does the Gmail chat use the same ID as an email? are they treated the same by the API? I've been getting some errors with it, my extension has nothing to do with the chat portion of gmail (no API calls for chat), just wondering if the "The FetchEvent for "" resulted in a network error response: the promise was rejected." had anything to do with it. I got a report from a user that they can't use the chat with the extension on

Thank you!

josteink commented 1 year ago

I have no idea or knowledge about Google chat.

Gmail.js does intercept all ZHR invocations between the browser (GMail) and any server it contacts, so while I don't know speciically how it should interfere with chat, I cannot exclude the possibility that it is Gmail.js interfering.

These are the relevant lines in gmail.js:

https://github.com/KartikTalwar/gmail.js/blob/edd1beeacf9faa9f82af7929706e95d0cd83e463/src/gmail.js#L2095-L2197

You can debug yourself to see if/what bad things happen when XHR is targetting Google chat services.

With some concrete findings, we may be able to:

  1. determine that it is Gmail.js' fault and
  2. find a way to resolve the issue.

Let me know what you find :smiley: