Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to execute 'json' on 'Response'" error in console on message send #5886

Closed
sosnovsky opened this issue Dec 23, 2024 · 7 comments · Fixed by #5892
Closed

"Failed to execute 'json' on 'Response'" error in console on message send #5886

sosnovsky opened this issue Dec 23, 2024 · 7 comments · Fixed by #5892
Assignees
Milestone

Comments

@sosnovsky
Copy link
Collaborator

sosnovsky commented Dec 23, 2024

I noticed such error in console which sometimes occurs when sending encrypted message:

Failed to execute 'json' on 'Response': Unexpected end of JSON input

SyntaxError: Unexpected end of JSON input
at Api.ajax (chrome-extension://EXTENSION_ID/js/common/api/shared/api.js:223:73)
at async performAjaxRequest (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/js/common/api/authentication/google/google-oauth.js:93:33)
at async GoogleOAuth.apiGoogleCallRetryAuthErrorOneTime (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/js/common/api/authentication/google/google-oauth.js:101:24)
at async Google.gmailCall (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/js/common/api/email-provider/gmail/google.js:38:20)
at async Gmail.draftDelete (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/js/common/api/email-provider/gmail/gmail.js:90:20)
at async ComposeDraftModule.draftDelete (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/chrome/elements/compose-modules/compose-draft-module.js:109:25)
at async Promise.all (index 0)
at async ComposeSendBtnModule.doSendMsgs (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/chrome/elements/compose-modules/compose-send-btn-module.js:292:17)
at async ComposeSendBtnModule.extractProcessSendMsg (chrome-extension://bnjglocicdkmhmoohhfkfkbbkejdhdgc/chrome/elements/compose-modules/compose-send-btn-module.js:95:32)
at <async> ajax (/extension/js/common/api/shared/api.ts:98:4)
at <async> performAjaxRequest (/extension/js/common/api/authentication/google/google-oauth.ts:88:31)
at <async> apiGoogleCallRetryAuthErrorOneTime (/extension/js/common/api/authentication/google/google-oauth.ts:85:4)
at <async> gmailCall (/extension/js/common/api/email-provider/gmail/google.ts:19:28)
at <async> draftDelete (/extension/js/common/api/email-provider/gmail/gmail.ts:81:23)
@sosnovsky sosnovsky added this to the 8.5.9 milestone Dec 23, 2024
@sosnovsky sosnovsky changed the title "Failed to execute 'json' on 'Response'" error on message send "Failed to execute 'json' on 'Response'" error in console on message send Dec 23, 2024
@sosnovsky
Copy link
Collaborator Author

Hi @ioanmo226, can you please work on this one after finishing #5887, thanks!

@ioanmo226
Copy link
Collaborator

Okay

@ioanmo226
Copy link
Collaborator

Hmm... Can't reproduce issue. Digging more now

@ioanmo226
Copy link
Collaborator

@sosnovsky Could you tell me how often this error occurs?
Also if possible could you share reproduce steps?

@sosnovsky
Copy link
Collaborator Author

Just tried to send 2 test encrypted messages from master build and error occurred each time:

Screenshot 2024-12-30 at 15 09 30

Steps to reproduce:

  • open gmail
  • compose new encrypted message
  • send it (message sent successfully)
  • check console log

So nothing specific, it's strange that it doesn't happen for you.
Also tried with my personal email account and with flowcrypt.compatibility - occurs for both.

@ioanmo226
Copy link
Collaborator

Ohhh, Yep.
I thought original error was sending failed because of that error.
I tried to send message and it was succeed so I didn't check console.

Now I noticed that current issue is not message send failure but console.log error.
Sorry for confusion.

@sosnovsky
Copy link
Collaborator Author

Oh, I should mentioned in description that sending works well, it's notable only in console, so it's not so critical as failing message sending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants