diezep / heroku-buildpack-flutter

Buildpack to compile and deploy your Flutter project on Heroku.
MIT License
39 stars 65 forks source link

No active package dhttpd #15

Open asteiman opened 1 year ago

asteiman commented 1 year ago

Compiling the app seems fine:

Screenshot 2023-05-06 at 3 04 27 AM

However in the logs:

2023-05-05T22:56:38.000000+00:00 app[api]: Build succeeded
2023-05-05T22:57:54.483665+00:00 heroku[web.1]: Starting process with command `/app/dart-sdk/bin/dart pub global run dhttpd --host 0.0.0.0 --path /app/`
2023-05-05T22:57:55.455193+00:00 app[web.1]: No active package dhttpd.
2023-05-05T22:57:55.630830+00:00 heroku[web.1]: Process exited with status 65
2023-05-05T22:57:55.672732+00:00 heroku[web.1]: State changed from starting to crashed

Am I missing something?

lovaicv commented 1 year ago

try to use my buildpack https://github.com/lovaicv/heroku-flutter

what happened? No active package dhttpd seem like the package is not activated, if the dhttpd is built successfully, you should see this below message during heroku build.

Built dhttpd:dhttpd. Installed executable dhttpd. Activated dhttpd ...

and i saw your dhttpd is restoring from cache, i would advice to download again as it wouldn't rebuild the dhttpd. the way i did is i delete and recreate the heroku app, then deploy again to rebuild.

why this happened? this buildpack is getting the a version of dhttpd which is not compatible with latest Flutter version which is required null safety, so in my buildpack i upgrade the dhttpd version and modify the dhttpd source.

hamzahbilal commented 1 year ago

I am having this same issue. After deploying to Heroku with this buildpack I get the following log output:

Compiling lib/main.dart for the Web...                             46.8s
-----> Saving Flutter SDK in Cache
-----> Getting dhttpd to run web service.
       Resolving dependencies...
The current Dart SDK version is 3.1.0.
Because pub global activate depends on dhttpd from git which doesn't support null safety, version solving failed.
The lower bound of "sdk: '>=2.7.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety
-----> Getting dhtppd to run web service.
-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
       Done: 274M
-----> Launching...
       Released v10

And the server crashes at startup with the following log output:

2023-08-18T20:09:16.579266+00:00 heroku[web.1]: Starting process with command `/app/dart-sdk/bin/dart pub global run dhttpd --host 0.0.0.0 --path /app/build/web/`

2023-08-18T20:09:17.534905+00:00 app[web.1]: No active package dhttpd.

2023-08-18T20:09:17.701165+00:00 heroku[web.1]: Process exited with status 65

2023-08-18T20:09:17.727029+00:00 heroku[web.1]: State changed from starting to crashed

I tried @lovaicv suggestion with purging the previous build cashes but it didn't fix the issue. It seems that the problem is using a not-null-safe version of dhttpd 🤔 How can I "force" the buildpack to use dhttpd 4.0.0 or later which are null safe?

diezep commented 1 year ago

Sorry, I have stopped support for this repo. I recommend to check readme, I mentioned another buildpack that can be used. Sorry for the inconvenience. On 18 Aug 2023, at 2:19 p.m., mizo @.***> wrote: I am having this same issue. After deploying to Heroku with this buildpack I get the following log output: Compiling lib/main.dart for the Web... 46.8s -----> Saving Flutter SDK in Cache -----> Getting dhttpd to run web service. Resolving dependencies... The current Dart SDK version is 3.1.0. Because pub global activate depends on dhttpd from git which doesn't support null safety, version solving failed. The lower bound of "sdk: '>=2.7.0 <3.0.0'" must be 2.12.0 or higher to enable null safety. For details, see https://dart.dev/null-safety -----> Getting dhtppd to run web service. -----> Discovering process types Procfile declares types -> (none) Default types for buildpack -> web -----> Compressing... Done: 274M -----> Launching... Released v10

And the server crashes at startup with the following log output: 2023-08-18T20:09:16.579266+00:00 heroku[web.1]: Starting process with command /app/dart-sdk/bin/dart pub global run dhttpd --host 0.0.0.0 --path /app/build/web/

2023-08-18T20:09:17.534905+00:00 app[web.1]: No active package dhttpd.

2023-08-18T20:09:17.701165+00:00 heroku[web.1]: Process exited with status 65

2023-08-18T20:09:17.727029+00:00 heroku[web.1]: State changed from starting to crashed

I tried @lovaicv suggestion with purging the previous build cashes but it didn't fix the issue. It seems that the problem is using a not-null-safe version of dhttpd 🤔 How can I "force" the buildpack to use dhttpd 4.0.0 or later which are null safe?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

lovaicv commented 1 year ago

I tried @lovaicv suggestion with purging the previous build cashes but it didn't fix the issue. It seems that the problem is using a not-null-safe version of dhttpd 🤔 How can I "force" the buildpack to use dhttpd 4.0.0 or later which are null safe?

Screenshot 2023-08-19 at 9 08 32 AM

not only you need to purge but you also need switch to use this buildpack, can you confirm that? Inside this buildpack i also modified dhttpd to support null safety

below is the message where dhttpd is built and activated successfully if you use my buildpack

Built dhttpd:dhttpd.
Installed executable dhttpd.
Activated dhttpd 4.0.2-wip from Git repository "https://github.com/lovaicv/dhttpd.git"