Target Server-side integration for A/B testing fails in no-local environments | Community
Skip to main content
November 11, 2025
Question

Target Server-side integration for A/B testing fails in no-local environments

  • November 11, 2025
  • 2 replies
  • 118 views

Hello everyone, has anyone idea about why Target server-side integration for A/B testing in no-local environment stop working? I'm using the Target nodejs SDK with this on-device config:

export const CONFIG = { client: process.env.NEXT_PUBLIC_TARGET_CLIENT_ID, organizationId: process.env.NEXT_PUBLIC_TARGET_ORG_ID, decisioningMethod: 'on-device', pollingInterval: 500000, // 5 minutes logger: console, timeout: 10000, // 10 seconds events: { artifactDownloadFailed: (event: any) => { console.error('[Target] 🚨 Artifact download failed:', event.error.message); }, artifactDownloadSucceeded: (event: any) => { console.log('[Target] ✅ Artifact download succeeded'); }, }, };

Creating a Target client:

import TargetClient from '@adobe/target-nodejs-sdk'; const targetClient = TargetClient.create(CONFIG);

And executing the getOffers method:

await client.getOffers({ request: { context: { channel: 'web' }, execute: { mboxes: [Array] }, id: { marketingCloudVisitorId: '' }, experienceCloud: { analytics: [Object] } }, targetCookie: [String], sessionId: [String] })

For some reason, in local environment is working as expected, but not in dev environment for example. I'm seeing these logs in the terminal:

Thanks for the support!

2 replies

Adobe Employee
January 27, 2026

Hi,

 

If you are still facing this issue, can you share a curl so that I can take a look?

 

Thank you! 

Sarthak Bhatt | Senior Product Consultant | Customer Experience | Adobe  

Perrin_Ennen
Community Advisor
Community Advisor
January 28, 2026

Hi ​@LautaroCo1 ,

Verify outbound network access from dev to Adobe Target. Here's what you could try: From the dev env, verify outbound HTTPS access to https://assets.adobetarget.com -- ensure Adobe Target domains are allowed in the network configuration.

 

Ensure the SDK waits for clientReady. It could also be a timing problem -- perhaps something in the setup has changed, causing it to take longer to load. getOffers() is called before the artifact is ready. Locally, the artifact loads quickly. In dev, it may take longer.

 

Otherwise, I can imagine that the env variables are missing in dev. What you can try is to log and verify that client and organizationId are defined in dev. Use server-only environment variables, for example: TARGET_CLIENT_ID or TARGET_ORG_ID.

 

Hope this helps.