Skip to content

Commit

Permalink
Fix connection with old SDKs
Browse files Browse the repository at this point in the history
Summary:
D20559197 inadvertantly broke support for old SDKs by properly handling an
exception that we previously ignored. However, this meant that Android versions
that don't support reverse-proxying will not fail to get registered although
they're otherwise supported.

Changelog: Fix connections on Android devices with older SDKs (19)

Reviewed By: jknoxville

Differential Revision: D20868923

fbshipit-source-id: 409fe20a0875dc26ecc971d33264a1145012d586
  • Loading branch information
passy authored and facebook-github-bot committed Apr 6, 2020
1 parent 64e5fff commit 9ba9909
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion desktop/app/src/dispatcher/androidDevice.tsx
Expand Up @@ -46,7 +46,15 @@ function createDevice(
? KaiOSDevice
: AndroidDevice)(device.id, type, name, adbClient);
if (ports) {
await androidLikeDevice.reverse([ports.secure, ports.insecure]);
await androidLikeDevice
.reverse([ports.secure, ports.insecure])
// We may not be able to establish a reverse connection, e.g. for old Android SDKs.
// This is *generally* fine, because we hard-code the ports on the SDK side.
.catch((e) => {
console.warn(
`Failed to reverse-proxy ports on device ${androidLikeDevice.serial}: ${e}`,
);
});
}
resolve(androidLikeDevice);
} catch (e) {
Expand Down

0 comments on commit 9ba9909

Please sign in to comment.