Analytics not firing in Kepler release builds (works fine in debug)

App Name: 5 (Player)

Hey all,

We’ve hit a strange issue with Kepler builds where analytics fire as expected in debug, but in release builds the tracking packages never seem to initialize.

Details:

  • The packages in question are @cbsinteractive/dit-service-npaw and @cbsinteractive/dit-service-receiver.

  • They are present in the release bundle (confirmed by searching the output), but their classes don’t instantiate in release mode.

  • Debug vs release build configs are basically just kepler build -b Debug vs kepler build -b Release. No meaningful differences in package.json or metro.config.js.

  • Confirmed reproducible on multiple devices, so not an environment-specific cache/consent issue.

What we’ve tried/observed:

  • Added logging in the packages: works in debug, but never fires in release.

  • Bundle inspection shows that the code is making its way in to the build, but not actually running.

Has anyone witnessed similar behaviour? As far as we can tell we’re not doing anything especially different between packages that ultimately run fine, and the analytics packages that don’t seem to.

The App team reports that no errors come out in the logging when running the release build.

I have also attached the app’s package.json, and can provide VPKG files if that helps (however I can’t upload them to this post due to the forum’s restrictions).

package.json (9.4 KB)

Hi @AyaSte
Welcome to Amazon Developer community!
Please share the VPKG files via your Amazon contacts, that will allow us to look into this further.
Warm regards,
Ivy

Hi @Ivy_Mahajan

Thanks for getting back to me. I’ve shared them with my Amazon contact, Levon, who has said he’ll take care of that.

Thanks!

-Aya

1 Like

Hi, we have since resolved this issue. It turns out that the Metro minifier was mangling the function names and so they couldn’t find each other. We have resolved this by passing in a terser config to prevent the mangling of fnames. Thanks!

1 Like