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

"browser.on('loaderror')" does not work properly on iOS. #1041

Open
2 of 3 tasks
labarro opened this issue Dec 6, 2023 · 0 comments
Open
2 of 3 tasks

"browser.on('loaderror')" does not work properly on iOS. #1041

labarro opened this issue Dec 6, 2023 · 0 comments

Comments

@labarro
Copy link

labarro commented Dec 6, 2023

Bug Report

Problem

"browser.on('loaderror')" does not work properly on iOS.

What is expected to happen?

I have a function to handle the loaderror of my page; this function calls another function and then closes the browser:

MyCode:

const authUrl =
${authorizationEndpoint}? +
client_id=${clientId}& +
redirect_uri=${redirectUri}& +
response_type=${responseType}& +
scope=${scopes.join(' ')}& +
code_challenge=${codeChallenge}& +
'code_challenge_method=S256';

      const browser = this.inAppBrowser.create(authUrl, '_blank', {
        location: 'yes',
        hidenavigationbuttons: 'yes',
        hideurlbar: 'yes',
      },); 
      browser.on('loaderror').subscribe(event => {
            this.MyFunction();
            browser.close();
        });

What does actually happen?

The load error message appears on my screen, but the function is not executed:
image

Information

The same code works perfectly on Android, but on iOS, it freezes on the load error screen.

Environment, Platform, Device

iOS: 16.6.1
Device: iPhone XR

Version information

@ionic/[email protected]
[email protected]
[email protected]
[email protected]

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
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

1 participant