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

[aws-lambda-router] Playground is not displayed #904

Open
miguelwebtales opened this issue Jul 1, 2024 · 9 comments
Open

[aws-lambda-router] Playground is not displayed #904

miguelwebtales opened this issue Jul 1, 2024 · 9 comments
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.

Comments

@miguelwebtales
Copy link

Component(s)

router

Component version

0.13.0

wgc version

0.55.3

controlplane version

cloud

router version

0.92.2

What happened?

When I try to enter the playground I receive this error on the browser

GET http://localhost:3003/Prod/wundergraph net::ERR_CONTENT_DECODING_FAILED 200 (OK)

The error doesn't exist if I disable the router compression routes.

	// brCompressor := middleware.NewCompressor(5, CustomCompressibleContentTypes...)
	brCompressor.SetEncoder("br", func(w io.Writer, level int) io.Writer {
		return br.NewWriterLevel(w, level)
	})
	// httpRouter.Use(brCompressor.Handler)

It seems that lambda is not being able to handle compressed responses from the router for some reason.

Environment information

No response

Router configuration

No response

Router execution config

No response

Log output

No response

Additional context

No response

@miguelwebtales miguelwebtales added the bug Something isn't working label Jul 1, 2024
Copy link

github-actions bot commented Jul 1, 2024

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@StarpTech StarpTech added the internally-reviewed The issue has been reviewed internally. label Jul 2, 2024
@StarpTech
Copy link
Contributor

Hi @miguelwebtales, thanks for the report. We'll take a look and come back to you.

@miguelwebtales
Copy link
Author

@StarpTech

After a lot of hours I couldn't figure out why compression is causing this issue.

I decided to had a config env setting to disable compression to bypass this issue (I don't need compression).

I created two PR one for router #909 and another to aws-lambda-router #910

It would be nice to find why this is happening and consider this just a quick solution and extra feature for whoever needs it.

@StarpTech
Copy link
Contributor

StarpTech commented Jul 2, 2024

Hi @miguelwebtales, we have addressed the issue in a separate PR where we disabled compression for the playground. Please test it after merge and release. I still like your proposal to make it configurable though. The place to configure this option needs to be revisited. We have plans to configure compression on the trafficShaping property on subgraph and global router level. To be frank, this is not our highest priority, so it might take a while before we work on it.

@miguelwebtales
Copy link
Author

Hi @StarpTech it seems it fixed partial the UX playground shows up but the same error happens when I try to make a request to the graphql endpoint "ERR_CONTENT_DECODING_FAILED"

@StarpTech
Copy link
Contributor

Hi @miguelwebtales could you share a reproducible example? I would like to ensure that the issue is addressed in the next release.

@miguelwebtales
Copy link
Author

@StarpTech it's just necessary to run aws-lambda-router latest version and make any query on the playground.

Screenshot 2024-07-17 at 12 58 29

Let me know if you can't reproduce it...

@StarpTech
Copy link
Contributor

Thank you, we will check it.

@StarpTech
Copy link
Contributor

Hi @miguelwebtales, sorry for the late response. This issue is now on our backlog and we will provide soon an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants