Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unified Recorder] Unable to hit the localhost:5000 from a karma test #16356

Closed
Tracked by #15829
HarshaNalluru opened this issue Jul 12, 2021 · 6 comments
Closed
Tracked by #15829
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team. test-utils-recorder Label for the issues related to the common recorder
Milestone

Comments

@HarshaNalluru
Copy link
Member

HarshaNalluru commented Jul 12, 2021

Trying to hit the localhost:5000(test-porxy) fails with this error.
image

This needs to be fixed to be able to use the unified recorder in the browser tests.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 12, 2021
@HarshaNalluru HarshaNalluru added the test-utils-recorder Label for the issues related to the common recorder label Jul 12, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 12, 2021
@HarshaNalluru HarshaNalluru self-assigned this Jul 12, 2021
@HarshaNalluru HarshaNalluru added this to the [2021] August milestone Jul 12, 2021
@HarshaNalluru
Copy link
Member Author

HarshaNalluru commented Jul 13, 2021

Proxy-tool spits out the following.
image

@scbedd is looking.

@scbedd
Copy link
Member

scbedd commented Jul 15, 2021

Resolved in Azure/azure-sdk-tools#1814 and the latest tagged container has been updated.

Locally this checked out for me, but confirm at your leisure.

@HarshaNalluru HarshaNalluru changed the title Unable to hit the localhost:5000 from a karma test [Unified Recorder] Unable to hit the localhost:5000 from a karma test Jul 21, 2021
@HarshaNalluru
Copy link
Member Author

Just posting the current state if anybody cares..
After the new image, this is what I see.
image

Currently, investigating on where the recording-id is lost.

@scbedd
Copy link
Member

scbedd commented Jul 22, 2021

Bit more detail.

Chrome network tab can see the appropriate headers

image

But the XMlHttpRequest object that comes back to the code itself does not see the headers.

I added a console.log() of xhr.getallResponseHeaders() within core-http, and this is all it sees:

image

Still don't really know why this is occurring. I'd assume it's some security thing? But I've also manually injected Access-Control-Allow-Headers: * to the test-proxy on my local debug. Still nothing.

@scbedd
Copy link
Member

scbedd commented Jul 22, 2021

Got it! Need to EXPOSE the headers, not just ALLOW them through preflight!

@scbedd scbedd self-assigned this Jul 22, 2021
@scbedd scbedd added the Central-EngSys This issue is owned by the Engineering System team. label Jul 22, 2021
@HarshaNalluru
Copy link
Member Author

Amazing work, @scbedd!
This works with the latest image, I can see all the headers.
x-recording-id is also seen.
Resolving the issue now!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Central-EngSys This issue is owned by the Engineering System team. test-utils-recorder Label for the issues related to the common recorder
Projects
None yet
Development

No branches or pull requests

2 participants