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

Open Replay Assets: context deadline exceeded (Client.Timeout exceeded while awaiting headers) #1889

Open
hungquach opened this issue Feb 13, 2024 · 3 comments
Assignees
Labels

Comments

@hungquach
Copy link

hungquach commented Feb 13, 2024

Describe the issue
My recordings are missing styles.
When I checked the logs of the Assets service, I saw a lot of timeout error context deadline exceeded (Client.Timeout exceeded while awaiting headers

I can download the CSS file using wget from inside the asset-openreplay pod

Screenshots
Screenshot 2024-02-20 at 13 53 27

Expected behavior
No timeout error, resources can be cached

Additional context
It seems related to the User-Agent here https://github.com/openreplay/openreplay/blob/main/backend/internal/assets/cacher/cacher.go#L107

Sample error:
2024/02/13 14:44:43 /root/cmd/assets/main.go:77: Error while caching: https://www.cha***/backstage/designs/fsh-web/2020_2030/2023/eyewear/stories/october-story/20231024_EYEWEAR-STORY_OCTOBRE.css: Get "https://www.cha***/backstage/designs/fsh-web/2020_2030/2023/eyewear/stories/october-story/20231024_EYEWEAR-STORY_OCTOBRE.css": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

@zavorotynskiy
Copy link
Contributor

@hungquach Hey. Could I kindly ask you to share the webpage address you are attempting to record? This will help me reproduce the issue in my test environment.

@hungquach
Copy link
Author

hungquach commented Feb 15, 2024

@zavorotynskiy Hi, we're trying to record https://www.cha***. The webpage seems to block old browsers.

I changed the user-agent by setting this env var ASSETS_REQUEST_HEADERS=user-agent:curl/8.4.0 and It resolved the issue.

Screenshot 2024-02-20 at 13 58 36

@zavorotynskiy
Copy link
Contributor

I will test the assets service using an up-to-date user-agent value and will update our codebase if there are no other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants