Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Custom intent not work in inappbrowser [net::ERR_UNKNOWN_URL_SCHEME] #862

Closed
3 tasks done
mosabab opened this issue Mar 21, 2021 · 7 comments
Closed
3 tasks done

Comments

@mosabab
Copy link
Contributor

mosabab commented Mar 21, 2021

Bug Report

Problem

What is expected to happen?

Should deal with any name of custom scheme intent.

What does actually happen?

If you try to open external link for example via inappbrowser plugin, it open it without any problem, but if you click on any link in that website that have intent; with custom scheme name; then the inappbrowser plugin generate an error message from cordova webview:
net::ERR_UNKNOWN_URL_SCHEME

Information

Command or Code

Environment, Platform, Device

Version information

Cordova cli 10.0.0
cordova-android 9.1.0-dev (master version)
cordova-plugin-inappbrowser 5.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@mosabab mosabab changed the title Android cannot handle link scheme intent:// with browser_fallback_url param Android cannot handle properly the link scheme intent:// with browser_fallback_url param Mar 21, 2021
@mosabab mosabab changed the title Android cannot handle properly the link scheme intent:// with browser_fallback_url param Cordova-android cannot handle properly the link scheme intent:// with browser_fallback_url param Mar 23, 2021
@mosabab mosabab changed the title Cordova-android cannot handle properly the link scheme intent:// with browser_fallback_url param [net::ERR_UNKNOWN_URL_SCHEME] link scheme intent:// with browser_fallback_url param Mar 26, 2021
@mosabab
Copy link
Contributor Author

mosabab commented Mar 26, 2021

@erisu any idea regarding this issue!
Thanks

@erisu
Copy link
Member

erisu commented Mar 26, 2021

I havent looked at this yet but while reviewing and sorting PRs, I had noticed a PR with similar context.

I only glanced over the code but didn't do a complete review yet.

@mosabab
Copy link
Contributor Author

mosabab commented Mar 27, 2021

I havent looked at this yet but while reviewing and sorting PRs, I had noticed a PR with similar context.

I only glanced over the code but didn't do a complete review yet.

Thanks for the explain.
If that issue got fixed will be good for next cordova-android release
Thanks

@mosabab mosabab changed the title [net::ERR_UNKNOWN_URL_SCHEME] link scheme intent:// with browser_fallback_url param [net::ERR_UNKNOWN_URL_SCHEME] Apr 5, 2021
@mosabab
Copy link
Contributor Author

mosabab commented Apr 5, 2021

I havent looked at this yet but while reviewing and sorting PRs, I had noticed a PR with similar context.

I only glanced over the code but didn't do a complete review yet.

I think the Mentioned PR need to add some code to be in the correct way, because the custom scheme names not work with cordova web view, and the webview generate error message like this:
[net::ERR_UNKNOWN_URL_SCHEME].

@breautek Do you have any idea for this issue ?

Thanks all

@mosabab mosabab changed the title [net::ERR_UNKNOWN_URL_SCHEME] [net::ERR_UNKNOWN_URL_SCHEME] Custom scheme names not work with cordova webview for Android Apr 5, 2021
@breautek
Copy link
Contributor

breautek commented Apr 6, 2021

My best guess is the fact that in-app-browser implements its own webview (as it's intended to have an isolated webview) https://github.com/apache/cordova-plugin-inappbrowser/blob/master/src/android/InAppBrowser.java#L916

apache/cordova-android#1167 is for the cordova webview so it won't have any effect on the in app webview.

Issues with the in-app browser webview should be reported for the in-app-browser plugin. Since I think it is desirable to have the same behaviour in this case, I'll move this ticket over to the proper repository.

@breautek breautek transferred this issue from apache/cordova-android Apr 6, 2021
@mosabab
Copy link
Contributor Author

mosabab commented Apr 6, 2021

My best guess is the fact that in-app-browser implements its own webview (as it's intended to have an isolated webview) https://github.com/apache/cordova-plugin-inappbrowser/blob/master/src/android/InAppBrowser.java#L916

apache/cordova-android#1167 is for the cordova webview so it won't have any effect on the in app webview.

Issues with the in-app browser webview should be reported for the in-app-browser plugin. Since I think it is desirable to have the same behaviour in this case, I'll move this ticket over to the proper repository.

Thanks for explain

@mosabab mosabab changed the title [net::ERR_UNKNOWN_URL_SCHEME] Custom scheme names not work with cordova webview for Android [Android] Custom intent not work in inappbrowser [net::ERR_UNKNOWN_URL_SCHEME] Apr 9, 2021
@mosabab
Copy link
Contributor Author

mosabab commented Apr 12, 2021

@breautek
Hi, i found that if someone familiar with java code can fix this issue as fixed on android platform webview.
But unfortunatly i dont have any experinces in java codes.

Thanks

@mosabab mosabab closed this as completed Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants