Not woking in emulator
Hello folks,
I am using the latest version of react-native-azure-auth. I am getting an error mentioned below while calling msGraphRequest method.
The error : {"line":24372,"column":33,"sourceURL":"http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.cipla.oneclick&modulesOnly=false&runModule=true"}
Because of this error My app not able to login successfully in Emulators, whereas it working fine in real devices.
azure .msGraphRequest({ token: tokens.accessToken, path: "me" }) .then(async (info) => { console.log( " data from AD authentication: " + JSON.stringify(info) ) }) .catch((err) => { console.log(" first catch block... ", JSON.stringify(err)); });
Dependencies
- "react": "17.0.2",
- "react-native": "0.65.1"
- "react-native-azure-auth": "1.8.1"
Manifest
`
<application
android:name=".MainApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute">
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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.package.name"
android:pathPrefix="/android/callback"
android:scheme="com.package.name" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>`
Please let me know how can I make it work in Emulators of Ios and Android