Skip to main content
Solved

Frontend extension runner not available

  • 25 July 2024
  • 5 replies
  • 71 views

Hello!

Have you ever encountered that the extension runner in the Frontend solution is not available during Netlify build? And if so, how are you (consistently) getting over this issue?

It used to happen from time to time and I would usually merge a dummy commit in the branch which would trigger a new build. In the past I’ve also had tests fail in the pipeline (Studio CI) but it wouldn’t show in the CI dashboard. This case would also make the Netlify build fail with the same reason, but this time it’s not the case because I can see my branch pipeline finished successfully.

Also, interestingly enough, it’s only failing in one environment (staging). 

This time the extension is simply not accessible, but I’ve had cases where the version was not a match, or even the extension was responding but the short commit hash was undefined (it was still seen as a miss-match)  

 

This time it’s quite stubborn because I’ve tried commits, new branches, rebases, manually triggering the build from Netlify, to no avail.

I am following up on this one with the Support team, but I was wondering how others are reacting to this issue, because it’s quite disruptive (PRs pile up, QA cannot be done on previews, etc).

 

All the best,
Alex

Hi @Alex, have you heard any news from the support team? Sorry we didn’t give you a hand over the weekend, for some reason your post fell through the moderation cracks. 🤔  Calling the cavalry anyway, somebody might be able to help you. 


Hi @Lily!

Sorry for the late reply, but I was on vacation at the time my question got published, as well as when you asked about an update.
I’ve been meaning to come back to this, because right before my leave the support team managed to fix this.

The solution is quite straightforward, but was somehow overlooked since the beginning of the project.

The Netlify plugin which can be seen in my screenshot is not needed for multi-tenant projects (as the one I’m currently working on), so we removed it and also updated next.config.js to pass the commit hash to NEXT_PUBLIC_EXT_ID variable directly.

Since this action was taken, the builds went smoothly (or at least I haven’t heard any complains from my colleagues) 😅

I hope this will help others with similar use-cases!


Hey @Alex! Hope you had a nice vacation 🍹😎 Brilliant, it’s great to hear the issue was resolved and it will definitely help people in the future. 

Btw, thanks for the update! 😉 

 

 


@Alex Do you mind sharing the next.config.js setup for future reference?


Sure thing @James Luterek !
The update to next.config.js was adding the “env” property in the config variable:
 

const config = {
...
env: {
NEXT_PUBLIC_EXT_BUILD_ID: process.env.NEXT_PUBLIC_EXT_BUILD_ID ?? JSON.stringify(process.env.NETLIFY ? process.env.COMMIT_REF.substring(0, 7) : 'staging'),
},
...
}

Also, removing @commercetools/frontend-netlify-plugin from package.json as well as the corresponding plugin definition in netlify.toml.
 

maplugins]]
package = "@commercetools/frontend-netlify-plugin"

 

An added benefit I forgot to mention before is that the Netlify builds take less time now, since there is no retry mechanism that waits for the extension runner to be available with the expected commit hash. 


Reply