"Service Worker termination ... " seems to lead to "Should not happen: ThreadRowViewDriver never became ready"

223 views
Skip to first unread message

Brian Rhea

unread,
Nov 22, 2016, 9:59:55 AM11/22/16
to InboxSDK
Good morning, Group,

I'm building an extension that will hit our Search API and add results from our service in to the user's Gmail search results when they're on a `NativeRouteIDs.INBOX` route.

But, I've been running in to a pretty consistent error. I can't completely nail it down because I can simply refresh the Gmail search results page over and over; 75% of the time it fails, but the other 25% it works fine.

When it fails, the first error to appear is:
Service Worker termination by a timeout timer was canceled because DevTools is attached.

And then:
DevTools failed to parse SourceMap: https://www.inboxsdk.com/build/platform-implementation.js.map

And then for every row in the results page:
Should not happen: ThreadRowViewDriver never became ready

See attachment as well.

Any thoughts? Thanks in advance!
Screen Shot 2016-11-22 at 7.58.14 AM.png

Brian Rhea

unread,
Nov 22, 2016, 10:24:59 AM11/22/16
to InboxSDK
And for what it's worth, I can disable my extension and observe this same behavior when I enable Dropbox for Gmail 1.1.3 and Streak CRM for Gmail 6.24

Brian Rhea

unread,
Nov 23, 2016, 10:05:11 AM11/23/16
to InboxSDK
I'm still trying to run this down. What I've been able to observe is that for one of my Gmail accounts, this never happens, but for my primary account it does.

The issue seems to arise from the fact that some tr.zA.zE.zB.inboxsdk__thread_row rows do not get assigned a data-inboxsdk-threadid attribute.

I've changed the settings in my primary Gmail account to match the account that works, but haven't been able to narrow it down to a simple, "Turn off X settting and it goes away" scenario.

Still very confused, but doing my best to find the underlying problem here and offer a resolution. Any directional guidance is appreciated.

Chris Cowan

unread,
Nov 23, 2016, 2:47:54 PM11/23/16
to InboxSDK
>Service Worker termination by a timeout timer was canceled because DevTools is attached.

This error is one of Google's own errors.
If you re-download inboxsdk.js from our site, then this message will no longer be present. The file has had some non-critical updates.

>Should not happen: ThreadRowViewDriver never became ready

This is a known issue that we haven't solved all of the causes of. The SDK needs to find the thread ids of thread rows for certain APIs to work. The SDK uses multiple methods to do this, but there are some cases that it still has issues with. If you can figure out the set of conditions needed to reproduce this, then that would be helpful. (Some likely relevant variables: which list page it is, whether multiple inbox or priority inbox settings are used, whether the row is a thread, draft, or thread with some drafts, and whether the row's thread or draft is currently open in a compose view or another tab.)

Brian Rhea

unread,
Nov 23, 2016, 5:23:58 PM11/23/16
to InboxSDK
Will do, Chris!

Am I on the right track that those try...catch statements I see inside of getThreadIdForThreadRow() are the multiple methods you're referring to?

I'll do my best to find the commonality among the failing rows between my two accounts.

Thanks!

Chris Cowan

unread,
Nov 23, 2016, 8:46:38 PM11/23/16
to InboxSDK
The try-catch statements happen to be part of how Babel compiles for-of loops. The different methods are referred to from that function though. We use some javascript injected into Gmail's context that inspects Gmail's page data and ajax calls and responses and locally records a mapping of thread row data to thread ids, but this isn't perfect because ajax calls may have been made between the time that the page loaded and when the InboxSDK loaded. We fall back to simulating ctrl-clicks on thread rows and, mocking out `window.open` temporarily, and looking at the URL gmail tried to open, but this fails in some cases such as when the row is for a draft which is currently open. We also compare the thread row to all currently open drafts to see if it matches up with any of them. Each of the strategies has different blind spots. There's just still some cases that fall into the overlap it seems.
Message has been deleted
Message has been deleted

Anuj Godase

unread,
Mar 16, 2017, 4:40:38 AM3/16/17
to InboxSDK
hello,
I am learning chrome extension development and i am learning to render buttons on pages.
My extension works fine for pages other than gmail(mail.google.com and not inbox). gmail page is loaded consoles shows following note and expected behaviour doesnt happen.

Service Worker termination by a timeout timer was canceled because DevTools is attached

Can you please tell if there is any work around to make my scripts work?

Chris Cowan

unread,
Mar 16, 2017, 1:55:51 PM3/16/17
to InboxSDK
The "Service Worker termination by a timeout timer was canceled because DevTools is attached." message is expected in Inbox (it's not caused by us) and is harmless.
If you're having trouble with using the InboxSDK, I'd recommend you post more information in a new topic here.
Reply all
Reply to author
Forward
0 new messages