How to Fix the ERR_UNKNOWN_URL_SCHEME Error?(9 Methods)

The err_unknown_url_scheme error is a very common browser issue, especially for Chromium browsers that triggers when you try out your new Android app to test its web view. Or the application on your device is unable to handle a particular action related to the URL scheme.



But that doesn’t mean you cannot do anything about it. In this article, we will provide you with a complete guide on the ‘err_unknown_url_scheme’ error: why it occurs, what it means, and how you can fix it, all in a very comprehensive manner.

Just stay tuned and keep reading this article. Let us get started!


What does err_unknown_url_scheme error mean?

This particular err_unknown_url_scheme error specifically occurs in Chromium browsers and it is a result of a bug present that was first detected in the Chrome 40 version. And after that, it has become prominent ever since.

It simply indicates that the URL you trying to open with a scheme or protocol that is not recognized or supported by the browser.

URL schemes are the prefixes in URLs that indicate how the resource should be accessed. Common URL schemes you might be familiar with are “http://” and “https://,” which are used for web pages, and “mailto://” for email addresses.

However, there are many other URL schemes for various purposes, and if a browser encounters a URL with an unsupported scheme, it will display the “ERR_UNKNOWN_URL_SCHEME” error.

To better understand this, let us consider an example.

Suppose, you want to develop a native app for the Google Play store. And for this, you have to utilize Android Studio which is an official Integrated Development Environment for Android app Environment.

Since you are developing an Android app for your users, you would also like them to view web browser content within that particular app, without having to switch back and forth between the browser and your app. Otherwise, it could significantly impact your user experience, which is something you wouldn’t want to happen.

To make this possible, you need to add a class called ‘WebView’ that allows you to display web content directly from your native app. However, this browser will not have typical browser features such as a search bar or other navigation options. But, it will successfully render a webpage.

At this stage, it could potentially trigger the ‘err_unknown_url_scheme‘ error. This may occur because the website you have requested has an incompatible scheme for the mobile device.


Read: 🚩 A Complete Guide on HTTP to HTTPS Migration in WordPress


What causes the err_unknown_url_scheme error?

1. Chrome browser issue

One of the main reasons that the err_unknown_url_scheme error happens is your Google Chrome web view’s inability to recognize the URL scheme.

However, Chrome Webview is very useful for native apps but the problem is it is only able to recognize only two URL schemes, i.e. http:// and https:// protocols.

For other URL schemes such as, mailto://, app://, mail://, buy://, market://, whtsapp://. etc. it will show an err_unknown_url_scheme error.


Note: A URL scheme is a set of rules or protocols that define how URLs are structured and how they should be interpreted by software applications and web browsers.


However, if you are an app developer, you can prevent this error from happening by simply using specific URL schemes in your native app.

3. Incompatibility between protocols

The net::err_unknown_url_scheme error can also be triggered if there is a compatibility issue found between the protocols of your web browser and the program. For example, this particular error occurs if you call a phone number from a particular website or through an app and try to access redirect URLs.

4. Typographical Errors

The other most common cause is a typographical error in the URL. If there’s a mistake in the URL, such as a missing or incorrect scheme, the browser won’t recognize it.

5. Custom Schemes

Some websites and applications use custom URL schemes for specific purposes. If your browser doesn’t understand these custom schemes, it will display the error.

6. Outdated or Incompatible Browsers

Older or less commonly used web browsers may not support certain URL schemes or may have bugs that trigger this error. Updating your browser can help address this issue.

7. Browser Extensions

Browser extensions or add-ons can sometimes interfere with URL handling. Disabling or troubleshooting extensions may resolve the error.

8. Website Issues

In some cases, the error may be caused by issues on the website’s end. The website may not be configured properly to handle certain URL schemes.

9. Operating System Restrictions

On mobile devices, operating systems may have restrictions on which apps can handle specific URL schemes. If there’s a mismatch between the URL scheme and the app’s capabilities, it can result in this error.


How to fix the err_unknown_url_scheme error?

These are the six best methods that can help you fix the err_unknwon_url_scheme error, whether you are a developer or a front-end user. Just follow these simple steps first, afterward we get more into technical stuff.


1. Clear your Browser Cache and Cookies

Browser Cache is intended to boost user experience by storing website files in a cache so that when you next time visit the website again it can load faster. But this cache data over time gets corrupted or outdated resulting in triggering such kinds of errors. So to fix this, you have to clear your browser cache and cookies completely.

In Google Chrome, Go to Settings > Privacy and Security > Clear browsing data > You can uncheck the Browsing History and let cookies and other site data, as well as cache images, be checked > Clear data.

Alternatively, you can directly enter this address into your Chrome browser: chrome://settings/privacy. It will take you to the privacy settings where you can click on “Clear browsing data“.

Chrome Privacy and Security
Chrome Privacy and Security

In the pop-up window, you will see plenty of other options, but you have to choose as follows:

  • Select the time range as “All time”.
  • Select cookies and other site data as well as Cache images (you can also select browsing history)
  • Click on the Clear Data button.
Clearing chrome browsing history and cache memory
Clearing Chrome browsing history and cache memory

2. Deactivate Chrome Extensions Temporarily

Many Chrome-specific errors can be easily fixed by simply fixing your Chrome extensions. Sometimes, these extensions are poorly coded and can be the culprit of triggering such error messages. To figure out if this causing the issue, you have to deactivate all of them temporarily.

To view all the installed Chrome extensions, Type “chrome://extensions/” in the URL bar.

Disable Chrome Extensions
Disable Chrome Extensions

After that, disable all active Chrome extensions and check whether the error has been resolved or not. If it has been resolved, it means that the error was caused by an installed extension. To identify the culprit extension, enable one plugin at a time and try to access the website each time.


3. Create a new user Chrome profile

If the above methods don’t fix the err_unknown_url_scheme error, you can try creating a new user’s Chrome profile instead.

To do this, Go to your user profile located at the right upper corner of Chrome browser, where your profile picture is shown. Click on your profile picture > At the bottom of pop-up windows click on “+” to add a new user profile.

Create a new Chrome profile How to Fix the ERR_UNKNOWN_URL_SCHEME Error?(9 Methods)

This will allow you to create a new Chrome user profile. Follow the instructions as shown in the pop-up window.

You can either create a completely new Chrome user profile or continue with an existing Chrome profile.

Set up Chrome profile How to Fix the ERR_UNKNOWN_URL_SCHEME Error?(9 Methods)
Set up your new Chrome profile

After that follow the instructions that will help you to customize and personalize and you are done.

Customize Chrome profile
Customize Chrome profile

Now try to access the webpage you were trying to visit and see if the error persists. If it doesn’t help follow the next method.


4. Disable Hardware Acceleration in Chrome

Chrome uses the computer’s hardware components, such as the graphics processing unit (GPU), to perform certain tasks and processes within the web browser.

Most of the time, this technology offloads some of the browser’s tasks from the central processing unit (CPU) to specialized hardware components, improving performance and responsiveness in certain scenarios.

But, this feature does not always work like a charm, sometimes it also lags, crashes, and even freezes. Hence, to fix this you need to disable or turn off this hardware acceleration feature.

To do this, Open your Chrome browser > Settings > System Tab > Toggle the button to turn off hardware acceleration in Chrome.

Hardware Acceleration in Chrome
Hardware Acceleration in Chrome

5. Try a non-chromium browser as the default

If the err_unknown_url_scheme error continues to occur, you can try a nonchromium browser such as Microsoft Edge or Mozilla Firefox as default. It is because a default browser is the one that opens links automatically and it’s generally the one that came preinstalled on your device or Google Chrome.

The process of changing the default browser on your device can vary depending on the device you use. For Windows 10 users :

Step 1: Click on the Start button (Windows icon) in the bottom-left corner of your screen.

Step 2: Click on the Settings gear icon, which looks like a gearwheel.

Step 3: Inside the Settings window, locate and click on the Apps option.

Step 4: On the left side of the Apps section, you’ll see a list of categories. Click on Default Apps.

Step 5: Scroll down until you come across the “Web browser” section. This is where your current default web browser is listed (usually Microsoft Edge).

Step 6: Click on the name of your current default browser. A list of installed web browsers will appear.

Step 7: Select the web browser you want to set as your new default. Click on it to make your choice.

Step 8: Windows will ask you to confirm your selection. Click on the Switch anyway or Switch button (the wording might differ based on your Windows version).

Step 9: Once confirmed, your default web browser will be updated to the one you selected.

For macOS (Ventura) users,

Step 1: Navigate to the Apple menu  located at the left top corner of your screen, and choose System Settings.

Step 2: Now Click Desktop & Dock in the sidebar.

Step 3: Scroll down and select a web browser from the “Default web browser” menu on the right.


6. Turn off your Firewalls or Antivirus program

Sometimes, a poorly or wrong-configured antivirus program or Firewall settings can also be the reason for triggering err_unknown_url_scheme error. To check if this is the case, try to turn off your Firewalls or antivirus temporarily.

To Disable Antivirus program in Windows Devices,

Step 1: First, you need to open your computer’s control panel. To do this, click on the “Start” menu on your desktop and type “control” in the search field.

Step 2: Next, select “System and Security” from the control panel options. This will take you to a new page.

Step 3: On the new page, you’ll see an option for “Windows Defender Firewall.” Click on “Allow an app or feature through Windows Firewall.

Allowing an app through Windows Firewall
Allowing an app through Windows Firewall

Step 4: In the next window, you’ll see a list of apps and features that are allowed to communicate through your firewall. To change these settings, click on “Change settings.”

List of allowed apps in Windows Defender Firewall
List of allowed apps in Windows Defender Firewall

Step 5: If you don’t see your DNS client on the list, you can add it by clicking on the plus (+) icon.

Step 6: To temporarily disable your firewall, uncheck the box next to “Windows Defender Firewall” and click on “OK” to save your changes.

Step 7: Alternatively, you can adjust your firewall settings by finding the DNS client or any other application you want to configure and checking or unchecking the boxes next to the desired settings.

Step 8: Once you’re done adjusting your settings, click on “OK” to save your changes.

For Mac Users

Click on the Apple icon, located at the top left corner of your Mac PC and select System Settings.

Now navigate to Network > Firewall and Toggle it to Turn off.

If none of the above methods work, it is now time to contact an app developer who can help you to fix this issue.


7. Try Opening in a New Window

So far, we have explained how you can fix the err_unknown_url_scheme error through the Chrome browser itself. Now it is time to solve this error from a developer’s point of view. So that, your App will not have any sort of issues.

One of the easiest approaches you can take is editing your URL’s href code. By simply adding an HTML code :

target="_blank"

This code will specify How the browser should be opened and it will open Webview in a new window.


Note: This method will not be effective for a shorter period of time because opening new windows can irritate and confuse your users, potentially harming your app’s user experience. This particular line of code will remove the ‘Back’ button, making it more challenging for your users to navigate back and forth between pages in your app.


8. Add new Intend to Load External App

If you are into Android development, you must be familiar with “intents“. These are a way to communicate with the Android OS and other other apps. Through this, you can specify whatever actions to perform or what component you want to invoke in your or other apps on the device.

Put simply, it allows you to control how your app interacts with other parts of the Android system or with external apps.

For example, when you want to open an external app or handle specific types of links within your app, you can use the following intents:

  • Email Links (mailto://): If you have an email link in your app with a mailto:// scheme, using an intent can instruct Android to open the user’s preferred email application when they click on it.
  • Maps Links (maps://): Similarly, if you have a map link with a maps:// scheme, an intent can launch the user’s preferred mapping application.
  • Phone (tel://) and SMS (sms://) Links: These schemes can be used to trigger phone calls or text messages, respectively, using the user’s default phone and messaging apps.

To manage these in your code, you can use an “if” statement to check the URL’s scheme. If the scheme matches one of the unique ones like tel://, sms://, mailto://, geo://, or maps://, you can use an intent to open the corresponding app or perform the desired action. On the other hand, if the URL starts with http:// or https://, you can handle it as a standard web link.

Here is an example for your reference. You can add a custom URL scheme that is specific to a particular app, WhatsApp in this case. This is how you can implement an override of URL loading.

@Override
public boolean shouldOverrideUrlLoading (WebView view, String url) {
view.loadUrl (url);
if (url.startsWith (“whatsapp://”)) {
webview.stopLoading();
try {
Intent whatsappIntent = new Intent (Intent.ACTION_SEND);
whatsappIntent.setType (“text/plain”);
whatsappIntent.setPackage (“com.whatsapp”);
whatsappIntent.putExtra (Intent.EXTRA_TEXT, webview.getUrl() + ” – Shared from webview “);
startActivity (whatsappIntent);
} catch (android.content.ActivityNotFoundException ex) {
String MakeShortText = “Whatsapp is not installed”;
Toast.makeText (WebactivityTab1.this, MakeShortText, Toast.LENGTH_SHORT).show();
}
};
};

The users will be sent to their installed WhatsApp app, and the user will be able to open it on their device. However, if WhatsApp is not available on the user’s device, an error toast message will appear, stating ‘WhatsApp is not installed’.”

So, intent helps you make your app interact seamlessly with other apps and services on the Android device, ensuring a smoother and more integrated user experience.


9. Disable any nonstandard URL schemes

Instead of adding new intent to load the External app, another alternate method you can do is to completely disable any nonstandard URL schemes, other than http:// and https://.

This will completely resolve the issue and none of the custom or fancy intents will be available to you.

To do this in HTML follow the script given below:

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
if (url.startsWith("http") || url.startsWith("https")) {
return true;
}else {
webview.stopLoading();
webview.goBack();
Toast.makeText(MainActivity.this, "Error: Link not supported",
Toast.LENGTH_SHORT).show();
}
return false;
}

Now, whenever a user clicks on the non-standard URL link, there will be a pop-up message will appear stating ” Error: Link not supported”. This way the user won’t continue further after seeing this error message.


Conclusion

This post has highlighted the various areas of err_unknown_url_scheme error, such as its meaning, its causes, and the best possible troubleshooting methods. Here is a summary of the methods that we have mentioned above.

  • Clear your Browser Cache and Cookies
  • Deactivate Chrome extensions Temporarily
  • Create a new user Chrome profile
  • Disable Hardware Acceleration in Chrome
  • Try a non-chromium browser as the default
  • Turn off your Firewalls or Antivirus program
  • Try Opening in a New Window
  • Add new Intend to Load External App
  • Disable any nonstandard URL schemes

You can try out all these best solutions and let us know which one has helped you to fix the err_unknown_url_scheme error, in the comment section down below.


Frequently Asked Questions

What is the meaning of an unknown URL scheme?

It simply indicates that the URL you trying to open with a scheme or protocol that is not recognized or supported by the browser.

How do I fix the err_unknown_url_scheme error?

You can fix the err_unknown_url_scheme error by following these methods:
1. Clear your Browser Cache and Cookies
2. Deactivate Chrome extensions Temporarily
3. Create a new user Chrome profile
4. Disable Hardware Acceleration in Chrome
5. Try a non-chromium browser as the default
6. Turn off your Firewalls or Antivirus program
7. Try Opening in a New Window
8. Add new Intend to Load External App
9. Disable any nonstandard URL schemes


Leave a Reply

Your email address will not be published. Required fields are marked *