Can't deploy because of wrong encoding

tradecache
PRO

4 months ago

I'm trying to deploy 2 apps, one Golang and one NextJS.

Both apps are building and running locally but fail when trying to deploy them via `railway up`.

Tried to debug the Golang first. Switched from raw build to Dockerfile but got the exact same error.

According to StackOverflow, the error I'm getting is related to the encoding of the files, but in my IDE all files in both projects are encoded in UTF-8.

I'm using IntelliJ Idea 2024.3.2 on Windows 11 24H2.

railwayapp 3.21.0 inside WSL 5.15.167.4-microsoft-standard-WSL2 using Node v22.5.1

4 Replies

4 months ago

Hello,

Please ensure all your files are indeed saved in UTF-8 encoding. Sometimes, files might appear as UTF-8 in the IDE but are saved differently. You can use a tool like iconv to verify and convert file encodings.

Best,
Brody


Status changed to Awaiting User Response railway[bot] 4 months ago


brody

Hello,Please ensure all your files are indeed saved in UTF-8 encoding. Sometimes, files might appear as UTF-8 in the IDE but are saved differently. You can use a tool like iconv to verify and convert file encodings.Best,Brody

tradecache
PRO

4 months ago

I know I can use iconv . I'm telling you that you have to do it on your side based on file mimetypes, ether before triggering the build or while copying the files for the deploy.

Since it's a problem that affects the building of the deployment, it should be an automated step in the CI rather than a manual step for the developer before committing changes for deploy.


Status changed to Awaiting Railway Response railway[bot] 4 months ago


4 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open jake 4 months ago


4 months ago

Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues here

I've made this thread public so that the community might be able to help


tradecache
PRO

3 months ago

It is literally a platform level issue, since it's your builder that has problem. If your application is uploading the wrong encoding and your builder requires all the files to be in a specific encoding, it is an issue on your side and you have to take care of it.

It makes zero sense to force all users who have this problem to manually convert the encoding of every file in their projects, when you can do it in the single place responsible for uploading and building the projects.