Run CloudEndPoints Explorer on Local HTTP - google-chrome

I'm trying to run the Api Explorer in LocalHost But it always show the Error
The API you are exploring is hosted over HTTP, which can cause problems.
So I follow the instruction
Go to File Explorer then paste this to address bar >> C:\Program Files (x86)\Google\Chrome\Application (or just go to where you can find your chrome.exe)
Right click chrome.exe > send to > Desktop (Create Shortcut)
Go to your desktop then find the chrome shortcut you've created.
Rename it to ChromeForTesting (this step is optional)
Right click the shortcut, then Click Properties
At the "Target", paste the following at the end of the link
--user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080
so Target should look somewhat similar to this
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080
Click Ok..
During testing close all of your opened google chrome browser.
Then double click ChromeForTesting shortcut (the one you've created), when a prompt appears, just click ok..
But After compelting this When I run that shortcut it will give the error
you are using unsupported command line flag --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080
I also try to click load unsafe script but this is also not working.
Here is screen shot.

Related

How to open browser preview from intellij in flatpak google chrome

When I try to open browser preview in Google Chrome, I encounter this error:
Unfortunately, I have installed Google Chrome via flatpak, and there is no working installation path that I can just provide to IntelliJ.
There are two options.
If Chrome is your default browser
You can use whatever "open" command you have for URLs. In my case it's xdg-open:
If Chrome is not your default browser
You need to start it via flatpak.
First, type flatpak in "Path":
Then click on edit button and paste run --command=/app/bin/chrome com.google.Chrome in
"Command line options":
This works as I expect it to, opening new tab in existing Chrome window.
My IntelliJ is not sandboxed, it's managed by JetBrains Toolbox which in turn was semi-manually installed with this script.
Naturally, I have flatpak on PATH.

Capture Downloads in the Network Tab of Google Chrome Developer Tools

The Network tab in the Google Chrome Developer Tools window shows almost all http requests made, but does not seem to capture anything when the http request results in a file being downloaded.
How can I capture download requests in Google Chrome?
I am sure that your file download is happening by opening a new window. Network tab of developer tools only captures the request of current tab.
For example, following link will download the file but it will not appear in the network tab.
Click Here to Download file
Similar type of things can be done using javascript using (window.open, dynamic hyperlink/iframe), which will not appear in the network tab.
Various Javascript approach you can check here
I have observed similar behaviour in my past.
You cane check the chrome://net-internals in older version of chrome and chrome://net-export/ in the newer version of chrome to monitor any type of request being made by any instance/tab of chrome.
Note: You can check the internal events of chrome by typing chrome://net-export/ in the url box of chrome.
I have faced similar issue, and here's how I solved it.
Issue:
Debug an anchor link that download file upon clicking it.
Debugging Process:
Steps
Go to chrome://settings/content/automaticDownloads?search=download and disable auto download
Open chrome dev tools, Settings -> Global -> Auto-open DevTools for popup
Open chrome dev tools, Settings -> Console -> Preserve log upon navigation
I hope that helps.
This works without changing any settings of Chrome for a single download-request. It however does not automatically display all download-requests triggered in a different tab or window.
Trigger the download in the GUI.
Open Chrome's download history (chrome://downloads/).
Right-click your download and Copy link address.
Open DevTools, paste the link into the address bar of the corresopnding Chrome tab and execute it.
The download-request shows in the DevTools.
You can use Fiddler for a more grainy look into your network traffic:
https://www.telerik.com/fiddler
*I don't work for fiddler
What do you mean by capture?
If you meant that nothing showed up in preview tab or in response tab, it's because the response is the actual file being downloaded.
I've recently tried downloading Oracle JDK 11 with dev-tools open in network tab and here is what I got:
I have no particular configuration in this version of Chrome (Versione 71.0.3578.98 (Build ufficiale) (a 64 bit))
As #jlvaquero said, if you're trying to get as much details as possibile, try WireShark on your own local pc.
I can see it in my case by downloading a document from google drive and limit download speed to 3G.
First step : Open with f12 the programmer toolbar.
Step Two : Go to the networking tab and locate the video in question. To help filter by clicking on media.
Step Three : If the video has no protection you can right click, click open on a new tab and download with crtl + s. If this does not work is because the video has parameters to prevent it from doing so. In that case right click again, go to the COPY session and then click copy as cURL.
Step Four : Go to your linux terminal (If you use windows turn around), if you don't have curl installed type sudo apt install curl and then paste the copied CURL command from the developer bar.
Step 5 : Before executing the command you need to add at the end of it --output video.mp4 --insecure as it is a binary. The insecure parameter is if you have problem with certificate. Wait for the download to complete and be happy!
Obs: This link can help you: https://www.hanselman.com/blog/HowToDownloadEmbeddedVideosWithF12ToolsInYourBrowser.aspx
Google Chrome has been updated to support downloads in the Network Tab
This question was asked in February of 2018, and at the time Google Chrome did not support downloads in the Network tab.
I have verified this by downloading the 64.0.3282.140 build of Google Chrome.
And then attempted to download Spotify as an example and found no event appear in the network tab.
Any Google Chrome version released in 2019 or later will capture all download requests in the Network tab.

How can I refresh Chrome from within WebStorm?

While the WebStorm debugger is pretty robust, I prefer the Chrome console. I'm unable to make use of WebStorm's live reload feature, as it a function of the debugger and won't work while the Chrome console is open. Having to manually give Chrome focus every time I want to refresh is a headache, so does anyone know of easy way to trigger a refresh in Chrome without leaving WebStorm?
I happen to be on a Mac, so was able to work out a solution by utilizing WebStorm's External Tools configuration and AppleScript. Here are the steps:
Define an External Tool configuration in WebStorm
Open WebStorm preferences (⌘,)
Go to Tools --> External Tools
Create a new configuration:
Click the '+' button (a dialog will appear)
Set the name/description as preferred
Uncheck Open console
Set Program to osascript
Set Parameters to -e "tell application \"Google Chrome\"" -e "repeat with theWindow in (windows)" -e "repeat with theTab in (tabs of theWindow)" -e "if theTab's URL contains \"localhost\" then" -e "reload theTab" -e "end if" -e "end repeat" -e "end repeat" -e "end tell"
Press OK to save
At this point, you can go to Tools --> External Tools --> to refresh all chrome tabs whose URL contains "localhost".
You can also map a key combination in the Keymap section of preferences
For reference, here's the AppleScript being executed:
tell application "Google Chrome"
repeat with theWindow in (windows)
repeat with theTab in (tabs of theWindow)
if theTab's URL contains "localhost" then
reload theTab
end if
end repeat
end repeat
end tell
Update:
The external tool configuration and keybind is great, but left something to be desired. TypeScript takes time to compile, so after saving I was left spamming my refresh keybind until I saw my changes... What I really wanted is for Chrome waited for all of the TypeScript to compile before refreshing. This is what I came up with:
By setting the command of an npm run configuration to version, you can setup a run configuration that effectively does nothing but invoke external tools (see this post). I used this strategy to create a run configuration first invokes Compile TypeScript and then the Refresh Chrome Tabs script I defined earlier. The key here is that these external tools are run sequentially.
To take it a step further, I defined a macro that will "Save All" and then "Run" and rebound ⌘S to run invoke this macro. Now, whenever I save, Chrome is automatically refreshed after the TypeScript has been compiled, without any additional key presses.

Can't access internet through Google chrome

I can't access internet through my chrome browser,but can access net through all other browsers in the same system. Tried uninstalling and installing chrome but of no use...Is there any solution for this ?
this is the issue....
Since you have already uninstalled it let's start here:
Step 1: Enable the Hidden Files View.
To do that go to:
Start > Control Panel > Folder Options.
Click the View tab.
Click/Check the Show hidden files, folders, and drives option.
Uncheck the Hide protected operating system files option.
Press OK.
Step 2: Delete any Chrome or Google folders from your computer.
Navigate to the following locations and delete the Chrome folder(s). You can also choose to rename them. I would also search you computer for any google or chrome folder to make sure.
C:\Users\<YourUserName>\AppData\Local\Google\Chrome
C:\Program Files\Google\Chrome
Step 3: Schedule a check disk
To do this use:
chkdsk c: /r
where 'c' is the drive with chrome installed. You can add other drives as well just in case you had multiple installations. To do this basically replace c with the drive letter.
Step 5: Reboot PC and reinstall chrome.
Optional Step: if the above still fails. Download CCleaner. Restart in safe mode with networking. Repeat the above steps but run CCleaner as the final step.
What you need to do is check if there is a proxy turned on system-wide or even in chrome, turn it off. type that "chrome://settings" in your URL bar of chrome: and search for proxy

Google chrome can't read and write to its data directory mutli-device hybrid app

On running the ripple emulator with nexus s & galaxy . I am getting a dialog box saying
Google chrome can't read and write to its data directory
c:\ users\amit
and when i click ok on that .suddenly chrome opens up saying : cannot view webpage .
one more thing where can i set the System path variable to
%JAVA_HOME%\bin;%ADT_HOME%\tools;%ADT_HOME%\platform-tools;%ANT_HOME%\bin;
I mean to say what is this(System path variable) i don't understand .
If you are using Windows:
Go to C:\Program Files (x86)\Google
Right-click on the "Chrome" folder
Go to the "Security" tab
Click on "Edit..." button -> "Add..."
Type Everyone -> "OK" -> "OK"
Click on "Advanced"
At the end of the "Owner" field, click on blue "Change" word
Type Everyone -> "OK" -> "OK" -> "OK"
This worked for me on Windows 7.
Go to the file given in the error message:
c\users\[username]\application data\local\google\chrome
right click the chrome file
share with-specific people
use drop down arrow in top box and choose your username ie give yourself permission to share the file.
add
confirm.
Message says its been done,
close.
Chrome then opens without having to open it as administrator after every boot-up.
It seems your Chrome user data directory might be corrupted, try following and see whether it helps:
Take the back-up of bookmarks (if you want to back-up the data)
Delete C:\Users\[user name]\AppData\Local\Google\Chrome folder
Uninstall Chrome
Reinstall Chrome
For the time being, you can create a android emulator. You don't need chrome for that.
It will work normally when you log in as administrator. If not you can simply change the "chmod" of the directory to 777. it will work.
I was facing this same issue for months, and now I have solved it.
First uninstall Chrome then go to C:\Program Files to double-check and hence delete the 'Google' folder if it still remains.
Then press Windows+R and type in regedit to enter into Registry Editor.
Now locate HKEY_CURRENT_USER\Software\Policies\Google and delete the Google folder. In case you don't find the folder, just delete any Google folder you come across under HKEY_CURRENT_USER\Software
Almost Done! Now download Chrome from it's website, install it and give it a try.