inbasic / ignotifier

Multiple account Gmail notifier (without storing passwords)
https://webextension.org/listing/gmail-notifier.html
Other
389 stars 116 forks source link

Archive/delete buttons no longer work and display a notification instead #624

Closed NxDs closed 9 months ago

NxDs commented 9 months ago

Version 1.1.2 Pressing archive or delete triggers the notification in the screenshot and doesn't actually delete or archive image

inbasic commented 9 months ago

It seems the notifier cannot find the "GMAIL_AT" cookie for your case. Open Gmail in a browser tab, right-click on the page, and press "Inspect". Go to the console tab, type "document.cookie" and press Enter. See if the cookie string contains the "GMAIL_AT" string or not.

NxDs commented 9 months ago

GMAIL_AT is there, the problem does not seem to be consistent because since when I opened the issue it started working, then stopped then started working again

inbasic commented 9 months ago

So most likely the background worker is crashing. Can you try on a clean profile? https://support.google.com/chrome/answer/2364824

NxDs commented 9 months ago

I'll try and comment if it happens again

4576ggv4536 commented 9 months ago

Hi. I have the same, it will not mark as read on a new clean profile or old. It works if I have a gmail page open. But then I can just mark the mails anyway.

inbasic commented 9 months ago

@4576ggv4536 do you get the "core.js -> at" error? What is your OS?

4576ggv4536 commented 9 months ago

Yes I get the core.js popup. I'm on ubuntu 20.04, Chrome 119.0.6045.159

inbasic commented 9 months ago

Let's debug:

Open "chrome://extensions/" and turn on the developer mode. Find the extension, and click on the "Inspect -> Service Worker" Paste the following in the console tab and see if you get the "GAMIL_AT" when you have no open Gmail tab

await chrome.cookies.get({name: 'GMAIL_AT', url: 'https://mail.google.com/mail/u/0'})

Do not share the output, you just need to get an object with {value: '....'}

4576ggv4536 commented 9 months ago

I get null.

inbasic commented 9 months ago

do you get an object when Gmail page is open?

4576ggv4536 commented 9 months ago

I get a value like this: value : "HHbupN76W852Ds6TZFd8fnPpl-n0rjfQ" Not real value I pasted

4576ggv4536 commented 9 months ago

I can add that it is the same issue on a Debian 12 and fresh install of chrome, and no other extensions.

inbasic commented 9 months ago

What is the address you get when Gmail is open? try with that adress too when page is closed

await chrome.cookies.get({name: 'GMAIL_AT', url: 'https://mail.google.com/mail/u/0/#inbox'})
4576ggv4536 commented 9 months ago

I just open Chrome and have only default startpage I get

Uncaught TypeError: Cannot read properties of undefined (reading 'get') at :1:22 (anonymous) @ VM20:1


If I have an gmail tab open I get

{domain: 'mail.google.com', hostOnly: true, httpOnly: false, name: 'GMAIL_AT', path: '/mail/u/0', …} domain : "mail.google.com" hostOnly : true httpOnly : false name : "GMAIL_AT" path : "/mail/u/0" sameSite : "unspecified" secure : true session : true storeId : "0"

inbasic commented 9 months ago

Uncaught TypeError: Cannot read properties of undefined (reading 'get')

Did you run the code inside the extension's "service worker"? It looks like the "chrome.cookie" is undefined!

Also, you can try the latest dev edition, which has a backup plan if the cookie is not available. Please give it a try and report back

download the project; https://github.com/inbasic/ignotifier/archive/refs/heads/master.zip extract it and drop the "v3.classic" to the chrome://extensions/ window

4576ggv4536 commented 9 months ago

Yes I did run it in service worker window.

This output is from the new version on the extension. And it's working, so far. I disabled the 1.1.2 and only have the 1.1.3 active


{domain: 'mail.google.com', hostOnly: true, httpOnly: false, name: 'GMAIL_AT', path: '/mail/u/0', …} domain : "mail.google.com" hostOnly : true httpOnly : false name : "GMAIL_AT" path : "/mail/u/0" sameSite : "unspecified" secure : true session : true storeId : "0" value : "h4r567-FAKEe6r6_h7brhudt"


4576ggv4536 commented 9 months ago

Tesed on other computer new chrome profile, only the 1.1.3 version installed all working

inbasic commented 9 months ago

1.1.3 is released; https://chromewebstore.google.com/detail/notifier-for-gmail/dcjichoefijpinlfnjghokpkojhlhkgl