Skip to content

Tracing - vueRouterInstrumentation - Cannot convert a Symbol value to a string #4482

@Bobakanoosh

Description

@Bobakanoosh

Package + Version

{
		"@sentry/tracing": "^6.17.3",
		"@sentry/vue": "^6.17.3"
}

Description

Vue router allows for the use of Symbol as the name parameter when registering routes.

Right now when using Symbol-based routes, I get the error: Uncaught TypeError: Cannot convert a Symbol value to a string, due to transaction.ts:145:46

Going to that file, we see logger.log("[Tracing] Finishing ${this.op} transaction: ${this.name}.");.

Looking at the respective types for this.name, we see public name: string;

Just to be sure, I checked out the implementation of Sentry.vueRouterInstrumentation, and found that it is indeed just passing to.name, which it thinks is only a string, but in reality, it can be a string or Symbol.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions