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

grpc-js plugin issue | TypeError: Cannot read property 'replace' of undefined #1705

Closed
schlosser opened this issue Dec 1, 2020 · 3 comments
Labels
bug Something isn't working information-requested Bug is waiting on additional information from the user triage

Comments

@schlosser
Copy link

schlosser commented Dec 1, 2020

What version of OpenTelemetry are you using?

    "@opentelemetry/api": "^0.12.0",
    "@opentelemetry/node": "^0.12.0",
    "@opentelemetry/plugin-dns": "^0.11.0",
    "@opentelemetry/plugin-grpc-js": "^0.12.0",
    "@opentelemetry/plugin-http": "^0.12.0",
    "@opentelemetry/plugin-https": "^0.12.0",
    "@opentelemetry/tracing": "^0.12.0",

What version of Node are you using?

v14.2.0

Please provide the code you used to setup the OpenTelemetry SDK

import { TraceExporter } from '@google-cloud/opentelemetry-cloud-trace-exporter';
import opentelemetry from '@opentelemetry/api';
import { NodeTracerProvider } from '@opentelemetry/node';
import { SimpleSpanProcessor } from '@opentelemetry/tracing';
const provider = new NodeTracerProvider();
const exporter = new TraceExporter();
provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
opentelemetry.trace.setGlobalTracerProvider(provider);

What did you do?

I am using the Firebase SDK to use Firestore.

What did you expect to see?

Firestore uses GRPC under the hood, I expect this to work properly

What did you see instead?

plugin-grpc-js threw an error:

Uncaught error: TypeError: Cannot read property 'replace' of undefined
    at ServiceClientImpl.clientMethodTrace [as batchGetDocuments] ([[PROJECT_DIR_REDACTED]]/node_modules/@opentelemetry/plugin-grpc-js/build/src/client/utils.js:53:48)
    at [[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/build/src/v1/firestore_client.js:195:29
    at [[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/node_modules/google-gax/build/src/streamingCalls/streamingApiCaller.js:38:28
    at [[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
    at Object.request ([[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/node_modules/google-gax/build/src/streamingCalls/streaming.js:105:36)
    at makeRequest ([[PROJECT_DIR_REDACTED]]/node_modules/retry-request/index.js:131:28)
    at retryRequest ([[PROJECT_DIR_REDACTED]]/node_modules/retry-request/index.js:99:5)
    at StreamProxy.setStream ([[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/node_modules/google-gax/build/src/streamingCalls/streaming.js:96:33)
    at StreamingApiCaller.call ([[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/node_modules/google-gax/build/src/streamingCalls/streamingApiCaller.js:54:16)
    at [[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/node_modules/google-gax/build/src/createApiCall.js:81:30
Caused by: Error
    at Firestore.getAll ([[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/build/src/index.js:759:23)
    at DocumentReference.get ([[PROJECT_DIR_REDACTED]]/node_modules/@google-cloud/firestore/build/src/reference.js:201:32)
    ...

Additional context

I am attempting to instrument my Firestore API calls in my Next.js application. I'm running Firestore @google-cloud/[email protected].

This is similar to #1260 but seems unrelated.

@schlosser schlosser added the bug Something isn't working label Dec 1, 2020
@drexler
Copy link
Contributor

drexler commented Mar 15, 2021

@schlosser did you find a workaround to this issue? I have the same problem.

@dyladan dyladan added triage information-requested Bug is waiting on additional information from the user labels Jul 20, 2022
@dyladan
Copy link
Member

dyladan commented Jul 20, 2022

@schlosser there is not enough information to reproduce the bug. Can you please provide a reproduction?

@schlosser
Copy link
Author

We ended up moving off this library; I won't be able to provide a repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working information-requested Bug is waiting on additional information from the user triage
Projects
None yet
Development

No branches or pull requests

3 participants