Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to add better error reporting when espresso device is used without INTERNET permission. #2067

Merged
1 commit merged into from
Dec 19, 2023

Conversation

copybara-service[bot]
Copy link

Attempt to add better error reporting when espresso device is used without INTERNET permission.

Currently if a test attempts to use espresso-device on an emulator without the INTERNET
permission, they will see a cryptic error like

Caused by: java.net.SocketException: socket failed: EPERM (Operation not permitted)

This change adds an explicit check to see if the current process has the INTERNET permission,
and if it doesn't, throw a specific error message.

This change also adds a uses-permission INTERNET entry to espresso-device's manifest.
This should help grant the INTERNET permission automatically in development environments
where the build system auto-merges manifest permission entries into the target process
manifest.

…thout INTERNET permission.

Currently if a test attempts to use espresso-device on an emulator without the INTERNET
permission, they will see a cryptic error like
```
Caused by: java.net.SocketException: socket failed: EPERM (Operation not permitted)
```

This change adds an explicit check to see if the current process has the INTERNET permission,
and if it doesn't, throw a specific error message.

This change also adds a uses-permission INTERNET entry to espresso-device's manifest.
This should help grant the INTERNET permission automatically in development environments
where the build system auto-merges manifest permission entries into the target process
manifest.

PiperOrigin-RevId: 592259503
@copybara-service copybara-service bot closed this pull request by merging all changes into main in f84116f Dec 19, 2023
@copybara-service copybara-service bot deleted the piper_592039096 branch December 19, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant