Expand my Community achievements bar.

SOLVED

Adding Launch tag to localhost, getting 503 errors (service unavailable)

Avatar

Level 2

Hi there,

I'm trying to get Launch updated on a section of our website. We're just updating the old library to a new one, so it's just tweaking the embed code.

The dev team have reported back that they're getting a bunch of 503 errors when they're deploying on localhost which is worrying them. I think this is somewhat expected because the tags (e.g. Twitter, Snapchat, Google Ads, etc.) need access to a web server in order to retrieve the necessary files.

I've switched out the old library for the new one using the Experience Cloud debugger in a non-production envrionment and there aren't any issues.

I'm wondering if this is expected, or if there's something I need to do in Launch to prevent this. Note, I don't want to add an exception to every rule to prevent it running locally, because that seems like overkill.

Many thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 2

It was just the generic 503 service unavailable error e.g. 'Failed to load resource: the server responded with a status of 503 (Service Unavailable)' with the server location of the tag library rather than a location in the Launch library i.e. Launch was deploying the tag to the page, but then the tag itself couldn't load in the necessary scripts in the JS library.

It was indeed because their local environment had some settings that was preventing the application from making calls to domains outside of certain whitelisted ones.

View solution in original post

2 Replies

Avatar

Community Advisor

You didn't mention this in your post, but did your developers share any specifics about those 503 errors? E.g. screenshots of the errors in their browsers' consoles, copies of the full error messages, the line(s) in the Launch library that are throwing the errors, etc.

While your reasoning is sound, there could be other reasons for the 503 errors, and instead of relying on your assumptions, it would be good to ensure that you're really fixing or overcoming the actual problems.

Avatar

Correct answer by
Level 2

It was just the generic 503 service unavailable error e.g. 'Failed to load resource: the server responded with a status of 503 (Service Unavailable)' with the server location of the tag library rather than a location in the Launch library i.e. Launch was deploying the tag to the page, but then the tag itself couldn't load in the necessary scripts in the JS library.

It was indeed because their local environment had some settings that was preventing the application from making calls to domains outside of certain whitelisted ones.