You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'v found that enabled gRPC-Web Developer Tools (by SafetyCulture) brokes up unary interceptors set up for grpc-web client. Interceptors are being not called when gRPC-Web Developer Tools are enabled.
Issue was found with next code:
constAuthInterceptor=function(){this.intercept=function(request,invoker){request.getMetadata().Authorization=AuthService.GetAuthHeaderValue();returninvoker(request);};};constoptions={"unaryInterceptors": [newAuthInterceptor()]};constAPIClient=newAPIPromiseClient(API_URL,null,options);constenableDevTools=window.__GRPCWEB_DEVTOOLS__||(()=>{});enableDevTools([APIClient,]);APIClient.me(newProtobufEmpty(),{}).then(result=>{
...
}).catch(error=>{console.error(error);// <-- when gRPC-Web DevTools are enabled I receive error "no auth header" from my backend});