オウム返しLINEbotが動作しない
解決したいこと
LINEbotを動作させたい
以下の記事の順序で簡単なLINEbotを作成しています
発生している問題・エラー
記事の通り進め、必要なファイルの入ったディレクトリをデプロイしました。
$ git push heroku master
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 432 bytes | 432.00 KiB/s, done.
Total 5 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-22 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: !
remote: ! A Python security update is available! Upgrade as soon as possible to: python-3.10.8
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
remote: !
remote: -----> No change in requirements detected, installing from cache
remote: -----> Using cached install of python-3.10.7
remote: -----> Installing pip 22.2.2, setuptools 63.4.3 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote: Done: 25M
remote: -----> Launching...
remote: Released v6
remote: https://ototsuyanbot.herokuapp.com/ deployed to Heroku
remote:
remote: Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer be available.
remote:
remote: If you have apps using any of these resources, you must upgrade to paid plans by this date to ensure your apps continue to run and to retain your data. For students, we will announce a new program by the end of September. Learn more at https://blog.heroku.com/next-chapter
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/ototsuyanbot.git
51eac1d..616e6a7 master -> master
herokuのアプリ名:ototsuyanbot
一度、デプロイは成功しています。しかしログを見ると、、、
省略
2022-10-12T14:58:54.000000+00:00 app[api]: Build succeeded
2022-10-12T14:59:15.579340+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=POST path="/callback" host=ototsuyanbot.herokuapp.com request_id=49ee186e-b53a-4e02-864e-37adc0117663 fwd="147.92.149.168" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T14:59:25.856884+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=POST path="/callback" host=ototsuyanbot.herokuapp.com request_id=e196f236-f136-45e4-97d0-00aed947e5c3 fwd="147.92.150.195" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T14:59:39.333890+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=POST path="/callback" host=ototsuyanbot.herokuapp.com request_id=9e47099c-1659-4752-9535-4a374215010b fwd="147.92.149.167" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:00:48.732658+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=POST path="/callback" host=ototsuyanbot.herokuapp.com request_id=cc610c08-0420-4483-acd6-7a318278577f fwd="147.92.149.165" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:02:12.480246+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=HEAD path="/callback" host=ototsuyanbot.herokuapp.com request_id=67c0e02a-5386-420f-888b-c06887532a02 fwd="162.43.116.112" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:02:37.060546+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/callback" host=ototsuyanbot.herokuapp.com request_id=0cf7eacf-4ef6-4909-94c0-7004fe69cbb2 fwd="116.82.50.250" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:02:37.837335+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=ototsuyanbot.herokuapp.com request_id=dd4c93cd-08d6-4fdf-8f27-5271e084c575 fwd="116.82.50.250" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:05:02.718105+00:00 app[api]: Stack changed from heroku-22 to container by user j321187@g.kogakuin.jp
2022-10-12T15:06:02.107801+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=ototsuyanbot.herokuapp.com request_id=6e4afe48-7cb4-49fe-8505-80d9fcb1e910 fwd="116.82.50.250" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:06:02.429751+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=ototsuyanbot.herokuapp.com request_id=614e6225-3957-4288-b905-1d21d15f0953 fwd="116.82.50.250" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:06:57.521789+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=ototsuyanbot.herokuapp.com request_id=959fce2c-e59b-4720-aa72-4d71dfbd6db2 fwd="116.82.50.250" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:06:57.783006+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=ototsuyanbot.herokuapp.com request_id=40a50bab-1100-4ff2-888d-cd82192a8b93 fwd="116.82.50.250" dyno= connect= service= status=503 bytes= protocol=https
2022-10-12T15:07:12.896474+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=HEAD path="/callback" host=ototsuyanbot.herokuapp.com request_id=056f8d1a-93ce-425d-9443-2fd971d656c5 fwd="162.43.116.112" dyno= connect= service= status=503 bytes= protocol=https
status=503が帰ってきてしまい、正常に動作できていないことが判明しました。
そこで、改善方法を検索しているとこの記事を発見しました。
この記事の通りに、heroku.ymlを作成してみると今度は
$ git push heroku master
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (5/5), 390 bytes | 390.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote: === Fetching app code
remote:
remote: =!= Your app does not include a heroku.yml build manifest. To deploy your app, either create a heroku.yml: https://devcenter.heroku.com/articles/build-docker-images-heroku-yml
remote: Or switch back to buildpack-based deploys: https://devcenter.heroku.com/articles/container-registry-and-runtime#changing-deployment-method
remote: !
remote: ! ## Warning - The same version of this code has already been built: f77aa1cc705b94f2c864ad96df7f1522e5267b6a
remote: !
remote: ! We have detected that you have triggered a build from source code with version f77aa1cc705b94f2c864ad96df7f1522e5267b6a
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to ototsuyanbot.
remote:
To https://git.heroku.com/ototsuyanbot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ototsuyanbot.git'
heroku masterも正常に動作しなくなってしまいました。 heroku.yml のmanifestがうまく設定できていないことは、分かるのですが指定されたページを見ても、何をどのように書き換えていいのかわからないです。
自分で試したこと
こちらの記事の2つの方法を試してみましたが、変化はありませんでした。
具体的に教えていただきたいことは
・heroku.ymlとその他必要なファイルの書き換え方
・もしくは、heroku.ymlを追加する以外に503の返答を回避する方法
です。
有識者の方々、ご教授いただけると幸いです。よろしくお願いします。