Leanplum/Leanplum-JavaScript-SDK

Variables not pulled from Leanplum API

fbcouch opened this issue · 1 comments

Expected Behavior

Leanplum.getVariables() should output the variable values from the Leanplum Dashboard.

Actual Behavior

Leanplum.getVariables() only outputs whatever was set with Leamplum.setVariables.

Steps to Reproduce the Problem

`. Use the following code to initialize Leanplum:

if (config.leanPlum.appId) {
  if (config.leanPlum.devMode) {
    Leanplum.setAppIdForDevelopmentMode(config.leanPlum.appId, config.leanPlum.devKey);
  } else {
    Leanplum.setAppIdForProductionMode(config.leanPlum.appId, config.leanPlum.prodKey);
  }
  Leanplum.setVariables({
    registerWithSocial: false,
  });
  Leanplum.start(success => {
    console.log('Leanplum started', success, Leanplum.getVariables());
  });
}
  1. Observe the output:

Screen Shot 2023-05-09 at 2 09 59 PM

Specifications

  • Version: 1.11.0
  • Platform: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' (same results in Safari)
  • Subsystem: ???

OK, I realized that I had misconfigured things here – the actual problem I'm having seems to be more with the mparticle leanplum kit rather than the Leanplum SDK itself.