.NET buildpack fails on BeamUp – missing Python module 'tomli' during herokuish build
Hi,
I’m trying to deploy a .NET application using beamup-cli with the Herokuish builder on BeamUp, but the deployment fails consistently with the following Python error.
It happens right after dotnet publish completes successfully, so the .NET part of the build works. It looks like the Herokuish environment on BeamUp is missing the Python dependency tomli, which the buildpack expects.
Is there something I’m doing wrong, or is this a missing dependency in the BeamUp build environment?
Thanks!
INFO: Validating app name... INFO: App name is OK INFO: Validating number of addons per user... INFO: Number of addons is OK Enumerating objects: 103, done. Counting objects: 100% (103/103), done. Delta compression using up to 16 threads Compressing objects: 100% (96/96), done. Writing objects: 100% (103/103), 1015.80 KiB | 2.29 MiB/s, done. Total 103 (delta 34), reused 0 (delta 0), pack-reused 0 (from 0) remote: Resolving deltas: 100% (34/34), done. remote: ^[[1G-----> Cleaning up... remote: ^[[1G-----> Building 36f93fc7d6cb-test123 from herokuish remote: ^[[1G-----> Adding BUILD_ENV to build environment... remote: ^[[1G BUILD_ENV added successfully remote: ^[[1G^[[1G ^[[1G-----> Multipack app detected remote: ^[[1G^[[1G=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-dotnet.git remote: ^[[1G^[[1G=====> Detected Framework: .NET remote: ^[[1G^[[1G-----> SDK version detection remote: ^[[1G^[[1G Detected .NET solution:
/tmp/build/test123.slnremote: ^[[1G^[[1G Inferring version requirement from/tmp/build/test123.slnremote: ^[[1G^[[1G Detected version requirement:^10.0remote: ^[[1G^[[1G Resolved .NET SDK version10.0.100(linux-amd64) remote: ^[[1G^[[1G-----> SDK installation remote: ^[[1G^[[1G Downloading SDK from https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-linux-x64.tar.gz ...... (3.8s) remote: ^[[1G^[[1G Verifying SDK checksum remote: ^[[1G^[[1G Installing SDK remote: ^[[1G^[[1G-----> Publish app remote: ^[[1G^[[1G Runningdotnet publish /tmp/build/test123.sln --runtime linux-x64 "-p:PublishDir=bin/publish" --artifacts-path /tmp/build_artifactsremote: ^[[1G^[[1G
remote: ^[[1G^[[1G Determining projects to restore... remote: ^[[1G^[[1G Restored /tmp/build/test123.csproj (in 151 ms). remote: ^[[1G^[[1G test123 -> /tmp/build_artifacts/bin/test123/release_linux-x64/test123.dll remote: ^[[1G^[[1G test123 -> /tmp/build/bin/publish/ remote: ^[[1G^[[1G
remote: ^[[1G^[[1G Done (19.3s) remote: ^[[1G^[[1G-----> Process types remote: ^[[1G^[[1G Detecting process types from published artifacts remote: ^[[1G^[[1G Foundweb: bash -c cd bin/publish; ./test123 --urls http://*:$PORT remote: ^[[1G^[[1G No Procfile detected remote: ^[[1G^[[1G Registering detected process types as launch processes remote: ^[[1G^[[1G-----> Done (finished in 29.5s) remote: Traceback (most recent call last): remote: File "/tmp/buildpackCVeiw/lib/parse_launch_toml.py", line 21, inremote: import tomli as tomllib remote: ModuleNotFoundError: No module named 'tomli' remote: ! Failure during app build remote: ! Removing invalid image tag dokku/36f93fc7d6cb-test123:latest remote: ! App build failed INFO: command finished succesfully To a.baby-beamup.club:36f93fc7d6cb/test123 ! [remote rejected] HEAD -> master (pre-receive hook declined) error: failed to push some refs to 'a.baby-beamup.club:36f93fc7d6cb/test123' Project URL: 36f93fc7d6cb-test123.baby-beamup.club
@alesmach that might be an issue with the buildpack, u can try a community buildpack by creating a .buildpack file in the root dir of your project and putting the url of the build pack there
check https://dokku.com/docs~v0.5.8/deployment/buildpacks/
maybe jincod's build pack might be suitable https://elements.heroku.com/buildpacks/jincod/dotnetcore-buildpack
also it might be failing to detect the start command, u can manually specify it using a procfile.
and an example code will be useful for us to try to debug the main root of the issue
@dexter21767-dev Thank you for your advice.
I was able to deploy the application. I used the custom .buildpack you mentioned:
https://github.com/jincod/dotnetcore-buildpack
I also had to add a Procfile with:
web: ./heroku_output/test123
But one more thing… It looks like the Host header is wrong.
It only contains 36f93fc7d6cb-test123 instead of 36f93fc7d6cb-test123.baby-beamup.club.
Is this caused by BeamUp/Dokku, or is Cloudflare’s reverse proxy not sending the X-Forwarded-* headers?
Repo: https://github.com/alesmach/test123 Testing web: https://36f93fc7d6cb-test123.baby-beamup.club/
@alesmach there's already a PR for x-forward headers https://github.com/Stremio/stremio-beamup/pull/78 but u can use env vars for the host value until the PR is merged and deployed