Context: I'm trying to debug a website using https://www.npmjs.org/package/webkit-devtools-agent , which uses the Chrome debugger. Furthermore, I want to embed the debug page in an <iframe>, so that I can write client-side javascript to parse the output in ways not officially available. To get round the same-origin restriction on the iframe, I plan to use fiddler to trick the browser into thinking everything is from the same domain.
When I open the page I get an error saying: "Detached from the target. Remote debugging has been terminated with reason: websocket_closed. Please re-attach to the new target."
This happens if the "Capture Traffic" option is selected in Fiddler, even if I just access the debug page directly with no aliasing and without actually using Fiddler.
After it fails, the websocket is broken and I have to restart the webkit-devtools-agent service.
I'm using Fiddler v2.4.9.4 and Chrome v37.0.2062.120m.
Mystery solved: It turns out my proxy settings in Fiddler were out of date (Tools -> Fiddler Options -> Gateway).
Related
This question is related to my other question - How to open a chrome trace file with ui.perfetto.dev non interactively?
I am attempting to open the trace events by navigating to the following url:
https://www.ui.perfetto.dev/#!/viewer?url=file://127.0.0.1/c:/Temp/events.json
However the document's Content Security Policy fails the call to fetch(url):
Refused to connect to 'file://127.0.0.1/C:/Temp/events.json' because it violates the document's Content Security Policy.
So, I would like to open a chrome window with disabled CSP. Ideally this window would not be used for anything else, but if it is not possible to enforce it, I am fine with it being a security hole if reused for other purposes. I can live with that.
I tried running chrome like this:
& $ChromeExe "https://www.ui.perfetto.dev/#!/viewer?url=file://127.0.0.1/c:/Temp/events.json" --disable-web-security --user-data-dir=c:\Temp\events
To no avail. The same document's CSP violation error message appears in the output. I do not think --disable-web-security is relevant for CSP at all, according to https://peter.sh/experiments/chromium-command-line-switches/ it has to do with CORS rather than CSP.
How can this be done?
Unfortunately (or actually, fortunately) a browser cannot open file:// URLs (if it could, it would be a nightmare for web security).
In order to achieve what you want, spawn a local HTTP server and use the ?url= argument (see my reply to How to open a chrome trace file with ui.perfetto.dev non interactively?)
I know how to do this with Fiddler (define rules and etc.) but my problem is that Fiddler crashes usually, is there any other stable method?
I use Fiddler for this all the time quite successfully.
Chrome's F12 dev tools let you edit the JS source but it's not used when you refresh the page.
The issue you face is addressed here. Looks like you need a local webserver (like mongoose) and the Redirect plugin for Chrome.
I'm using Windows 10 Technical preview. I know it's not yet tweeked out to full usage, but here is my problem.
On local IIS I'm developing my web app. It loads most of the data via ASP.NET MVC API. After the upgrade to Windows 10 I started to get
net::ERR_SPDY_PROTOCOL_ERROR
for all AJAX calls to API. The HTML page loads normally, but the dynamic loading of data content fails. I managed to figure it out by starting Chrome with parameters
--use-spdy=off --use-system-ssl
Strange thing is that on the first start I always get this error and have to restart Chrome. Other browsers fail too, but not with specific error. For the transfer there is used HTTP2.0 protocol, which is based on SPDY protocol.
Do I have to turn something off in IIS?
Edit:
Seems like an IIS problem with HTTP2.0. When trying to enter the site from Windows 8.1 I get the same error.
Most people’s reaction to this error would be to reload the web page. We would actually recommend this as a first response. Sometimes this even does work.
Interesting Factoid: SPDY actually stands for “speedy” and is used to reduce a web pages’ load time
If reloading the web pages does not remove the error, then you should close down Google Chrome and restart it. This alone will not really solve the problem because you will need to clear the cache as soon as you restart the browser.
or in cmd clear dns using this command ipconfig/flushdns
I want to use this button on my page but when I use chrome script appears to create a new circle, the same happens in firefox and safari explorer only works on analyzing with the console I get this error
Failed to load resource: the server responded with a status of 400 (Bad Request) /+1/fastbutton?bsv&annotation=inline&width=300&hl=en-US&origin=file%3A%2F%2F&url=file%3A%2F%2F%2FC%3A%2FUsers%2Fusuario%2FDesktop%2Fnoche.html&jsh=m%3B%2F%2Fapps-static%2F_%2Fjs%2Fgapi%2F_features_%2Frt%3Dj%2Fver%3DlgJnpFHo_sE.es.%2Fsv%3D1%2Fam%3D!9YrXPIrxx2-ITyEIjA%2Fd%3D1%2Frs%3DAItRSTMUGsaYaMyYb_qFDQo8MG8RKB82aQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Conload&id=I1_1352910400423&parent=file%3A%2F%2F">https://plusone.google.com//+1/fastbutton?bsv&annotation=inline&width=300&hl=en-US&origin=file%3A%2F%2F&url=file%3A%2F%2F%2FC%3A%2FUsers%2Fusuario%2FDesktop%2Fnoche.html&jsh=m%3B%2F%2Fapps-static%2F_%2Fjs%2Fgapi%2F_features_%2Frt%3Dj%2Fver%3DlgJnpFHo_sE.es.%2Fsv%3D1%2Fam%3D!9YrXPIrxx2-ITyEIjA%2Fd%3D1%2Frs%3DAItRSTMUGsaYaMyYb_qFDQo8MG8RKB82aQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Conload&id=I1_1352910400423&parent=file%3A%2F%2F
I believe the problem is that you are testing this code locally served through the file:// protocol as shown in the query parameter:
origin=file%3A%2F%2F&url=file%3A%2F%2F%2FC%3A%2FUsers%2Fusuario%2FDesktop%2Fnoche.html
Place your file in a location that can be served through http. Upload the page to your site or install a web server to test on.
I believe I was able to duplicate what you saw in Chrome and Safari; however, this approach is not a supported method to use the plugin and wouldn't be used to serve the page to real users.
I'm trying to use the new chrome inline install feature for extensions (see here: http://code.google.com/chrome/webstore/docs/inline_installation.html).
I can't get it to work unfortunately, and have very little clues to go by. I've added the link element to the head element
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/pnnfemgpilpdaojpnkjdgfgbnnjojfik">
and I call
chrome.webstore.install();
in a jquery event handler. I've also verified my domain, however, I'm testing this on a local machine but have a subdomain pointed to my localhost (i.e. testing on dev.getbentobox.com which is mapped to localhost in my hosts file if that makes a difference).
When stepping through my js using the chrome debugger, chrome.webstore.install() is getting called and the function is defined. However, nothing happens - no install, no javascript exception, no console printing, nothing.
any ideas?
Your Chrome Web Store item doesn't show the verified site. If you compare it to the "We Heart It" extension, which can be inline installed from http://weheartit.com/heart-button, it has a green check saying "from weheartit.com". You'll need to edit your Web Store item, and associate your verified site with the item.
As of December 2018 (Chrome version 71), Google has disabled this feature. The workaround is to send the user to your extension in the Chrome Web Store.
Source: https://developer.chrome.com/extensions/inline_faq#change_dec18
What will change in M71 (Dec 2018)?
Beginning in M71, Chrome will no longer support the chrome.webstore.install() method and calling it will fail, resulting in a broken installation flow on your site. At this point calls to the API will throw a JavaScript TypeError. You should remove any calls to the API method before this date.