Intent filter for: BrowserTabActivity is missing. Please make sure you have the following activity in your AndroidManifest.xml

Viewed 539

I have been trying to integrate Microsoft Azure AD B2C Authentication in my react native. For this purpose, I have been using react-native-msal library. I have done all the configurations for it and followed every step from the documentation but I am getting this error:

Intent filter for: BrowserTabActivity is missing.  Please make sure you have the following activity in your AndroidManifest.xml 
<activity android:name="com.microsoft.identity.client.BrowserTabActivity">
  <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data
          android:host="com.checkmobileapp"
          android:path="/ga0RGNYHvNM5d0SLGQfpQWAPGJ8="
          android:scheme="msauth" />
  </intent-filter>
</activity>

This issue is already open on github. I have tried running different solutions including restarting the server, removed cache, clean the build folder but nothing worked. I also assured that I copied the same browsertabactivity into my AndroidManifest.xml.

1 Answers

You manifest seems to be ok. Check if these can narrow down the issue:

  1. Ask the user who is authenticating to enable a browser on their device. Recommend a browser that supports custom tabs.See if ParentActivity is required in msal exception for Android to support browsers similar to this.
  2. Please make sure the package name is correct . The package name is used for unique identification for your application. Ex: com.companyname.applicationname
  3. Try to moving to latest msal versions to reduce the run time exceptions or atleast gives msal exceptions .
  4. Please make sure the redirect_uri is registered in the app configuration(msal_config.json), and also in AndroidManifest.xml to support redirection during the authorization code grant flow.
  5. Make sure the hash signature generated is url encoded when added in redirect uri. The format of the redirect URI is: msauth://<yourpackagename>/<base64urlencodedsignature>. Also check if you have given the authority properly MSAL Android
  6. Check "authorization_user_agent" value ,if it needs to be changed
  7. If everything is configured correctly, it may be a conflict with the device you are using and we may not be sure of which device msal package is compatible .So try with latest version. Please see msal android tested browsers

References:

Related