Capacitor "is not implemented on" platform in CI E2E
Capacitor plugins have per-platform implementations. When CI runs an end-to-end or unit suite against a platform where the plugin has no implementation (often web), or when sync did not register the native code, the call throws "not implemented on" that platform.
What this error means
A test or build-time check fails with "Plugin X does not have web implementation" or "X.method is not implemented on android", failing the CI job.
Error: "Camera" plugin is not implemented on web
at createPluginMethod (capacitor.js)Common causes
The plugin has no implementation for the test platform
Running web-based tests calls a native-only plugin that has no web implementation, so Capacitor throws at call time.
cap sync did not register the native plugin
After adding a plugin, sync must run so the native project registers it. Skipping sync leaves the platform without the implementation.
How to fix it
Sync after adding plugins, and guard platform calls
- Run npx cap sync after installing any plugin.
- Guard native-only calls with Capacitor.isNativePlatform() in code under test.
- Mock the plugin in web/unit tests.
import { Capacitor } from '@capacitor/core';
if (Capacitor.isNativePlatform()) {
await Camera.getPhoto({ /* ... */ });
}Register plugins by syncing in CI
Ensure cap sync runs in the pipeline so each platform picks up the plugin native code before tests or builds.
- run: npm ci && npm run build
- run: npx cap syncHow to prevent it
- Run cap sync after every plugin change.
- Guard native-only plugin calls by platform.
- Mock native plugins in web and unit tests.