괴발개발/heroku

[heroku] selenium 이용 시 buildpacks문제 해결 (google-chrome, chromedriver version) error

이태원프리덤# 2021. 8. 2. 02:08
728x90

헤로쿠에서 잘되고 있던 selenium이 아래와 같이 문제

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 92
Current browser version is 91.0.4472.164 with binary path /app/.apt/usr/bin/google-chrome

삽질 결과 빌드팩은 문제 없으나 헤로쿠에서 빌드 시 캐시저장한 것이 문제였다

아래와 step과 같이 진행

 

빌드 캐시 지우기

Heroku Builds 플러그인 을 사용하여 앱의 빌드 캐시를 지울 수 있습니다 .

먼저 플러그인을 설치합니다:

heroku plugins:install heroku-builds

그런 다음 다음 명령  사용 하여 캐시를 지웁니다.

heroku builds:cache:purge -a example-app

캐시는 다음 배포 시 다시 작성됩니다. 배포할 새 코드가 없는 경우 빈 커밋을 푸시할 수 있습니다.

$ git commit --allow-empty -m "Purge cache" $ git push heroku master

여기서 appname캐시를 지우려는 앱의 이름으로 대체됩니다.

 

굳...잘된다..

728x90