Skip to content

Fix token refresh by ensuring Google Chrome is installed#23

Open
konard wants to merge 3 commits intomainfrom
issue-5-ec6daede
Open

Fix token refresh by ensuring Google Chrome is installed#23
konard wants to merge 3 commits intomainfrom
issue-5-ec6daede

Conversation

@konard
Copy link
Copy Markdown
Owner

@konard konard commented Oct 17, 2025

Summary

Fixes #5 - Resolves the token refresh failure when Google Chrome is not installed on the target machine.

Problem

When the VK access token expires, the execute.sh script attempts to automatically refresh it using selenium-side-runner, which requires Google Chrome to automate the browser login flow. However, if Chrome is not installed on the system, selenium-side-runner fails with:

Server terminated early with status 2

This prevents automatic token refreshing from working.

Solution

Modified execute.sh to check if Google Chrome is installed before attempting token refresh. If Chrome is not found, the script automatically runs the existing install-google-chrome.sh script to install it.

Changes

  • Added Chrome detection using command -v google-chrome
  • Automatically triggers Chrome installation via install-google-chrome.sh if needed
  • Ensures selenium-side-runner has the required browser dependency before execution

Testing

The fix ensures that:

  1. If Chrome is already installed, token refresh works as before (no change in behavior)
  2. If Chrome is missing, it gets installed automatically before attempting token refresh
  3. The install-google-chrome.sh script is executed with proper permissions

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
@konard konard self-assigned this Oct 17, 2025
When the access token expires, the script attempts to refresh it using selenium-side-runner, which requires Google Chrome. This commit adds a check to verify Chrome is installed before attempting token refresh, and automatically installs it if missing using the existing install-google-chrome.sh script.

Fixes #5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Fix issue with token refreshing Fix token refresh by ensuring Google Chrome is installed Oct 17, 2025
@konard konard marked this pull request as ready for review October 17, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix issue with token refreshing

1 participant