1

Our SFMCSdk is initialized when the user is logged in and we clear the parameters and disable push when logging out.

On iOS there seems to be sfmc_tearDown to release the current instance, which lets you change the configuration.

How do we do the same thing on Android? I could not find any tear down method and when I call SFMCSdk.configure() again the app just crashes:

(pool-33-thread-1) > ☠☠☠ FATAL ☠☠☠ Message: Task com.salesforce.marketingcloud.events.c$a@540bc21 rejected from java.util.concurrent.ThreadPoolExecutor@8685846[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 5] Stacktrace: java.util.concurrent.RejectedExecutionException: Task com.salesforce.marketingcloud.events.c$a@540bc21 rejected from java.util.concurrent.ThreadPoolExecutor@8685846[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 5] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394) at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:630) at com.salesforce.marketingcloud.events.c.a(Unknown Source:25) at com.salesforce.marketingcloud.events.c$d.a(Unknown Source:24) at com.salesforce.marketingcloud.internal.g.run(Unknown Source:17) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

1 Answer 1

1

This has been resolved. Please update to version 8.0.3 of the SDK. At the moment there is no tearDown in the Android SDK.

5
  • I tested the 8.0.3 today and I am getting the same crash with RejectedExecutionException when calling SFMCSdk.configure() a second time. Would it be possible to get a more detailed list of the fixes/improvements for the version?
    – BMarchon
    Nov 16, 2021 at 16:41
  • Please open a support request through your account manager.
    – Bill Mote
    Nov 16, 2021 at 19:11
  • I am able to call configure multiple times without incident.
    – Bill Mote
    Nov 16, 2021 at 19:24
  • Ok I kind of figured out some bug from our side led to SFMCSdk being configured and edited (profileId/parameters) twice in parallel. Fixing it will most probably fix my RejectedExecutionException.
    – BMarchon
    Nov 18, 2021 at 8:10
  • I would be very interested in the steps to reproduce this issue. If it is readily reproducible then we can probably protect against this in the future.
    – Bill Mote
    Nov 18, 2021 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .