Anvil
Troubleshooting

Overview

Locate the failure stage before changing the scenario or repeating a test.

Run the smallest failing test in your consumer project, keeping its distribution pins unchanged:

./gradlew anvilTest --tests 'com.example.test.PlayerJoinTest' --rerun-tasks

Replace the test class with yours. Read the Gradle test report and the first exception cause. For process failures, find the named process's anvil-console.log in its workspace below the configured workDirectory, normally build/anvil.

Choose the failure stage

SymptomGuide
EULA, distribution, provider, Java, or startup failureStartup and provisioning
Login, capability, native-version, identity, or routing failurePlayers and routing
Missing diagnostics, locked directories, or shutdown failureCleanup and retained files
Scenarios do not appear or load in IntelliJ IDEAIntelliJ IDEA plugin

Read the exception contract

ExceptionMeaningNext check
ScenarioValidationExceptionA declaration cannot run as configured, or a player's protocol library or release is refusedCorrect the named declaration, library choice, or support policy before retrying
ProvisioningExceptionAn artifact, Java installation, or workspace could not be preparedInspect the reported path, URI, checksum, and original cause
ProcessExceptionA process could not start, communicate, or stopUse getProcessName() to find its console and workspace
ScenarioStartupExceptionA scenario setup hook failedUse getScenarioName() and inspect the setup failure in getCause()
CapabilityUnavailableExceptionA player lacks a requested capabilityCheck installed wiring and the reason the player's worker reported, such as a member missing from its release

The general exceptions live in me.whereareiam.anvil.api.exception; scenario exceptions are in its scenario subpackage. They extend AnvilException. A setup assertion can retain its original assertion type, so use the stage and cause as well as the exception class. Provider implementations can report their own exceptions.

Engine startup and lifecycle failures can retain workspaces. A JUnit test-body assertion alone has different retention behavior in the current integration; read Cleanup if the expected files are missing. If the cause remains unclear, collect a minimal issue report.

On this page