Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Add Android emulator localhost troubleshooting (#1129)
Browse files Browse the repository at this point in the history
Explain how to solve Android emulator events not showing up in local
Sentry instance.
  • Loading branch information
philipphofmann authored Jan 16, 2024
1 parent d939b84 commit e27e504
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/docs/environment/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,9 @@ sentry devservices up
```shell
docker ps
```

---

**Problem:** You use an Android emulator with a DSN pointing to localhost, and the events don't show up in your local Sentry instance.

**Solution:** Change `localhost` to `10.0.2.2`. So, for example, change http://d895df97e1cb4a33b4dff8af3e78da09@localhost:8000/2 to http://d895df97e1cb4a33b4dff8af3e78da09@10.0.2.2:8000/2. This is because localhost or `127.0.0.1` refers to the emulator's own loopback interface, not the loopback interface of the host machine. For more information see https://developer.android.com/studio/run/emulator-networking.

1 comment on commit e27e504

@vercel
Copy link

@vercel vercel bot commented on e27e504 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

develop – ./

develop-git-master.sentry.dev
develop.sentry.dev

Please sign in to comment.