Skip to content

Commit

Permalink
Merge pull request #345 from KQT2000/master
Browse files Browse the repository at this point in the history
Restored Working Build of Android Emulator Container Scripts
  • Loading branch information
pokowaka authored Jul 5, 2023
2 parents ce07f1d + 7b465e9 commit e4cdba1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 217 deletions.
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

3 changes: 2 additions & 1 deletion js/develop/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static_resources:
max_stream_duration:
grpc_timeout_header_max: 0s
- match:
prefix: "/android.emulation.control"
prefix: "/android.emulation.control.EmulatorController"
route:
cluster: emulator_service_grpc
timeout: 0s
Expand Down Expand Up @@ -105,6 +105,7 @@ static_resources:
connect_timeout: 0.250s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: emulator_service_grpc
endpoints:
Expand Down
1 change: 1 addition & 0 deletions js/docker/docker-compose-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
- "80:8080"
- "443:8443"
- "8001:8001"
- "8080:8080"
emulator:
image: emulator_emulator:latest
build:
Expand Down
26 changes: 12 additions & 14 deletions js/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ services:
expose:
- "8080"
- "8001"
- "8443"
ports:
- "80:8080"
- "443:8443"
- "443:8080"
- "8001:8001"

- "8080:8080"
emulator:
image: emulator_emulator:latest
container_name: emulator_emulator
Expand All @@ -25,20 +24,19 @@ services:
shm_size: 128M
expose:
- "8554"

jwt_signer:
image: emulator_jwt_signer:latest
container_name: emulator_jwt_signer
networks:
envoymesh:
aliases:
- jwt_signer
expose:
- "8080"
#jwt_signer:
# image: emulator_jwt_signer:latest
# container_name: emulator_jwt_signer
# networks:
# envoymesh:
# aliases:
# - jwt_signer
# expose:
# - "8080"

nginx:
image: emulator_nginx:latest
network_mode: "host"
# network_mode: "host"
container_name: emulator_nginx
networks:
envoymesh:
Expand Down
1 change: 1 addition & 0 deletions js/docker/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static_resources:
connect_timeout: 0.250s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: emulator_service_grpc
endpoints:
Expand Down
4 changes: 3 additions & 1 deletion js/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ var EMULATOR_GRPC =
"//" +
window.location.hostname +
":" +
window.location.port;
// 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.
"8080";
// window.location.port;
if (development) {
EMULATOR_GRPC = window.location.protocol + "//" +
window.location.hostname + ":8080";
Expand Down
2 changes: 2 additions & 0 deletions js/src/components/emulator_screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ class EmulatorScreen extends React.Component {
volume={volume}
gps={gps}
width={200}
// 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.
// height={500}
/>
<p>State: {emuState} </p>
</Container>
Expand Down

0 comments on commit e4cdba1

Please sign in to comment.