Skip to content

TypeError: Cannot read properties of undefined (reading 'match') #2320

@rishabhAjay

Description

@rishabhAjay

Environment

  • Operating System version: Windows 10
  • Firebase SDK version: 11.11.0
  • Firebase Product: Cloud Messaging
  • Node.js version: 18.17.1
  • NPM version: 9.8.1

The Error:

After I upgraded firebase-admin to the latest version, this error popped up:

TypeError: Cannot read properties of undefined (reading 'match')
    at scanIdentifier (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:259:96)
    at parseName (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:317:29)
    at TagParser._parseNamePath (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:474:20)
    at TagParser.parseNamePathOptional (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:491:25)
    at TagParser.parse (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:769:34)
    at parseTag (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:790:26)
    at Object.parse (C:\Users\User\Desktop\Project\node_modules\doctrine\lib\doctrine.js:868:23)
    at build (C:\Users\User\Desktop\Project\node_modules\swagger-jsdoc\src\specification.js:227:39)
    at module.exports (C:\Users\User\Desktop\Project\node_modules\swagger-jsdoc\src\lib.js:32:10)
    at Object.<anonymous> (C:\Users\User\Desktop\Project\src\utils\swagger.ts:31:33)

I am using swagger-jsdoc(v6.2.5)

Steps to reproduce:

I did some digging by console logging the incoming input from where the error was thrown:

PRINTING THE SOURCE FROM doctrine:
The FirebaseAuthRequestHandler constructor used to initialize an instance using a FirebaseApp.

@param app - The app used to fetch access tokens to sign API requests.
@constructor.
PRINTING THE SOURCE FROM doctrine:
The FirebaseAuthRequestHandler constructor used to initialize an instance using a FirebaseApp.

@param app - The app used to fetch access tokens to sign API requests.
@constructor.

There is a "." after the @constructor YAML definition. Was this intended? I removed this dot and reran the application. The error did not resurface after this change.

Relevant Code:

Screenshots of the path and code in the package:
dotInConstructor

2023-09-29 22_51_16-auth-api-request d ts - OIG-Nodejs - Visual Studio Code

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions