python - Heroku 应用程序崩溃 /app/.apt/opt/google/chrome/chrome 不再运行
问题描述
我的 Heroku 应用程序在运行时不断崩溃我收到以下错误:
(The process started from chrome location /app/.apt/opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
它是在 python 中使用 selenium 和 chromedriver 设置的。该应用程序使用无头浏览器在本地运行良好。但是,chromedriver 在 web 中运行时似乎无法打开 chrome。
我的 heroku 配置变量如下:
- CHROMEDRIVER_PATH = /app/.chromedriver/bin/chromedriver
- GOOGLE_CHROME_BIN = /app/.apt/opt/google/chrome/chrome
- GOOGLE_CHROME_SHIM = /app/.apt/usr/bin/google-chrome-stable
我的 Heroku 构建包如下:
解决方案
推荐阅读
- ffmpeg - 如何将当前目录中 .jpg 和 .png 类型的所有图像转换为 FFmpeg 中的视频?
- ibm-cloud-functions - 空云函数参数
- php - PHP - 如何在扩展后删除任何内容(jpg、png、gif、jpeg、svg、...)
- r - 如何将数据从密度图中的峰值拆分为 2 个分区?
- kubernetes - Kubernetes 配额队列
- git - 拉取所有主分支
- out-of-memory - 在 Ollydbg 中编辑应用程序
- virtualbox - 如何修复 VBoxClient --clipboard ,它不起作用并且没有进程 VBoxClient --clipboard 所以我无法粘贴和复制到主机
- javascript - 无法在反应中读取属性“推送”
- networkx - 测量图中节点的“远程性”