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

[Bug] Plugin doesn't work for big responses #116

Open
borissmidt opened this issue Feb 11, 2022 · 0 comments
Open

[Bug] Plugin doesn't work for big responses #116

borissmidt opened this issue Feb 11, 2022 · 0 comments

Comments

@borissmidt
Copy link

borissmidt commented Feb 11, 2022

I'm trying to get the grpc-web-devtools to work but it seems that for large responses the plugin doens't work. unless i make it explicitly a string.

//this doesn't work because the response is too big:
window.postMessage({type: "__GRPCWEB_DEVTOOLS__",method: methodDesc.methodName, methodType: "unary", requestId: requestId, request:_request, response: response})

//works fine
window.postMessage({type: "__GRPCWEB_DEVTOOLS__",method: methodDesc.methodName, methodType: "unary", requestId: requestId, request:_request, response: {test : [{object: "test"}]}})

//this works totally fine.
window.postMessage({type: "__GRPCWEB_DEVTOOLS__",method: methodDesc.methodName, methodType: "unary", requestId: requestId, request: JSON.stringify(_request, null, 2), response: JSON.stringify(response, null, 2)})

i supspect it has something to do with in NetworkDetails.js.

maybe the plugin should by default collaps the src from level 1?

          <ReactJson
            name="grpc"
            theme={theme}
            style={{backgroundColor:'transparent'}}
            enableClipboard={clipboardIsEnabled}
            src={src}
          />

Note if i make my own events i can support it with the improbable Eng lib. And even when using interceptors with the mainstream grpc/grpc-web.

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

No branches or pull requests

1 participant