0

I'm not sure where to address this, but is there a way to make chrome render GRPC network nicely? Within network tab I always see encoded hash instead of JSON response.

We use @ngx-grpc library, but it doesn't seem to work with grpc-web-devtools.

As having services generated via grpc_tools_node_protoc and including devTools configuration for imported services like this:

@Injectable({
  providedIn: 'root',
})
export class ComponentsService {
  updates$ = new Subject<ComponentDto>();
  constructor(private updateSC: UpdateServiceClient) {
    const enableDevTools =
      (window as any)['__GRPCWEB_DEVTOOLS__'] || (() => {});
    enableDevTools([updateSC]);
  }

, I'm always getting

ERROR TypeError: Cannot read properties of undefined (reading 'rpcCall')
    at <anonymous>:66:46
    at Array.map (<anonymous>)
    at window.__GRPCWEB_DEVTOOLS__ (<anonymous>:65:11)
    at new ComponentsService (components.service.ts:23:5)
    at Object.ComponentsService_Factory [as factory] (components.service.ts:69:4)
    at R3Injector.hydrate (core.mjs:9252:35)
    at R3Injector.get (core.mjs:9146:33)
    at ChainedInjector.get (core.mjs:21505:36)
    at lookupTokenUsingModuleInjector (core.mjs:3289:39)
    at getOrCreateInjectable (core.mjs:3334:12)

Any suggestions?.

sawio
  • 1

0 Answers0