Closed bgrajesh57 closed 3 weeks ago
@bgrajesh57 In your react native code, you import the Identity library from @adobe/react-native-aepedgeidentity (Identity for Edge Network)
In your android and iOS native code, you registered with import com.adobe.marketing.mobile.Identity (which is the identity for Experience Cloud ID Service)
They are two different identities libraries.
From your native code registration info, it seems like you are sending data to the solutions directly, not going through edge network. In this case, in your react native, you need to remove import {Identity} from '@adobe/react-native-aepedgeidentity';
And import {Identity} from '@adobe/react-native-aepcore';
Identity.getExperienceCloudId() .then(cloudId => console.log('experience Cloud id: ' + cloudId)) .catch(error => console.log('experience cloud id Error: ' + error)); };
Another thing, in your native code you have registered Assurance, Analytics. How did you get these extensions? I don't think you install them from react native dependencies, right?
Looking at your Android and iOS native registration code, it doesn't seem like you are using any aepedge libraries, however, you have them installed in react native dependencies.
What features you are trying to use?
@cacheung Thanks for the clarification 👍
When I import Identity from @adobe/react-native-aepcore I can see the Experience cloud id for iOS. For Android still I can see time out error. Please assist me on this.
Android Error:
import {Identity, MobileCore, PrivacyStatus} from '@adobe/react-native-aepcore';
Identity.getExperienceCloudId()
.then(cloudId => console.log('experience Cloud id: ' + cloudId))
.catch(error => console.log('experience cloud id Error: ' + error));
Error: getExperienceCloudId returned an unexpected error: general.callback.timeout
@cacheung We want to track analytics for the app. We want to use below methods.
MobileCore.trackState,
MobileCore.trackAction
In that we don't need for below dependency lib for React native? Please confirm , But in the documentation mentioned below lib required to install.
"@adobe/react-native-aepedge": "^2.0.0",
"@adobe/react-native-aepedgeidentity": "^2.0.0",
"@adobe/react-native-aepedgeconsent": "^2.0.0",
Which documentation you are referring to? For using AEP-prefix mobile sdk and sending data to Analytics, please take a look of this faq.
In your native code, you have for Android
import com.adobe.marketing.mobile.Analytics;
Analytics.registerExtension();
How did you get the Analytics extension?
Hi @cacheung Form Android registered import com.adobe.marketing.mobile.Analytics; and import com.adobe.marketing.mobile.MobileCore;
For you reference source below.
import com.adobe.marketing.mobile.AdobeCallback;
import com.adobe.marketing.mobile.Analytics;
import com.adobe.marketing.mobile.Assurance;
import com.adobe.marketing.mobile.Identity;
import com.adobe.marketing.mobile.InvalidInitException;
import com.adobe.marketing.mobile.Lifecycle;
import com.adobe.marketing.mobile.LoggingMode;
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Signal;
import com.adobe.marketing.mobile.UserProfile;
MobileCore.setApplication(this);
MobileCore.setLogLevel(LoggingMode.DEBUG);
try {
Assurance.registerExtension();
Analytics.registerExtension();
UserProfile.registerExtension();
Identity.registerExtension();
Lifecycle.registerExtension();
Signal.registerExtension();
MobileCore.configureWithAppID(getString('adobe_ID'));
MobileCore.start(new AdobeCallback() {
@Override
public void call(Object o) {
MobileCore.lifecycleStart(null);
}
});
} catch (InvalidInitException e) {
}
From React native to get the ECID getting below error. Pease let me know anything we missed out.
import {Identity, MobileCore, PrivacyStatus} from '@adobe/react-native-aepcore';
Identity.getExperienceCloudId()
.then(cloudId => console.log('experience Cloud id: ' + cloudId))
.catch(error => console.log('experience cloud id Error: ' + error));
Error: getExperienceCloudId returned an unexpected error: general.callback.timeout
@cacheung I can see the experienceCloudId form Android as well :)
Hi,
We have update the latest adobe npm,
"@adobe/react-native-aepcore": "^6.0.0",
"@adobe/react-native-aepedge": "^6.0.0",
"@adobe/react-native-aepedgeidentity": "^6.0.0",
"@adobe/react-native-aepedgeconsent": "^6.0.0",
Now we can see below error again in Android alone, Please assist us.
Error: getExperienceCloudId returned an unexpected error: general.callback.timeout
Hi @bgrajesh57,
Can you attach the logs for this. Is there a pattern, is it happening more on app first launches? If the configuration and extensions are correctly installed. You will need to add retry mechanism to getECID API i.e. if you get timeout error you can retry calling the getECID API. Limit the number of retries based on the tolerance of the app. Before that still need to check if timeout is solely due to processing like downloading configuration to check for privacy status and then responding with ECID.
@bgrajesh57 Have you got this issue resolved?
@cacheung its resolved , thanks
getExperienceCloudId returning "time out error" form React native.
Adobe React native setup done based on the documentation. Please Let me know any library and configuration is missing.
React Native :
iOS:
Android:
Expected Behaviour
getExperienceCloudId API should return value.
Actual Behaviour
getExperienceCloudId API should return value.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Call Identity.getExperienceCloudId() function on react native App.
Platform and Version
iOS Android
Sample Code that illustrates the problem
Looking forward to hear form you ASAP. Thanks.