React Native Android sign out error

When signing out of the android application using Okta, the application crashes and this error appears:

java.lang.UnsupportedOperationException: This isn't a hierarchical URI.

I check to ensure the signout redirect URI is correct but the application keeps crashing on signout.

I can sign in just fine as well.

1 Like

Please refer to this documentation on signing users out using React Native. If you are still having issues, could you please share how you have configured the logout process in your application?

2 Likes

I use the SignOut() method to sign users out since we use a browser sign in. This is causing the application to crash.

This works fine on iOS but does not work on android.

Are you seeing the same behavior with our React Native browser sign-in sample application?

Hi @louie,

I’m seeing the same behavior with the sample application provided. The same error appears on the sample application.

Hi @M21x. I have not been able to replicate this in the sample app. Is your org an Okta Classic or an OIE org? Which version of the Okta React Native SDK are you using?

It’s classic using PKCE, seems to work fine on iOS but android crashes when signing out.

I’m using the latest version.

Are you testing this on a physical device or Android emulator? Which version of Android are you testing on?

I tried on Android 12 using an emulator, android 11 on a real device. Also using pixel and redmi

@louie Any idea why this may be happening?

@M21x Were you able to fix the issue ? as i am facing the same.