Skip to main content
This guide helps you diagnose and resolve common issues when working with the Mobile Use SDK.

Device Connection Issues

No Device Found

  • Error: DeviceNotFoundError: No device found. Exiting.
  • Agent initialization fails
1. Verify device connection
You should see your device listed with status β€œdevice”
2. Enable USB debugging (Android)
  • Settings β†’ About Phone β†’ Tap β€œBuild Number” 7 times
  • Settings β†’ Developer options β†’ USB debugging
3. Trust computer (iOS)
  • Unlock your device
  • Tap β€œTrust” when prompted
4. Reset ADB
5. Specify device manually

USB Connection Unstable

  • Random disconnections during automation
  • adb: error: device 'xxx' not found
1. Use a high-quality USB cablePoor quality cables can cause intermittent connections.2. Connect directly to computerAvoid USB hubs which can cause instability.3. Increase ADB timeout
4. Use wireless debugging
Ensure stable Wi-Fi connection for wireless debugging.

Servers Fail to Start

  • ServerStartupError during initialization
  • Ports already in use
  • Zombie processes from previous runs
1. Force clean zombie servers
2. Verify platform tools are installed
If not installed, download Android SDK Platform Tools
3. Check idb_companion status (iOS)
4. Check for port conflicts

Task Execution Issues

Agent Not Initialized

  • Error: AgentNotInitializedError
Always call agent.init() before running tasks:

Task Times Out or Fails

  • Task gets stuck or fails to complete
  • Reaches max_steps limit
  • Unexpected results
1. Simplify the task goalBreak complex tasks into smaller steps:
2. Increase max_steps limit
3. Enable tracing to debug
4. Be more specific in goals

Incorrect Task Results

  • Task returns unexpected or incomplete data
  • Structured output fields are missing or incorrect
1. Use structured output with clear descriptions
2. Provide more context in the goal
3. Use better LLM models for cortex

LLM and API Issues

API Key Authentication

  • Authentication errors
  • openai.error.AuthenticationError or similar
  • 401 Unauthorized responses
1. Verify API keys in .env file
.env
2. Load environment variablesThe SDK automatically loads .env files, but you can also set manually:
3. Check API key validityTest your keys directly:

Rate Limiting

  • 429 Too Many Requests errors
  • Tasks slow down over time
1. Use different providersDistribute load across multiple LLM providers:
2. Use tier limitsCheck your API tier limits and upgrade if needed.3. Add delays between tasks

System Environment Issues

Python Version Compatibility

  • Import errors or syntax errors
  • SyntaxError or ModuleNotFoundError
Ensure you’re using Python 3.12 or higher:
Create compatible environment:

Import Errors

  • ModuleNotFoundError: No module named 'minitap'
  • Import errors for SDK components
1. Verify installation
2. Reinstall the SDK
3. Check virtual environmentEnsure you’re in the correct virtual environment:

Debugging Best Practices

Enable Comprehensive Logging

Use Trace Recording

Always enable tracing during development:

Check Trace Contents

After a failed task, examine the traces:

Getting Help

GitHub Issues

Search existing issues or create a new one

Discord Community

Get help from the community

Filing a Bug Report

When filing an issue, include:
1

Environment Information

2

Device Details

  • Platform (Android/iOS)
  • Device model
  • OS version
3

Minimal Reproduction

Provide a minimal code sample that reproduces the issue
4

Error Messages

Full error traceback and logs
5

Traces (if applicable)

Include relevant screenshots from trace recording

Quick Reference

Next Steps

SDK Reference

Complete SDK documentation

Examples

Working code examples