I get an application error when opening app - heroku

On Heroku i can build the app perfectly fine but when i try to open it, it says to check the logs. This is the log:
-----> Python app detected
-----> No change in requirements detected, installing from cache
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
-----> Discovering process types
Procfile declares types -> worker
-----> Compressing...
Done: 80.4M
-----> Launching...
Released v4
https://nedtrainbot.herokuapp.com/ deployed to Heroku

Dyno workers are for background jobs: It runs in the background to perform some logic, batch processing or even accessing services over HTTP. It cannot respond to incoming requests.
You will have to use a Web Dyno to be able to see something when opening the application with the browser: this typically calls the home of your application. You need to use some web framework (ie Django) or library (ie Flask) to get the incoming request and respond to it

Related

ML heroku deployment

I get an error message when i try to push my heroku app. I have a runtime.txt with the text python-3.7.10, i have a requirements.txt, i have a Procfile and im not really sure what's missing. python 3.7.10 is a supported runtime. Can anyone help me, im really stuck. It keeps saying "Requested runtime (Python-3.7.10) is not available for this stack (heroku-20)". Thanks in advance!
<<-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Python app detected
-----> Using Python version specified in runtime.txt
! Requested runtime (Python-3.7.10) is not available for this stack (heroku-20).
! Aborting. More info: https://devcenter.heroku.com/articles/python-support
! Push rejected, failed to compile Python app.
! Push failed>>
Heroku-20 is the default stack for newly created apps: within this stack you can use different languages and versions.
In case of Python the supported versions are:
python-3.9.7
python-3.8.12
python-3.7.12
python-3.6.15
You runtime.txt sets Python-3.7.10 which is not supported: correct the version or remove the file (relying on the default version python-3.9.7).

How to change IBM-Cloud cloudfoundry golang app version?

When I run command ibmcloud target --cf && ibmcloud cf restart appname, it showed an error, it seems like golang version is invalid, but I can't change it to specify version without root permission, or can it be an old version by creating container for instance?
Downloading app package...
Downloaded app package (20.8K)
-----> Go Buildpack version 1.9.16
**WARNING** [DEPRECATION WARNING]:
**WARNING** Please use AppDynamics extension buildpack for Golang Application instrumentation
**WARNING** for more details: https://docs.pivotal.io/partners/appdynamics/multibuildpack.html
-----> Checking Godeps/Godeps.json file
-----> Installing godep 80
Download [https://buildpacks.cloudfoundry.org/dependencies/godep/godep-v80-linux-x64-cflinuxfs3-b60ac947.tgz]
-----> Installing glide 0.13.3
Download [https://buildpacks.cloudfoundry.org/dependencies/glide/glide-v0.13.3-linux-x64-cflinuxfs3-ef07acb5.tgz]
-----> Installing dep 0.5.4
Download [https://buildpacks.cloudfoundry.org/dependencies/dep/dep-v0.5.4-linux-x64-cflinuxfs3-79b3ab9e.tgz]
**ERROR** Unable to determine Go version to install: no match found for 1.11.x in [1.13.14 1.13.15 1.14.6 1.14.7]
Failed to compile droplet: Failed to run all supply scripts: exit status 16
Exit status 223
Cell e0f8b881-1ded-45a7-a004-101d32dc7f6d stopping instance 3d1adec5-7f49-47a1-8005-e25e83521422
Cell e0f8b881-1ded-45a7-a004-101d32dc7f6d destroying container for instance 3d1adec5-7f49-47a1-8005-e25e83521422
Error staging application: App staging failed in the buildpack compile phase
It seems your environment is configured for an older Golang version. And the version was not found in the installed, available buildpacks. You could either look into your manifest and other config files what version is set. Or you could switch to a different buildpack by using the manifest attribute or a command option (see ibmcloud cf push --help to list the buildpack option).
You can specify Go version in the manifest.yml file like this
---
applications:
- name: my-app-name
env:
GOVERSION: go1.8
Supported Go versions can be found in the release notes.
Also, refer getting started with GO guide to understand how to work with GO app on Cloud Foundry

Difficulties deploying Flask app to Heroku

I am trying to deploy a Flask app to Heroku and I keep getting this error. Anyone who can help me with this?
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (9/9), 3.06 KiB | 184.00 KiB/s, done.
Total 9 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to expensetracker-api-heroku.
remote:
To https://git.heroku.com/expensetracker-api-heroku.git
! [remote rejected] secret-branchh -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/expensetracker-api-heroku.git'
Based on the UPDATED question, the error message is hinting at the problem:
No default language could be detected for this app.
You need to tell Heroku what kind of app you are deploying. For Python apps (i.e. Flask), you need to have one of the following files in your top-level git directory, as described in the Expected files for Python section of Deploying Python and Django Apps on Heroku docs:
Heroku automatically identifies your app as a Python app if any of the
following files are present in its root directory:
requirements.txt
setup.py
Pipfile
If none of these files is present in your app’s root directory, the
Python buildpack will fail to identify your application correctly.
Take note of the the warning at the end that if none of the files are present, the Python buildpack will faill.
The simplest here is to add a requirements.txt file. You can generate this by doing:
pip freeze > requirements.txt
and it looks like this:
Flask==1.0.2
Flask-Scss==0.5
gunicorn==19.7.1
isort==4.3.3
itsdangerous==0.24
Jinja2==2.10.1
...
Add that to the top-level of your git directory.
Then, for Flask, you need to add a couple more files:
runtime.txt
This specifies the Python version of your app, as described in Specifying a Python Runtime
python-3.7.3
Procfile
This is described in this post Heroku Flask Tutorial Procfile Meaning and I suggest you take a look. The contents depends on how you instantiated your Flask app instance, and it looks like this:
web: gunicorn app:app --log-file=-
If you're still having problems, I highly recommend going through the Heroku tutorial docs, especially Getting Started on Heroku with Python.

Aqueduct heroku deployment problems

I am trying to follow the official tutorial on how to deploy apps on Heroku
I am however getting the following error:
remote: Precompiled aqueduct:aqueduct.
remote: Precompiled test:test.
remote: *** Running pub build
remote: Building with "pub build"
remote: Dart 2 has a new build system. Learn how to migrate from pub build and
remote: pub serve: https://webdev.dartlang.org/dart-2
remote: ! Push rejected, failed to compile Dart app.
I can't seem to find any hints on what I can change to fix the error (It shouldn't really be using pub build or serve. unless aqueduct calls it under the hood)
have a web folder in the root of your project causes the buildpack to try and run 'pub build'

How to deploy a Suave.IO project with Heroku

This is my first time using heroku and I'm having some troubles deploying my small Suave web app. After reviewing the docs here, I understand that I need to set up a Procfile so that heroku knows how to run my application.
Here's a picture of my basic file structure:
And my Procfile contains only a single line:
web: mono /bin/Debug/SuaveTest.exe
After pushing these files to heroku, I get an error when trying to view the application.
I'm obviously doing something wrong here and I definitely would appreciate any and all help to get this running.
EDIT
I've changed my project settings to target .NET 4.5 instead of 4.5.1. This removed some warnings during my build. After changing my Procfile to the following :
web: mono bin/Release/SuaveTest.exe
I'm still receiving the same application error when visiting the site, even though the build says everything went well. I am suspicious that the root cause of all my issues is because heroku is unable to discover what process types I'm using in my project (which you can see below).
remote: Build succeeded.
remote: 0 Warning(s)
remote: 0 Error(s)
remote:
remote: Time Elapsed 00:00:04.4188560
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote: Done: 69.2M
remote: -----> Launching...
remote: Released v15

Resources