Skip to content

iOS Error #95

Closed
Closed
@tjelz

Description

@tjelz

Description

Hello, I seem to be having an issue with iOS and opening the webpage to login, it is all working fine on the web and I have not yet managed to test it for Android.

When I press my login button which calls the Authenticate method, on the web a browser window will show to ask for login credentials, on iOS, no webpage is shown, only an error in XCode.

The error in XCode when I attempt to call the authenticate method is:

 [error] - ERROR {"line":101020,"column":51,"sourceURL":"capacitor://localhost/vendor-es2015.js"}

This goes to this line of code (first line):

else if (this.windowHandle.closed && !this.windowClosedByPlugin) {
      clearInterval(this.intervalId);
      reject(new Error("USER_CANCELLED"));
}

I am using the latest iOS Simulator (iPhone 11).

I can only assume that 'windowHandle' is null for some reason?

Capacitor version:

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 2.1.0

@capacitor/core: 2.1.0

@capacitor/android: 2.1.0

@capacitor/electron: 2.1.0

@capacitor/ios: 2.1.0

Installed Dependencies:

@capacitor/electron not installed

@capacitor/ios 2.0.2

@capacitor/core 2.0.2

@capacitor/cli 2.0.2

@capacitor/android 2.0.2

[success] Android looking great! 👌
Found 1 Capacitor plugin for ios:
@byteowls/capacitor-oauth2 (2.0.0)
[success] iOS looking great! 👌

Library version:

  • 2.0.0

OAuth Provider:

  • Other: Custom IdentityServer4

Your Plugin Configuration

export const oauth2Options = {
  authorizationBaseUrl: "aaa",
  accessTokenEndpoint: "aaa",
  scope: "aaa",
  resourceUrl: "",
  pkceEnabled: true,
  web: {
    appId: "mobile",
    responseType: "code", // implicit flow
    redirectUrl: "http://localhost:1234/signin-oidc",
    windowOptions: "height=600,left=0,top=0"
  },
  android: {
    appId: "mobile",
    responseType: "code", // if you configured a android app in google dev console the value must be "code"
    redirectUrl: "aaa:/" // package name from google dev console
  },
  ios: {
    appId: "mobile",
    responseType: "code", // if you configured a ios app in google dev console the value must be "code"
    redirectUrl: "aaa:/" // Bundle ID from google dev console
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions