CLI Issues
stac: command not found
Problem: The Stac CLI is not installed or not in your PATH.
Solution:
- Reinstall the CLI:
- macOS / Linux
- Windows
- Restart your terminal
- Verify installation:
stac --version
stac login fails
Problem: Authentication fails or browser doesn’t open.
Solutions:
- Ensure you have a stable internet connection
- Try running with
stac login --verbosefor more details - Clear cached credentials:
stac logoutthenstac login - Check if your firewall is blocking the authentication callback
stac build shows no files
Problem: Running stac build finds no Dart files to process.
Solutions:
- Ensure your files are in the
stac/folder - Check that files have the
.dartextension - Verify functions have the
@StacScreenannotation:
stac deploy permission denied
Problem: Deployment fails with permission errors.
Solutions:
- Run
stac loginto refresh credentials - Verify you have write access to the project in Stac Cloud
- Check your project configuration in
default_stac_options.dart
Runtime Issues
Widget not rendering
Problem: A widget appears blank or doesn’t show. Common causes:- Missing required property: Check the widget documentation for required properties
- Invalid JSON syntax: Validate your JSON structure
- Type mismatch: Ensure property types match (e.g.,
doublevsint)
“Unknown widget type” error
Problem: Stac doesn’t recognize a widget type. Solutions:- Check spelling of the
typefield - Verify the widget is supported (see Widgets)
- If using a custom widget, ensure the parser is registered:
Actions not firing
Problem: Button presses or gestures don’t trigger actions. Solutions:- Check action type spelling:
- Verify action structure:
- Check if the widget supports the action property:
Not all widgets support
onPressed,onTap, etc.
State not updating
Problem:StacSetValueAction doesn’t update the UI.
Solutions:
- Verify key names match:
- Check placeholder syntax:
Network Issues
Network request fails
Problem:StacNetworkRequest returns errors.
Debug checklist:
- Check URL format:
- Verify headers:
- Handle all status codes:
CORS errors (web)
Problem: Network requests fail on Flutter web due to CORS. Solutions:- Configure your API server to allow CORS
- Use a proxy server during development
- For Stac Cloud, requests are proxied automatically
Build Issues
Dart compile errors
Problem:stac build fails with Dart errors.
Common fixes:
- Missing imports:
- Trailing commas: Dart benefits from trailing commas:
- Run
flutter pub getto ensure dependencies are resolved
Generated JSON differs from expected
Problem: The JSON output doesn’t match what you expected. Debug steps:- Check
stac/.build/for generated files - Compare with expected JSON structure
- Verify property names (Dart uses camelCase, JSON may differ)
Stac Cloud Issues
Screen not updating after deploy
Problem: App shows old content afterstac deploy.
Solutions:
- Force refresh in app: Restart the app completely
- Check deployment success: Look for success message in CLI
- Verify project ID: Ensure
default_stac_options.darthas correct project ID - Check cache config: If using caching, try using
StacCacheStrategy.networkFirstto ensure latest content is fetched
”Project not found” error
Problem: CLI can’t find your Stac Cloud project. Solutions:- Run
stac initto reinitialize - Verify project exists in console.stac.dev
- Check
default_stac_options.dartfor correct project ID
Getting Help
If you’re still stuck:- Search existing issues: GitHub Issues
- Ask the community: Discord
- Report a bug: Create a new issue with:
- Stac version (
stac --version) - Flutter version (
flutter --version) - Minimal reproduction code
- Error messages/stack traces
- Stac version (