diff --git a/js/develop/envoy.yaml b/js/develop/envoy.yaml index 4d8fb3c1..9cc1c0aa 100644 --- a/js/develop/envoy.yaml +++ b/js/develop/envoy.yaml @@ -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 @@ -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: diff --git a/js/docker/docker-compose-build.yaml b/js/docker/docker-compose-build.yaml index 6bba032a..d7762fd8 100644 --- a/js/docker/docker-compose-build.yaml +++ b/js/docker/docker-compose-build.yaml @@ -15,6 +15,7 @@ services: - "80:8080" - "443:8443" - "8001:8001" + - "8080:8080" emulator: image: emulator_emulator:latest build: diff --git a/js/docker/docker-compose.yaml b/js/docker/docker-compose.yaml index ffd89dbd..ed6c1400 100644 --- a/js/docker/docker-compose.yaml +++ b/js/docker/docker-compose.yaml @@ -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 @@ -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: diff --git a/js/docker/envoy.yaml b/js/docker/envoy.yaml index 4d8fb3c1..8883718f 100644 --- a/js/docker/envoy.yaml +++ b/js/docker/envoy.yaml @@ -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: diff --git a/js/src/App.js b/js/src/App.js index 46c31272..17ea5738 100644 --- a/js/src/App.js +++ b/js/src/App.js @@ -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"; diff --git a/js/src/components/emulator_screen.js b/js/src/components/emulator_screen.js index 88303ab1..69cfb91e 100644 --- a/js/src/components/emulator_screen.js +++ b/js/src/components/emulator_screen.js @@ -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> diff --git a/pyproject.toml b/pyproject.toml index dbf33313..aa8eebd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ emu-docker = "emu.emu_docker:main" [tool.poetry.dependencies] python = "^3.10" PyYAML = "^6.0" -docker = "^6.1.1" +docker = "^7.1.0" tqdm = "^4.65.0" console-menu = "^0.8.0" click = "^8.1.3"