Not able to view the emualtor on the web browser #1454
-
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 3 replies
-
@hridhar thanks for reaching out! With the current level of details, it's hard to understand what's going on. It appears that a HTTP 401 is returned — indicating some authentication issues. (it's plausible that some auth headers were not properly passed to the server, and hence the error.) Can you first try talking to an endpoint that does not require authentication and ensure the basic flow works, and then turn on authentication and debug the auth issue? That might help you isolate the issue. |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for the reply, Please find the below information. We are using the below scripts to run the emulator over container. We are fallowing below steps.
Expected Result: Actual Result: Error Facing: Below is the trace logs. We have tried opening http://localhost:8080/android.emulation.control.EmulatorController/sendMouse over the web browser. Below is the response header: Below is the request header: General Information: We are able to print the token below: /**
Please let me know if you need some more information. |
Beta Was this translation helpful? Give feedback.
-
Hi @sampajano |
Beta Was this translation helpful? Give feedback.
-
@hridhar Hihi. Thanks for providing all the details! I've noticed that in your request header, you have the following auth header:
I suppose a proper token was provide above? And yet you're still seeing invalid token error? Could you try the same request with |
Beta Was this translation helpful? Give feedback.
-
Hi @sampajano, We have checked the Token and it is valid token. Please find the below information and please let me know for the more information.
Command : curl -I http://emulator_service_grpc:8554/android.emulation.control.EmulatorController/getStatus Command : curl -I http://docker_front-envoy_1:8080/android.emulation.control.Rtc Command : curl -I http://host.docker.internal:8080 Command : curl -I http://localhost:8554/android.emulation.control.EmulatorController/getStatus Command : curl http://localhost:8554 Command : grpcurl -plaintext localhost:8554 list android.emulation.control.Rtc
Command : curl -I http://localhost:8080/android.emulation.control.EmulatorController/getStatus |
Beta Was this translation helpful? Give feedback.
-
Hi @sampajano, Please find below logs taken from the emulator_envoy:latest. Line 32406: �front-envoy_1 |� [2024-07-26T09:22:30.183Z] "OPTIONS /android.emulation.control.EmulatorController/setGps HTTP/1.1" 200 - 0 0 25 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" "806f3bf6-436c-430a-8f10-874220a40be2" "localhost:8080" "-" |
Beta Was this translation helpful? Give feedback.
-
@hridhar Hi :) Thanks for providing the above info, although it seems that the auth headers are missing from the logs. I was earlier suggesting that you use "curl" with all the same request headers which you had passed in the grpc-web request. You could do that by using the "copy as curl" function in Chrome's network tab. The primary point being, if this request is failing due to auth issue, it can be caused by any number of reasons, and you should try identifying what exactly is causing it, because you can know if this is a server, client issue, or a combination of both. |
Beta Was this translation helpful? Give feedback.
-
Hi @sampajano, Thank you for explaining and I got your point. Please find below info, and I am surprised that there is no output/error we observed while running the below command. We are running below commands inside emulator_envoy:latest container. |
Beta Was this translation helpful? Give feedback.
-
Hi @sampajano, Just now I have tried, running the working curl command inside the emulator_envoy:latest container. |
Beta Was this translation helpful? Give feedback.
-
@hridhar Hihi. i think you have some formatting issue wrt your curl command. (e.g. what's the >>> in the end?) Try the following format maybe:
|
Beta Was this translation helpful? Give feedback.
-
Also at this point i don't believe this qualifies as a grpc-web "issue", but rather a discussion thread — with regards to fixing auth in your server integration. I'll convert it as one :) |
Beta Was this translation helpful? Give feedback.
-
Hi @sampajano , I could see below error logs. COuld you please check. front-envoy_1 | [2024-08-06 11:19:23.663][25][debug][router] [source/common/router/router.cc:478] [C0][S9162704216576724202] cluster 'jwks_cluster' match for URL '/robot/v1/metadata/x509/[email protected]' |
Beta Was this translation helpful? Give feedback.
-
Please check this issue. |
Beta Was this translation helpful? Give feedback.
Also at this point i don't believe this qualifies as a grpc-web "issue", but rather a discussion thread — with regards to fixing auth in your server integration. I'll convert it as one :)