Skip to content

Instantly share code, notes, and snippets.

@DRSDavidSoft
Last active December 9, 2021 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DRSDavidSoft/f73193983956cb7a6c769aed2124a3e5 to your computer and use it in GitHub Desktop.
Save DRSDavidSoft/f73193983956cb7a6c769aed2124a3e5 to your computer and use it in GitHub Desktop.
Microsoft Error Issues

Introduction

There is an increasingly annoying trend among many development tools nowadays to intentionally omit useful information when displaying an error message to the end-user. It has become a habit for developers behind many popular software, where they would actively try to hide such information from the user.

This also includes Microsoft products.

I don't agree with these kinds of desicions; and in contrast to what the product designers might perceive, I believe the actions to hide information to be a bad UX design.

While there might be several reasons as to why this might be useful (removing sensitive information, etc), I believe this is mostly done since most users do not really understand (or care to read) the actual error message, and/or lack the necessary skills to fix the issue.

Lazy users mostly just prefer to see a giant "reset to factory settings" button and click on it, whenever an error might occur.
This might be fine in some situations for users or setups that don't really matter, and companies are happy to oblige.
However, as a power user, I tend to prefer to get an actual explanation as to why a particular problem is happening, and actively try to fix it -- as opposed to blindly "reset" settings to default, or some other solution.

As many resources (including Microsoft's own answers page) report invalid, mundane, useless information in regards to fixing Microsoft products when an ADSI HRESULT error code has occurred (such as "Disable your antivirus and firewall", "Replace your network adapter", "Clear the cache", "Create a new user account", "Perform SFC and DISM scans", "Perform a Clean boot", "Try to Sign out and in again", or the worst offender, "Run the Microsoft Store troubleshooter" -- which never really works) -- it's likely that you'll never be able to figure out why a certain issue is happening, and fix it.

To me, it is stupid to come up with the solutions without actually investigating/debugging the issue and trying to figure out what is that went wrong. This is like throwing a dart in the dark, hoping to get results.

In many cases, the network adapter is fine, the state of all Windows files are in order, and the cache doesn't even impact the issue, at all. There might be an external factor to the issue involved.

To solve this issue, I've decided to compile a list of possible error codes that a user like me might run into, try to decipher each of the issues, and write in-depth explanations for each one, and how to solve them.

0x80070490 i.e. ERROR_NOT_FOUND

Possible causes:

  • The HxTsr.exe is unable to connect to ess.windowsphone.net (package: microsoft.windowscommunicationsapps)
  • It is likely that the connection to the requested domain is blocked. (It's possible that a NXDOMAIN DNS response can result in ERROR_NOT_FOUND).

Description:

  • This error code is most likely received right after the process of adding a new account to sync, in the Email & accounts or the People app.

Solution:

  • Whitelist the ess.windowsphone.net domain and/or HxTsr.exe process
  • Make sure that the microsoft.windowscommunicationsapps is able to successfully communicate with the requested domain.

What is the purpose of ess.windowsphone.net? This undocumented domain is used to return endpoints for 3rd party services. For example:

GET https://ess.windowsphone.net/configure_email?ver=07&email=username@yahoo.com
<?xml version="1.0" encoding="UTF-8"?>
<isp-collection>
  <isp domain="yahoo.com" disp-name="yahoo.com" transport="1" in-serv="imap.mail.yahoo.com" in-uname-fmt="2" in-port="993" in-ssl="1" out-serv="smtp.mail.yahoo.com" out-auth="1" out-uname-fmt="2" out-port="465" out-ssl="1" />
</isp-collection>

0x80190001 (i.e. HTTP_E_STATUS_UNEXPECTED or ERROR_INVALID_FUNCTION)

Possible causes:

  • The wwahost.exe is unable to connect to login.live.com
  • Note: If a proxy to localhost or 127.0.0.1 is being used on the system, all store or UWP apps (formerly known as Metro apps) will refuse to connect.

Description:

  • The most common causes are either the connections made from the UWP apps (such as Settings) are blocked by a firewall, or they're being failed (e.g. the internet connection is unavailable).

Solution:

  • Whitelist the login.live.com domain and/or wwahost.exe process
  • If a proxy to localhost or 127.0.0.1 is being used, try an app such as Fiddler to disable the AppContainer isolation technology present in Windows 8 and later versions:
    Click on WinConfig » Exempt All » Save Changes

0x800704cf i.e. ERROR_NETWORK_UNREACHABLE

Possible causes:

  • The NCSI/NLA (Network Connectivity Status Indicator, formerly Network Location Awareness) is not functioning correctly (thus, Windows thinks the network is offline, when in actuality it is not).

Description:

  • This error message is displayed when Microsoft Store erroneously believe that the whole system is disconnected from the Internet.

You'll need the Internet for this.
It doesn't look like you're connected to the Internet. Check your connection and try again. The network location cannot be reached. For information about network troubleshooting, see Windows Help.

  • You'll also see the Offline Icon in the tray bar.

Solution:

  • To skip DNS NCSI check and return the expected value everytime, edit the file C:\Windows\System32\drivers\etc\hosts, and place this line in it:

    131.107.255.255    dns.msftncsi.com
    
  • Make sure the values that are set in the following registry key can be accessed by your system:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet
  • This means that the following requirements should be met by default:

    • The hostname dns.msftncsi.com should resolve to 131.107.255.255 in IPv4 and fd3e:4f5a:5b81::1 in IPv6
    • The hostname www.msftconnecttest.com should be accessible for IPv4, and ipv6.msftconnecttest.com for IPv6
    • The http://www.msftncsi.com/ncsi.txt URL should return Microsoft NCSI
    • The http://www.msftconnecttest.com/connecttest.txt URL should return Microsoft Connect Test
  • If you use Pi-hole or a firewall, verify that the OS can access the mentioned endpoints using your network setup.

  • Temporarily use a public DNS such as 1.1.1.1, 9.9.9.9 or 8.8.8.8 instead of the one provided by DHCP.

  • This SO post has more information on the NCSI endpoints.

  • Verify that WinHTTP is picking up system proxy settings correctly, if you use one; see this answer.

netsh winhttp set proxy command

or

netsh winhttp import proxy source=ie
  • Note: you must restart the network interface or reboot the system for the NCSI changes to take effect.
  • Note: The mentioned DNS and hostnames should be accessible shortly after the network adapter is enabled; if the results are not received in the expected time window, the test will fail.

0x80131500 i.e. COR_E_EXCEPTION

An exception within Microsoft apps was raised due to something not being handled correctly.

Possible causes:

  • Parameter market was specified with invalid value: IR

Description:

  • IR is the country code for Iran. It appears that choosing "Iran" as the market value is totally an "invalid" option for Microsoft Store.
  • This causes an exception being raised in the app, and since this is not handled correctly, the app will stop to function.

Solution:

  • Open Settings ( Win + I ) → Date & time → Region
  • Change the value of "Country or region" from "Iran" to another option, e.g. United States
  • Refresh Microsoft Store

Explanation:

  • Store files to fetch the "recommendations" page (on the homepage) when "IR" is selected, so it simply fails to load any other page.
/recommendations/collections/TopFree?market=IR&locale=en-US
{
    "code": "InvalidParameterValue",
    "data": [],
    "details": [],
    "innererror": {
        "code": "InvalidParameterValue",
        "data": [],
        "details": [],
        "message": "Parameter market was specified with invalid value: IR.",
        "source": "StoreEdgeFD",
        "target": "market"
    },
    "message": "Parameter market was specified with invalid value: IR.",
    "source": "StoreEdgeFD",
    "target": "market"
}

0x8015DC0B

Possible causes:

  • The incoming traffic is originated from "Iran"

Description:

  • Currently unknown.

Solution:

  • Use any means of changing the IP address (e.g. Proxy, VPN, etc)

  • In Iran, you can use a service like Shecan.ir, which routes the traffic to Microsoft servers through a network residing outside Iran.

    To use Shecan, set the system DNS settings to the following addresses:

    178.22.122.100
    185.51.200.2
    

Explanation:

  • Currently, unknown.

0x80070422 i.e. ERROR_SERVICE_DISABLED

Possible causes:

  • The Windows Update (i.e. wuauserv) service is Stopped and/or Disabled

Solution:

  • From services.msc or Task Manager → Services, locate Windows Update or wuauserv, and make sure it's in the Running state. If not, choose Start from the context menu.
  • If the service is disabled, you'll need to enable it first in order to start it: From the services.msc, go to Windows Update → Properties, then change Startup type from Disabled to either Manual or Automatic, then try to start the service.

Explanation:

  • This error code is raised when a Windows service cannot be started, either because it is disabled, or because it has no enabled devices associated with it.

0x80190001 i.e. HTTP_E_STATUS_UNEXPECTED or ERROR_INVALID_FUNCTION

Possible causes:

  • Unable to resolve: dl.delivery.mp.microsoft.com

Description:

  • This may be the case where the connections to the dl.delivery.mp.microsoft.com are being blocked by a software such as Pi-hole.

Solution:

  • Whitelist the dl.delivery.mp.microsoft.com domain
  • Restart the Update service / assistant

Explanation:

  • The following URL as an example is being requested:
http://dl.delivery.mp.microsoft.com/filestreamingservice/files/{GUID}/19042.631.201119-0144.20h2_release_svc_refresh_CLIENTBUSINESS_VOL_x64FRE_en-us.esd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment