CLI Troubleshooting Guide
Common issues and solutions for the Workato CLI (wk), Salesforce CLI (sf), and environment setup.
Quick Diagnosis Commands
Run these to quickly identify issues:
# Check Node.js
node --version # Need 20+
# Check Workato CLI
wk version # Should show version
wk auth status # Should show authenticated profile
# Check Salesforce CLI
bin/sf --version # Should show version
# Check overall status
make status # Shows both CLIs
make doctor # Detailed diagnostics
Workato CLI Issues
Issue: “wk: command not found”
Solution:
macOS/Linux:
brew install workato/tap/wk
Windows:
scoop install wk
Verify: wk version
Issue: “Not authenticated” or Auth Failures
Symptoms:
Error: not authenticated
Error: Unauthorized
Diagnosis:
wk auth status
# Should show Profile, Workspace, Environment, Region, API status
Solutions:
- Re-run authentication:
make workato-login - Verify your token in the root
.envfile:# Should be a long token string, no extra spaces or newlines WORKATO_API_TOKEN=wrkatrial-eyJ0eXAiOi... - If the token was regenerated in Workato, update
.envand re-runmake workato-login
Issue: API Token Not Working
Symptoms:
Error: Unauthorized
Error: Invalid API key
Error: Forbidden
Solutions:
- Ensure token is copied correctly (no extra spaces or newlines)
- Verify API client permissions in Workato UI:
- Workspace Admin → API Clients → your client
- Required permissions:
- Projects → Project Assets (all)
- Projects → Recipe Lifecycle Management (all)
- Tools → API Platform (all)
- Admin → Workspace Details (all)
- Admin → Developer API clients (all)
- Regenerate token if expired
Issue: “make workato-init” Fails
Symptoms:
- Command errors or no output
Solutions:
- Check that
wk auth statusshows a valid profile - Ensure you’re in the
dewy-resortroot directory - Try running with verbose output:
make status tool=workato
Issue: “make push” Fails
Symptoms:
Error: project not initialized
Error: no recipes found
Solutions:
- Run
make workato-initfirst — this creates the local project scaffold - Verify the
workato/recipes/directory contains.recipe.jsonfiles - Lint warnings during push are expected and will not block deployment
Salesforce CLI Issues
Issue: “sf: command not found” after install
Diagnosis:
ls -la bin/
# Check if sf wrapper exists
Solution:
make setup tool=salesforce
Issue: Salesforce Login Fails
Symptoms:
Error: OAuth exchange failed
Browser opened but login stuck
Solutions:
- Check browser popup blocker:
- Ensure popups are allowed for salesforce.com
- Try incognito/private window:
- Cached credentials can interfere
- Use device flow instead of web flow:
bin/sf org login device --alias myDevOrg - Check org status:
- Log into Salesforce directly in browser
- Verify org isn’t locked or expired
Issue: “sf-deploy” Fails with Permission Error
Symptoms:
NOT_FOUND: Cannot find permission set
INSUFFICIENT_ACCESS: Cannot access object
Solutions:
- Verify org type:
- Must be Developer Edition or Sandbox
- Cannot use Production org
- Re-run the deploy:
make sf-deploy org=myDevOrg - Check for existing data conflicts:
bin/sf data query --query "SELECT Id FROM Account LIMIT 5" --target-org myDevOrg
Environment Variable Issues
Issue: .env Not Loading
Symptoms:
- Commands work manually but not via Makefile
- “WORKATO_API_TOKEN: unbound variable”
Diagnosis:
# Check .env exists in the project root and has content
cat .env
# Check for invisible characters
file .env
# Should show: ASCII text
# Check for Windows line endings (if edited on Windows)
cat -A .env
# Should NOT show ^M at end of lines
Solutions:
- Fix line endings:
# Convert Windows to Unix line endings sed -i '' 's/\r$//' .env # macOS sed -i 's/\r$//' .env # Linux - Check file format:
# .env should be KEY=value format, no spaces around = # Correct: WORKATO_API_TOKEN=abc123 # Wrong: WORKATO_API_TOKEN = abc123 - Check you have the right .env file:
- Root
.env— containsWORKATO_API_TOKEN(used by Makefile andwkCLI) app/.env— contains MCP URLs, Cognito config, app settings (used by the hotel app)
- Root
Workshop-Specific Quick Fixes
“I’m Stuck and We’re Running Out of Time”
Temporary Workarounds:
- Skip
wkCLI, use Workato UI directly:- Import recipes manually via Workato UI
- Navigate to Projects → Import → Upload JSON files
- Use facilitator’s Salesforce org:
- Have backup org pre-configured
- Share connection credentials for workshop only
- Use mock mode:
# In app/.env WORKATO_MOCK_MODE=true AUTH_PROVIDER=mock # App will use local SQLite instead of Salesforce cd app && npm run dev
Pre-Workshop Validation Script
Have attendees run this before the workshop:
#!/bin/bash
echo "=== Pre-Workshop Environment Check ==="
# Node.js
echo -n "Node.js: "
node --version 2>/dev/null || echo "NOT INSTALLED"
# Git
echo -n "Git: "
git --version 2>/dev/null || echo "NOT INSTALLED"
# Workato CLI
echo -n "wk CLI: "
wk version 2>/dev/null || echo "NOT INSTALLED"
# Network (can reach Workato)
echo -n "Network (Workato): "
curl -s -o /dev/null -w "%{http_code}" https://app.trial.workato.com | grep -q "200" && echo "OK" || echo "BLOCKED"
# Network (can reach Salesforce)
echo -n "Network (Salesforce): "
curl -s -o /dev/null -w "%{http_code}" https://login.salesforce.com | grep -q "200" && echo "OK" || echo "BLOCKED"
echo "=== Check Complete ==="
Escalation Path
If issues persist after trying these solutions:
- Check Dewy Resort repo issues: github.com/workato-devs/dewy-resort/issues
- Workato Community: community.workato.com
- Salesforce Developer Forums: developer.salesforce.com/forums
For workshop-day emergencies, work with a partner who completed setup successfully.