概要
■herokuのBuildpackにchromedriverを追加してgit push heroku master すると、pushがリジェクトされる
・chromedriverのURL
https://github.com/heroku/heroku-buildpack-chromedriver.git
下記エラーが表示されてpushがリジェクトされます。
buildpackからchromedriverを削除すると正常にpushできます。
remote: -----> Downloading chromedriver v89.0.4389.82... remote: Archive: /tmp/chromedriver.zip remote: End-of-central-directory signature not found. Either this file is not remote: a zipfile, or it constitutes one disk of a multi-part archive. In the remote: latter case the central directory and zipfile comment will be found on remote: the last disk(s) of this archive. remote: unzip: cannot find zipfile directory in one of /tmp/chromedriver.zip or remote: /tmp/chromedriver.zip.zip, and cannot find /tmp/chromedriver.zip.ZIP, period. remote: ! Push rejected, failed to compile chromedriver app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to [app_name]. remote: To https://git.heroku.com/[app_name].git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/[app_name].git'
requirements.txt
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
Flask==1.1.2
future==0.18.2
gunicorn==20.0.4
heroku==0.1.4
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.3
line-bot-sdk==1.19.0
MarkupSafe==1.1.1
python-dateutil==1.5
requests==2.25.1
selenium==3.141.0
urllib3==1.26.3
Werkzeug==1.0.1
備考
■Build Packs
heroku/python
https://github.com/heroku/heroku-buildpack-google-chrome.git
https://github.com/heroku/heroku-buildpack-chromedriver.git
■heroku環境変数
heroku config:set CHROME_DRIVER_PATH=chromedriver
heroku config:set CHROME_BINARY_LOCATION=/app/.apt/usr/bin/google-chrome
■仕様
・LINEの1v1トークで特定キーワードを投稿すると、seleniumでChromeを立ち上げて特定キーワードで検索し、その結果をLINEトークに返す。
■その他
・ローカル環境にてプログラム自体は問題なく動作しています。
試したこと
・heroku上でアプリを削除、再作成
・requirements.txt/Procfile/runtime.txtの再作成
・その他諸々……
あなたの回答
tips
プレビュー