ERR_CONNECTION_REFUSED in localhost after GC update to 87.0.4280.66 - google-chrome

I work with Visual Studio 2017 and develop asp.net core (2.2) app’s.
I have set IIS-Express as dev webserver and Google Chrome as default browser.
In the project settings, I have set http://localhost:14300 as dev-url.
Since the last chrome update Version 87.0.4280.66 (at 19.11.2020) the app is compiled, the chrome browser is started, but the url seems to be changed “on the fly” from http://localhost:14300 (as defined) to https:localhost (without port).
Therefore, an error message is showed in the browser:
ERR_CONNECTION_REFUSED
The app is loaded - if I paste the url (http://localhost:14300) in another Browser or a new chrome tab, the app is loaded.
So.. I assume a bug in the latest Chrome update or a compatibility issue VS2017 <-> ISS Express <-> GC
I already have searched the Internet and found nothing yet (further, I already sent as issue to Google) .

According to your description, I guess you may set the launchSettings.json's IIS Express's launch Url to "https://localhost".
I suggest you could check it to make sure the launch Url is right.
More details about the launchSettings.json, you could refer to below codes:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5761",
"sslPort": 44365
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "https://localhost",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"AngularCore31": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

It seems as I have found the issue (I see no context, but this has solved my problem):
Note: Here ( 1 ) was https://localhost showed (instead of http://localhost:14300 as on the screenshot below).
After launch with debug to IIS press the (i) ( 1 ) symbol
Then select "Website-Einstellungen" ( 2 ) (website settings)
Then, I had to delete ( 3 ) all data to the website (localhost)
After doing that, the debug url (http://localhost:14300) was loaded correct again.
So... (for me) it seems as the update to Chrome Version 87.0.4280.66 had a problem regarding the already stored data and then (for whatever reason) has redirected
http://localhost:14300
to
https:/localhost

Related

Chrome Extensions: chrome.runtime.lastError: Internal error while updating dynamic rules

SOLUTION: Installed the latest version of chrome. All is well.
I am attempting to set dynamic rules to allow users to manually configure blocked and allowed sites using the declarativeNetRequest api. Specifically the updateDynamicRules method.
I attempt to add a new rule:
chrome.declarativeNetRequest.updateDynamicRules(
{
addRules: [
{
id: 1,
action: {type: "allow"},
condition: {urlFilter: "abc", resourceTypes: ["main_frame"]}
}
]
},
() => {
if (chrome.runtime.lastError)
console.log(chrome.runtime.lastError);
}
)
I've disabled all other extensions. I get the lastError: "Internal error while updating dynamic rules" I have attempted using another example here, but arrive to the same, rather vague result.
Has anyone else experienced this?
EDIT: Other things I have tried, in accordance to comments:
Changing the id of the dynamic rule in question
Uninstalling and reinstalling the extension
Thank you wOxxOm for the comment that helped solve my issue. "Might be a bug. Try Chrome Canary or the latest Chromium snapshot. To report the bug use crbug.com."
Simple installed the latest version of Chrome.

ASP.NET Core application debug and development when debugging with Visual Studio 2019 configured for Microsoft Edge?

Here are some details about our development environment:
-DevExpress 20.2.3 ( we are using DevExtreme )
-Microsoft Visual Studio Enterprise 2019 (Version 16.4.6)
-ASP.NET Core 3.1.0
-AspNetCore.Mvc 3.1.0.0
I'm developing on my Development VDI which is on my company's office network.
As I develop and debug the application code in question within Visual Studio 2019, I configured the Debug mode to debug said application in Microsoft Edge:
Within the ..........\launchSettings.json
{ "iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:18491",
"sslPort": 44342
} }, "profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"nativeDebugging": true
},
"InvestorCentral.Uploaders": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
} } }
In the ASP.NET Core application, my .....\Startup.cs has the following code snippet:
public class Startup
{
.....................
...............................
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHttpContextAccessor accessor)
{
.........................
..................................
app.UseEndpoints(endpoints =>
{
.........................
..................................
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
.........................
..................................
However, for some really strange reason, when I debug for Microsoft Edge, the url goes to:
file:///C:/ProgramData/Microsoft/VisualStudio/EdgeAdapter/09227041/landingPage.html
As you can see, we would expect the startup url/landing url to be https://localhost:44342/Home/Index , therefore, I have No idea why Microsoft Edge navigates to the the startup url/landing url to be:
file:///C:/ProgramData/Microsoft/VisualStudio/EdgeAdapter/09227041/landingPage.html
Furthermore, it's even stranger that I get login credential fill-in popup box for some internal Server within our office?
And moreover, this Only happens when Visual Studio debug is configured to use Microsoft Edge, and Not in Chrome.
Could someone please explain to me how I can go about Stop the login credential fill-in popup box from showing up when debugging using Microsoft Edge?
This is a normal behavior. And it is the difference between Chrome and Microsoft Edge. Chrome can automatically add your current username and password into the current local web project to make it as a trusted website so that you have the permission to access the website.
However, Edge does not have this feature. In other words, it is designed by that. Because you have enabled windowsAuthentication in launchSettings.json file and Edge cannot access your info automatically, so you have to input your OS username and password each time to debug the web project.
This is the difference between the two browsers. So actually this is one point that we usually use Chrome(more convenient and powerful).
Solution
To solve the problem for Edge, you have set anonymousAuthentication to true.
It will automatically add your info into the website so that you can access it.
Thanks for Microsoft that they has added this useful switch. When you use Chrome, you do not have to care about such switch and it will automatically add your info due to its powerful feature.

Where does Chrome download synced extensions from?

Say I was to sign into a new user on Chrome and had extensions from a previous computer synced to my account. Where are these extensions downloaded from after I sign? I thought maybe update_url in manifest.json but I'm not sure.
Let's examine an actual sync payload through chrome://sync-internals/
"SPECIFICS": {
"encrypted": true,
"extension": {
"disable_reasons": "0",
"enabled": true,
"id": "ijglncoabcgieiokjmgdogpefdblmnle",
"incognito_enabled": false,
"installed_by_custodian": false,
"name": "Desktop Notifications for Stack Exchange",
"remote_install": false,
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "1.6.12"
}
},
From this, Chrome does see the update_url, which it can query for the download URL according to auto-update protocol. Note that the actual extension is not hosted at that URL, that URL merely contains instructions on where to download it from. In this instance, the download will be from the Chrome Web Store.
It will also sync disabled status across instances: a disabled extension will still be downloaded, but will be disabled immediately.
Since non-enterprise versions can't install from anywhere but CWS, and non-CWS enterprise installs take their update_urls from policies and not Sync, I think the answer to your question is almost certainly "from CWS". Can't test it though.

Webdriver.io enable flash for selenium-standalone

I'm writing acceptance tests on node.js using webdriver.io with selenium standalone server with latest Google Chrome driver.
I need to check that flash elements are clickable, but browser keeps to show me "Restart Chrome to enable Adobe Flash Player".
I've seen article that shows how to make Chrome driver to see custom profile on local machine, but I can't understand how to use this with my standalone server, since it has poor examples for configuration.
Can you explain the correct way to enable Adobe flash player for selenium standalone server in webdriver.io?
I found that the following worked:
browserName: 'chrome',
'goog:chromeOptions' : {
args: ['enable-features=RunAllFlashInAllowMode',
'disable-features=EnableEphemeralFlashPermission'],
prefs: {
"profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player": 1,
'PluginsAllowedForUrls': '/route/to/site.com'
}
}
Using ephemeral mode will create a temp profile which allows the prefs to take effect:
https://developer.chrome.com/extensions/contentSettings
https://support.google.com/chrome/a/answer/3538894?hl=en
'goog:chromeOptions' was introduced as of selenium 3.8 github.com/elgalu/docker-selenium/issues/201 –
You can open up the profile which is a JSON blob and see the site added at profile.content_settings.exceptions.plugins and profile.content_settings.exceptions.flash_data.
It is very easy. you need to create a custom profile that you will always use to load your chrome with. then you configure the browser like you would do manually too. this means make website exclusions for flash. load some extensions or whatever you want to preconfig. with this code you can do it
// setup browser
var options = {
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['user-data-dir=C:/Users/Administrator/AppData/Local/Google/Chrome/User Data/Profile 21v69',
'--lang=en']
} // chromeOptions: {
} // desiredCapabilities: {
} // options = {
var client = webdriverio.remote(options).init();
Also here are all command line commands for chrome
https://peter.sh/experiments/chromium-command-line-switches/
Another workable method. It's possible to allow flash plugin execution in the chrome config
You need to add in the wdio.conf.js three last preferences from code example
chromeOptions : {
args: chromeArgs,
prefs: {
"download.default_directory": process.env.PWD +'/download',
"profile.default_content_setting_values.plugins": 1,
"profile.content_settings.plugin_whitelist.adobe-flash-player": 1,
"profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player": 1
}
}
I hope it will helpful

Webdriver logs for Firefox

Both Chrome and PhantomJS selenium drivers can log everything that is going on the browser side. By specifying the service log path while initializing the driver, you can control where the logs would be written to. E.g. for chrome (in Python):
from selenium import webdriver
driver = webdriver.Chrome(service_log_path="/tmp/log")
driver.get("http://www.google.com")
driver.close()
After executing the code, /tmp/log file would contain the service logs which is helpful for debugging:
[0.985][INFO]: Launching chrome: ...
[2.620][INFO]: RESPONSE InitSession {
"acceptSslCerts": true,
"applicationCacheEnabled": false,
"browserConnectionEnabled": false,
"browserName": "chrome",
"chrome": {
"userDataDir": "/var/folders/yy/ppdg927x4zv8b0rbzg1f_jzh0000gn/T/.org.chromium.Chromium.ibsof9"
},
"cssSelectorsEnabled": true,
"databaseEnabled": false,
"handlesAlerts": true,
"javascriptEnabled": true,
"locationContextEnabled": true,
"nativeEvents": true,
"platform": "Mac OS X",
"rotatable": false,
"takesHeapSnapshot": true,
"takesScreenshot": true,
"version": "37.0.2062.120",
"webStorageEnabled": true
}
[2.677][INFO]: Waiting for pending navigations...
[2.696][INFO]: Done waiting for pending navigations
[3.290][INFO]: Waiting for pending navigations...
[4.338][INFO]: Done waiting for pending navigations
[4.338][INFO]: RESPONSE Navigate
[4.339][INFO]: COMMAND CloseWindow {
}
[4.451][INFO]: RESPONSE CloseWindow
Is there a way to get the same information but using Firefox web driver?
From what I see in the source code, both Chrome and PhantomJS fire up new services via subprocess and pass the --log-path argument to it. And these services are responsible for the logging. As for Firefox driver, it's implementation is quite different and is based on FirefoxBinary class.
Provided example and links are Python-related, but the question is pretty much generic and language-agnostic. Would appreciate any pointers.
You have to set logging options in firefox profile as in developer tips link - https://code.google.com/p/selenium/wiki/DeveloperTips - for console log you should use:
FirefoxProfile p = new FirefoxProfile();
p.setPreference("webdriver.log.file", "/tmp/firefox_console");
WebDriver driver = new FirefoxDriver(p);
For browser log, you should use
webdriver.firefox.logfile
(https://code.google.com/p/selenium/wiki/FirefoxDriver)
Hope this helps.
I believe logging for FireFox has to be enabled via a profile. Which needs to be base64 encoded.
Something along those lines is mentioned in this bug raised against RemoteWebDriver.
Any help?