1

SDK Version: 8.1.5

implementation 'com.salesforce.marketingcloud:marketingcloudsdk:8.1.5'

Issue: when setting the profileId the value is not synchronized with the SF backend. Furthermore, it seems like the device is not registered on the SF console at all, we can't reach it with notifications.

 fun registerUserToSalesForce(salesForceId: String?) { salesForceId ?: return SFMCSdk.requestSdk { sdk -> sdk.identity.setProfileId(salesForceId) } } 

Other issues we found:

 fun registerUserToSalesForce(salesForceId: String?) { salesForceId ?: return SFMCSdk.requestSdk { sdk -> sdk.identity.setProfileId(salesForceId) sdk.mp { --> the code never enters here it.moduleIdentity.profileId } --> the map object returned here is not the one from the documentation at all https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/trouble-shooting/trouble-shooting-push-setup.html (sdk.getSdkState()["PUSH"] as JSONObject).let { Timber.d("this") } } } 
5
  • If your code is never getting to the sdk.mp { } code then the Marketing Cloud SDK did not successfully complete initialization. Turn on logging and look at logcat. The SDK is very good at telling you what you've done wrong. If that fails, open a support case -- but know that the first thing you're going to be asked for is logs so you might as well give it a go ;) Commented Jun 3, 2024 at 12:31
  • So it turned out that when initialising the SDK I had a duplicated line of code, something like SFMCSdkModuleConfig.build { SFMCSdkModuleConfig.build { pushModuleConfig = MarketingCloudConfig.builder().apply { [...] } } } Notice the double SFMCSdkModuleConfig.build. The SDK wouldn't log any error nor the compiler would, but then it wouldn't work at runtime. My bad for the mistake, but I'd expect at least some compiling error. Thanks for your help @BillMote Commented Jun 4, 2024 at 13:37
  • Interesting. I would have never guessed that as a potential problem. The logging should have noted somewhere that the module was not successfully initialized in time. Now I've gotta go try this. hahaha Commented Jun 4, 2024 at 15:09
  • I was able to get this ``` D ~~ SFMCSdk v1.0.4 Initialization Started ~~ D Initializing 0 modules. D Module init latch time exceeded: false D SFMC SDK Ready took 1ms. D ~~ SFMCSdk Initialization Complete ~~``` With the key being Initializing 0 modules, but yeah, that's not going to be an obvious issue to a customer. I'll present this to the team and maybe we'll beef up the logging around that. Commented Jun 4, 2024 at 15:26
  • 1
    Yeah I noticed that but I thought that was just the standard log for the initialised SDK :-) Thanks! Commented Jun 5, 2024 at 16:03

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.