Skip to content

The app crashes if iosCustomBrowser is not provided, react-native 0.77.1 #1061

Open
@mluksha

Description

@mluksha

Issue

The release configuration of the app crashes on iOS if authorize method is called without iosCustomBrowser option. It reproduces only with react-native v0.77.1.

- (id<OIDExternalUserAgent>)getCustomBrowser: (NSString *) browserType {
    typedef id<OIDExternalUserAgent> (^BrowserBlock)(void);
    
    NSDictionary *browsers = @{
        @"safari":
            ^{
                return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserSafari];
            },
        @"chrome":
            ^{
                return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserChrome];
            },
        @"opera":
            ^{
                return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserOpera];
            },
        @"firefox":
            ^{
                return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserFirefox];
            }
    };
    BrowserBlock browser = browsers[browserType];
    return browser();  <-- Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
}

Environment

  • Your Identity Provider: IdentityServer 4
  • Platform that you're experiencing the issue on: iOS (only release configuration)
  • Your react-native Version: 0.77.1
  • Your react-native-app-auth Version: 8.0.0
  • Are you using Expo?: 52.0.35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions