Navigation is blocked error on Chrome 61 on Android

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I'm building a login page that, upon submitting and validation of the user credentials, opens up a native mobile application. Up till last week, I had this working cross mobile OS by using a custom scheme URI, something like:

    function onLoginCallback() {
        const redirectUri = 'customscheme:/action?param1=val1¶m2=val2';
        window.location.replace(redirectUri);
    }
    

    However, with the release of version 61 of Chrome, this is approach is broken on Android. Chrome blocks the redirect because there's no apparent user action related to the redirect (see here for more information on the matter).

    As a consequence, when executing the code above, I'll end up with a warning in the console:

    Navigation is blocked: customscheme:/action?param1=val1¶m2=val2

    I've also tried updating the custom scheme url to an intent url but to no avail. Googling about this issue doesn't readily provide a clear solution, so I'm hoping anyone on can help me out.


    Addendum: I'm trying to fix the issue by calling an endpoint on the server which results in a 302 See Other with the value of the Location Header set to the custom scheme URL. I'll update my question once those results are in.
    asked 24 secs ago
    thomaux

    نویسنده : استخدام کار بازدید : 0 تاريخ : جمعه 21 مهر 1396 ساعت: 16:36
    برچسب‌ها :