teamcapybara/capybara · error · Capybara::FrozenInTime
Time appears to be frozen. Capybara does not work with libra
Error message
Time appears to be frozen. Capybara does not work with libraries which freeze time, consider using time travelling instead
What it means
Error "Time appears to be frozen. Capybara does not work with libraries which freeze time, consider using time travelling instead" thrown in teamcapybara/capybara.
Source
Thrown at lib/capybara/helpers.rb:110
elsif defined?(Process::CLOCK_MONOTONIC)
def monotonic_time; Process.clock_gettime Process::CLOCK_MONOTONIC; end
else
def monotonic_time; Time.now.to_f; end
end
def timer(expire_in:)
Timer.new(expire_in)
end
class Timer
def initialize(expire_in)
@start = current
@expire_in = expire_in
end
def expired?
if stalled?
raise Capybara::FrozenInTime, 'Time appears to be frozen. Capybara does not work with libraries which freeze time, consider using time travelling instead'
end
current - @start >= @expire_in
end
def stalled?
@start == current
end
private
def current
Capybara::Helpers.monotonic_time
end
end
end
end
View on GitHub (pinned to 15b5fdb76e)
When it happens
Trigger: Thrown at lib/capybara/helpers.rb:110 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of teamcapybara/capybara@15b5fdb76e (2026-08-21).
Data as JSON: /api/errors/64ef84358576f204.
Report an issue: GitHub.