twenty icon indicating copy to clipboard operation
twenty copied to clipboard

`inject-runtime-env.sh: not found` error during startup

Open joshuajung opened this issue 1 year ago • 7 comments

Bug Description

When running the Twenty v0.2.1 frontend as a self-deployed docker container, startup fails with an error message.

Expected behavior

The frontend starts up as expected (it did fine in v0.1.5).

Actual behavior

Startup fails with this error message:

/bin/sh: /app/front/scripts/inject-runtime-env.sh: not found

Technical inputs

I have been using Twenty in a self-deployed setup based on the supplied Dockerfiles for a few months and everything worked fine. Now I jumped from v0.1.5 to v0.2.1, and the frontend fails to start up.

I am using the Dockerfile in infra/prod/front/Dockerfile to build my frontend image and haven't changed anything else in the Twenty code.

Happy to supply additional information if it helps.

joshuajung avatar Dec 16 '23 15:12 joshuajung

I think I was able to work around this issue by modifying line 3 in the frontend Dockerfile as follows:

CMD ["/bin/sh", "-c", "/app/packages/twenty-front/scripts/inject-runtime-env.sh && serve build"]

joshuajung avatar Dec 16 '23 16:12 joshuajung

@joshuajung Have you tried rebuilding your containers? We have change the architecture (from /app/front to /app/packages-twenty-front) and I see your error mentions /app/front/scripts/inject-runtime-env.sh which is not referenced in the code anymore

charlesBochet avatar Dec 17 '23 07:12 charlesBochet

@charlesBochet I am using the repo state tagged as the v0.2.1 release, i.e. https://github.com/twentyhq/twenty/blob/f24541beda9844e138a8a0487e6dcc10b848c043/infra/prod/front/Dockerfile.

joshuajung avatar Dec 17 '23 08:12 joshuajung

mmh yes, makes sense, my bad then, we have fixed it since. Could you use main branch, it's actually more stable than 0.2.1 which was not containing healthy docker setup. We will release 0.2.2 this week which will be stable but in the meantime you can use main

charlesBochet avatar Dec 17 '23 08:12 charlesBochet

I have built twenty-front:0.2.2-canary for you, let me know how it goes

charlesBochet avatar Dec 17 '23 08:12 charlesBochet

Hi @charlesBochet, thanks a lot for your quick help! Unfortunately, I don't have an environment to test this in except my production setup right now, and the update there is still blocked by my other issue #3038. I'll be happy to test v0.2.2 as soon as I understand what's going on there.

joshuajung avatar Dec 17 '23 12:12 joshuajung

Taking a look at the other issue!

charlesBochet avatar Dec 18 '23 07:12 charlesBochet

Sorry that upgrades are still so bumpy and difficult while we're in alpha :-( Closing this issue as there hasn't been any update in a month. Please feel free to re-open one

FelixMalfait avatar Jan 17 '24 16:01 FelixMalfait

This was indeed solved in v0.2.2, sorry for not updating the issue!

joshuajung avatar Jan 17 '24 16:01 joshuajung

Great! Thank you

FelixMalfait avatar Jan 17 '24 16:01 FelixMalfait