SafetyCulture / grpc-web-devtools

Chrome & Firefox Browser extension to aid gRPC-Web development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

window.__GRPCWEB_DEVTOOLS__ undefined from time to time

jackielii opened this issue · comments

This could be just me, but I found occasionally the window.__GRPCWEB_DEVTOOLS__ is undefined from time to time. I can't consistently reproduce it. Could it be my other plugins?

Attaching a screencast
grpc-web-extension-bug

The way devtools communicates with the current window is very brittle, and can easily loose connection; content script injection is not straight forward and I've not found a successful way to re-connect (other than just refreshing the browser window).

If this is causing more people issues, I'll take another look to see if we can improve this.

@rogchap today I looked a bit closer, the inject.js is executed, but always after the main.js, I can reproduce it consistently.

Sorry I think my original description is a bit miss leading. Somehow the AdBlock extension made the content to load after the inject.js is executed...

Thanks for looking into this @jackielii
I’ll take a look and see what we can do to fix.

Thanks @rogchap , I've already submitted a pull request #41 . The method is used in redux-devtools-extension as well