ignotifier icon indicating copy to clipboard operation
ignotifier copied to clipboard

Can't delete email from secondary gmail account

Open skmaeda opened this issue 5 months ago • 25 comments

The extension works perfectly for my primary gmail account. But when a mail arrives to my secondary account, then I can't do anything from gmail notifier. If I click delete or mark as read or anything nothing happens.

skmaeda avatar Jul 28 '25 21:07 skmaeda

Is this on Chrome? The second account is "@gmail"?

inbasic avatar Jul 29 '25 06:07 inbasic

Is this on Chrome? The second account is "@gmail"?

I'm on firefox. And yes, all my email accounts are on gmail.

skmaeda avatar Jul 29 '25 06:07 skmaeda

Open "about:debugging#/runtime/this-firefox" in a browser tab, then use "Inspect" button to check logs while deleting on the second account. Maybe we can find the issue there. You should have a gmail.action command with the URL of the message to be deleted.

inbasic avatar Jul 29 '25 08:07 inbasic

This is what I see when I open the notifier popup:

[offscreen iframe] request Object { cmd: "gmail.search", request: {…} } index.js:52:13 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data search moz-extension://c3369518-7075-4bbd-983c-7eef7fa1986b/core/offscreen/gmail/core.js:122 async* moz-extension://c3369518-7075-4bbd-983c-7eef7fa1986b/core/offscreen/index.js:84 index.js:85:17 [offscreen iframe] exit request 0 index.js:6:11 Object { message: "JSON.parse: unexpected character at line 1 column 1 of the JSON data" } worker.js:127:17 undefined labels.js:52:15 [repeater] Reason: "webrequest" Type: "now" Delay: 1.00s log.js:29:11 update is rejected; duplicated labels.js:73:17 [repeater] Reason: "alarm.fired" Type: "fired" Delay: 120.00s log.js:29:11 [feed] forced false objects Array(3) [ {…}, {…}, {…} ]

This is when i click on delete email: [offscreen iframe] request Object { cmd: "gmail.action", request: {…} } index.js:52:13 [offscreen iframe] exit request 0 index.js:6:11 [repeater] Reason: "popup.action" Type: "now" Delay: 0.50s log.js:29:11 [repeater] ignored 1 log.js:29:11 [repeater] ignored 501 log.js:29:11 [repeater] Reason: "alarm.fired" Type: "fired" Delay: 120.00s log.js:29:11 [feed] forced false objects Array(3) [ {…}, {…}, {…} ]

This is what I see in the gmail.action

Object { cmd: "gmail.action", request: {…} } ​cmd: "gmail.action" ​id: "gmail.action;0.6195583521981839" ​request: Object { method: "gmail.action", cmd: "tr", links: "https://mail.google.com/mail/u/[email protected]&message_id=198546439e516900&view=conv&extsrc=atom", … } ​: Object { … }

skmaeda avatar Jul 29 '25 09:07 skmaeda

Can I give you some more infos?

skmaeda avatar Jul 30 '25 07:07 skmaeda

The /u/2/ is wrong and belongs to the third account! Go to the options page and set label inbox for the first two accounts and see if the log report changes from

links: "...u/2..."

to

links: "...u/1..."

inbasic avatar Jul 30 '25 08:07 inbasic

Also please see what script this is from:

index.js:52:13 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

inbasic avatar Jul 30 '25 08:07 inbasic

I'm sorry, it's correct. It is my third account :(

skmaeda avatar Jul 30 '25 08:07 skmaeda

does the extension work for the second account?

inbasic avatar Jul 30 '25 09:07 inbasic

yes, the second account works

skmaeda avatar Jul 30 '25 09:07 skmaeda

Also please see what script this is from:

index.js:52:13 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

The row is changed, I don't know why. Now it says:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data search moz-extension://c3369518-7075-4bbd-983c-7eef7fa1986b/core/offscreen/gmail/core.js:122 async* moz-extension://c3369518-7075-4bbd-983c-7eef7fa1986b/core/offscreen/index.js:84 index.js:85:17 moz-extension://c3369518-7075-4bbd-983c-7eef7fa1986b/core/offscreen/index.js:85 (Asinc.: promise callback) moz-extension://c3369518-7075-4bbd-983c-7eef7fa1986b/core/offscreen/index.js:84

It's the gmail.search command

else if (request.cmd === 'gmail.search') { gmail.search(request.request).then(response).catch(e => { console.error(e); response({ message: e.message });

skmaeda avatar Jul 30 '25 09:07 skmaeda

To determine whether the issue is related to the account or the orders, please log out of all accounts and try logging in again in a different order.

inbasic avatar Jul 30 '25 09:07 inbasic

Ok, I exchanged the order for second and third email. Not it's the second account that doesn't work. The one that didn't work even before when it was third. Can you tell me which gmail settings do I have to check?

skmaeda avatar Jul 30 '25 09:07 skmaeda

Maybe this can help. I debugged the js scripts and checked the response from gmail.

screenshot

skmaeda avatar Jul 30 '25 10:07 skmaeda

It looks fine to me! Do you have the "conversion view off" for this account?

inbasic avatar Jul 30 '25 11:07 inbasic

It looks fine to me! Do you have the "conversion view off" for this account?

It's activated on all my email accounts. I tried to turn it off but I have the same problem.

skmaeda avatar Jul 30 '25 11:07 skmaeda

About my screenshot, is it normal that gmail answer with that content? <scr "https://mail.google.com/mail/u/1/spreauth"

Seems like it's a weird response to me...

skmaeda avatar Jul 30 '25 11:07 skmaeda

Open the following basic views and see if you need to login again or not:

https://mail.google.com/mail/u/0/h/ https://mail.google.com/mail/u/1/h/ https://mail.google.com/mail/u/2/h/

inbasic avatar Jul 30 '25 12:07 inbasic

I tried to turn it off but I have the same problem.

The notifier does not work correctly if it is off.

inbasic avatar Jul 30 '25 12:07 inbasic

I have the same problem with the chrome extension. So it's definitely my account's problem. But I don't know what to look for...

skmaeda avatar Jul 30 '25 12:07 skmaeda

Debugging this issue can be challenging. As a suggestion, try marking a thread as 'read' from the main Gmail UI and then undo it. Next, perform the same action through the extension. Capture both POST requests in DevTools and compare them to identify any missing parameters.

inbasic avatar Jul 31 '25 06:07 inbasic

I tried but the call that is made by gmail itself and the notifier are totally different. You're request is a GET, gmail is doing a POST with a complex payload. I really don't get it.

skmaeda avatar Jul 31 '25 10:07 skmaeda

The extension performs POST request. See

https://github.com/inbasic/ignotifier/blob/master/v3.classic/core/offscreen/gmail/core.js#L222

Install the extension in the developer mode on Chrome. Then increase the hard-coded timeout to exit the offscreen document https://github.com/inbasic/ignotifier/blob/master/v3.classic/core/offscreen/index.js#L13

Now perform a "mark as read" in both Gmail interface and the extension and compare the POST requests.

inbasic avatar Aug 02 '25 06:08 inbasic

I have exactly the same problem. Only two of my accounts will allow me to delete emails from the notifier.

flybd5 avatar Sep 07 '25 16:09 flybd5

@flybd5 do you get any error? What is shown in the background log tab

Also on the background terminal try the following to see if the extension has access to the GMAIL_AT for the secondary account

chrome.cookies.get({name: 'GMAIL_AT', url: 'https://mail.google.com/mail/u/1'}, o => {
  console.log(o);
});

Note that /mail/u/1 must be equal to the Gmail index for the account that is not working

inbasic avatar Sep 08 '25 05:09 inbasic