Can chrome extensions access other extensions' background pages? - google-chrome

I'm trying to build a Chrome extension A that makes use of network requests -- however, the network requests that are relevant to me are made through a separate extension B. Meaning, the network requests aren't viewable on the main 'inspect element' panel but only through inspecting extension B's background page in developer mode.
Is there any known way to access this information through extension A?
Thanks.

Related

Chrome extension network activity not showing up

I'm trying to identify API calls that a chrome extension is doing, but I am not seeing those in the network tab of Chrome (inspect->network).
Is there a way to mask those out from there? Should I use a different tool to identify the network activity?
I guess you must be using DevTools for Chrome to debug you extension. In that case you can't see the network activities of your extension.
In order to debug you extension, you should use the DevTools for Extension:
Right click the extension icon, and you will see Inspect the popup, click that and select Network tab and you are done.
Like this(pay attention to the title of this):
For more infomation, you can see Debugging of the chrome-extension tutorial. Hope this helps.

Requests made by Chrome Extensions

How do I see the requests made by the extensions running in Chrome in the background on a particular website?
You can monitor all HTTP traffic on you PC with Fiddler.
You can do that for extensions you are developing by looking at your extension / app background page (right click on the extension -> manage extensions -> inspect views under your extension).
Then open the debug panel (Ctrl+Shift+J) when looking at the background page of your extension (only debug extensions), you'll be able to see the network traffic for it.

How do you get WebGL Inspector to show up in Chrome?

In Chrome, I have the WebGL Inspector extension installed. The debug option does not show up in the address bar for the page I'm working on (that I'm using WebGL in). It shows up for other pages on the web. What are the requirements for getting it to give me the debug option?
I guess that you are trying to debug a local file (file://). If so, navigate to chrome://settings/extensions, expand the WebGL Inspector item and check "Allow access to file URLs".
Note: (outdated?) "readme.md" says:
You cannot inspect pages on file:// in WebKit (possible with security settings?)
You can also install a web server on your local PC to dispatch your page from a http:// url.

How does Chrome Dev Tools console Access the resources of the website?

Early on I was doing some debugging and testing using the chrome dev tools(known as inspect element). I found out that on the Resources column of the dev tool, Chrome can always access the resources from the server and display them(links, videos, images....). Just wonder how Chrome does that. Is there any way to write a piece of code doing the same thing(access the server resources of other websites, not modifying them but displaying, stuff like, the link of the video currently playing on the website, which usually does not pop up until the play button is hit)?
DevTools doesn't fetch resources from a site. It fetches them from the browser.
There were similar questions already
How does webkit/chrome's WebInspector Resources Inspection work?
and
Getting Information from Google Chrome's Developer Tools
The Chrome Developer Tools has two parts frontend (html+javascript) and backend (C++) and there is an API which specifies the protocol between these parts. You can see the specification here. You can use it for writing your own app instead of standard DevTools frontend.
Also there is experimental debugging API for chrome extensions.
I think the Webkit WebInspector go over the hole source code and match all resources of the source.
So it match <link href="something.css"> and then it place something.css in the resource panel under stylesheets. And exactly the same thing for the other tags.
It's not hard to make regexes for this.

How can you tell exactly what insecure items are causing a browser to warn about mixed secure and insecure items?

In Firefox, I view my site and get no warnings about insecure mixed content.
Using FireBug, I can see that every request is https.
In Chrome, I get the https crossed out in the address bar.
I viewed source in Chrome and then ran this regex /http(?!s)/ but the only things it found were the href attributes for some external links and the doc type and http-equiv meta tags.
Using Chrome's Resource Tracking revealed all requests were https too.
This includes Google Analytics, jQuery from Google's CDN and Facebook like scripts.
Is there any specific tool I can use to show non https requests, or anything further I can try?
I found that I get the "mixed content"-warning in Chrome even when there is no mixed content, if sometime during the session mixed content was already encountered on the domain.
(Also mentioned here: Why is Chrome reporting a secure / non secure warning when no other browsers aren't?)
In Chrome's Developer Tools, the Console tab shows the resources that it won't load because they unsecure.
You can add the "scheme" column to the Chrome developer tools network tab to show which requests were sent over http or https:
Press F12 to show the developer tools
Switch to the Network tab
Right click in the column headers and select "Scheme"
Reload the page to show which elements are loaded over http or https
In situations like this where it's helpful to see exactly which protocol is being used to load resources, I would recommend Fiddler2 as a browser-agnostic solution that can show you exactly what traffic is occurring on each request.
From the site:
Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.
Edit: In-browser debugging tools are becoming really good so this third-party tool may not be as useful as it was when this answer was first written.
Open up the Web Inspector and find the yellow triangle (warning) in the top right. Click on it and it will display all security issues.
In 48-th version of chrome they added a security panel. Using it you can quickly identify the mixed content resources:
Do you have the HttpFox plugin for FireFox? That'd work, I think.
Among other things, it reports on the URL, Method, Result Code, and bytes of all the assets that a web page requests. It's what I've used to trap the occasional non-HTTPS graphic, etc. I'm sure the other suggested tools would do the same...
You can use SslCheck
It's a free online tool that crawls a website recursively (following all internal links) and scans for nonsecure includes - images, scripts and CSS.
(disclaimer: I'm one of the developers)
I know this post is old, but I ran across it and had the same issue. I clicked on the Chrome menu (top right corner), scrolled down to Tools> and selected Developer Tools. Clicked on the Console tab and it told me exactly what the problem was... the favicon was served over http, not https, but of course it was not in the page source code. Corrected the problem in my CMS, which loads the favicon without code in the page... and no more error!
Note that 'mixed content' and 'mixed scripting' are detected seperatly. Check this site for the meaning of the icons in Chrome: https://support.google.com/chromebook/answer/95617?p=ui_security_indicator&rd=1 (click 'see details' link).
Grey icon = mixed content, red icon = mixed scripting.