heroku - 如何在heroku中添加Mozilla firefox
问题描述
>heroku 日志 -n 10
2021-02-06T18:25:04.446002+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
2021-02-06T18:25:04.446187+00:00 app[worker.1]: response = self.execute(Command.NEW_SESSION, parameters)
2021-02-06T18:25:04.446189+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
2021-02-06T18:25:04.446382+00:00 app[worker.1]: self.error_handler.check_response(response)
2021-02-06T18:25:04.446384+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
2021-02-06T18:25:04.446562+00:00 app[worker.1]: raise exception_class(message, screen, stacktrace)
2021-02-06T18:25:04.446600+00:00 app[worker.1]: selenium.common.exceptions.SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
2021-02-06T18:25:04.446605+00:00 app[worker.1]:
2021-02-06T18:25:04.551198+00:00 heroku[worker.1]: Process exited with status 1
2021-02-06T18:25:04.629606+00:00 heroku[worker.1]: State changed from up to crashed
我正在尝试在heroku中使用instapy并在这里遇到了这个问题,看起来buildpack和路径变量有问题我已经安装了以下buildpacks来运行firefox http://github.com/buitron/geckodriver-buildpack http:/ /github.com/buitron/firefox-buildpack
这是我的配置变量
火 /usr/bin/firefox/
FIREFOX_BIN /app/vendor/firefox/firefox
GECKODRIVER_PATH /app/vendor/geckodriver/geckodriver
LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/lib:/app/vendor
路径 /usr/local/bin:/usr/bin:/bin:/app/vendor/
解决方案
推荐阅读
- powershell - 使用powershell对CSV文件中的列进行排序
- c# - 从 WPF 控件中删除名称
- ios - 将数据(标签)从 TableViewCell 传递到另一个 ViewController
- jquery - 使用居中的元素保持相同的动画
- elixir - 如何规范化 Elixir 中的数字列表?
- android - Moxy 的 MVP。未调用 Fragment 中 Presenter 的回调方法(getViewState() 不为空)
- javascript - 在 node.js 中使用 es6 类有用吗?
- batch-file - Ffmpeg - 感叹号停止水印
- google-play - 如果我停止在 Google Play 上从某个国家/地区发布我的应用会怎样?
- xml - 如何查找先前声明的设置?