Skip to content

Commit e4cdba1

Browse files
authored
Merge pull request google#345 from KQT2000/master
Restored Working Build of Android Emulator Container Scripts
2 parents ce07f1d + 7b465e9 commit e4cdba1

File tree

7 files changed

+21
-217
lines changed

7 files changed

+21
-217
lines changed

LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

js/develop/envoy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static_resources:
2828
max_stream_duration:
2929
grpc_timeout_header_max: 0s
3030
- match:
31-
prefix: "/android.emulation.control"
31+
prefix: "/android.emulation.control.EmulatorController"
3232
route:
3333
cluster: emulator_service_grpc
3434
timeout: 0s
@@ -105,6 +105,7 @@ static_resources:
105105
connect_timeout: 0.250s
106106
type: STRICT_DNS
107107
lb_policy: ROUND_ROBIN
108+
http2_protocol_options: {}
108109
load_assignment:
109110
cluster_name: emulator_service_grpc
110111
endpoints:

js/docker/docker-compose-build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
- "80:8080"
1616
- "443:8443"
1717
- "8001:8001"
18+
- "8080:8080"
1819
emulator:
1920
image: emulator_emulator:latest
2021
build:

js/docker/docker-compose.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ services:
88
expose:
99
- "8080"
1010
- "8001"
11-
- "8443"
1211
ports:
1312
- "80:8080"
14-
- "443:8443"
13+
- "443:8080"
1514
- "8001:8001"
16-
15+
- "8080:8080"
1716
emulator:
1817
image: emulator_emulator:latest
1918
container_name: emulator_emulator
@@ -25,20 +24,19 @@ services:
2524
shm_size: 128M
2625
expose:
2726
- "8554"
28-
29-
jwt_signer:
30-
image: emulator_jwt_signer:latest
31-
container_name: emulator_jwt_signer
32-
networks:
33-
envoymesh:
34-
aliases:
35-
- jwt_signer
36-
expose:
37-
- "8080"
27+
#jwt_signer:
28+
# image: emulator_jwt_signer:latest
29+
# container_name: emulator_jwt_signer
30+
# networks:
31+
# envoymesh:
32+
# aliases:
33+
# - jwt_signer
34+
# expose:
35+
# - "8080"
3836

3937
nginx:
4038
image: emulator_nginx:latest
41-
network_mode: "host"
39+
# network_mode: "host"
4240
container_name: emulator_nginx
4341
networks:
4442
envoymesh:

js/docker/envoy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static_resources:
105105
connect_timeout: 0.250s
106106
type: STRICT_DNS
107107
lb_policy: ROUND_ROBIN
108+
http2_protocol_options: {}
108109
load_assignment:
109110
cluster_name: emulator_service_grpc
110111
endpoints:

js/src/App.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ var EMULATOR_GRPC =
1515
"//" +
1616
window.location.hostname +
1717
":" +
18-
window.location.port;
18+
// For some reason, process.env.NODE_ENV either doesn't exist or is equal to "development", causing EMULATOR_GRPC to equal/point to "localhost:" verus "localhost:8080" which is where Envoy is listening for gRPC-Web requests. Hard-coding the appendation of ":8080" as we've done here restores some functionality, as now both the WebRTC and PNG views return a status of "connecting" and the JavaScript console no longer logs any 'JWT is missing' errors. However, the WebRTC and PNG views never return a status of "connected" so video and audio of the emulator cannot be seen/heard.
19+
"8080";
20+
// window.location.port;
1921
if (development) {
2022
EMULATOR_GRPC = window.location.protocol + "//" +
2123
window.location.hostname + ":8080";

js/src/components/emulator_screen.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ class EmulatorScreen extends React.Component {
211211
volume={volume}
212212
gps={gps}
213213
width={200}
214+
// For some reason, height was not defined. Maybe it was accidentally omitted? Omitting this property will cause the Emulator HTML element that displays the emulator screen not to render since only the width will be rendered.
215+
// height={500}
214216
/>
215217
<p>State: {emuState} </p>
216218
</Container>

0 commit comments

Comments
 (0)