Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.
This repository was archived by the owner on Apr 22, 2022. It is now read-only.

Cannot convert a Symbol value to a string #24

@Alvis-Li

Description

@Alvis-Li

Exceptions will be thrown under NodeJS 14.15.0.
The object returned by fs.promises.open contains the Symbol. Cannot convert a Symbol value to a string

fs.promises.open('xxx/index.js', 'r').then((fh) => { 
fh.close();
_fh = Object.getPrototypeOf(fh);
console.log(Reflect.ownKeys(_fh));
});
[
  'constructor',
  'getAsyncId',
  'fd',
  'appendFile',
  'chmod',
  'chown',
  'datasync',
  'sync',
  'read',
  'readv',
  'readFile',
  'stat',
  'truncate',
  'utimes',
  'write',
  'writev',
  'writeFile',
  Symbol(messaging_transfer_symbol),
  Symbol(messaging_transfer_list_symbol),
  Symbol(messaging_deserialize_symbol)
]

const fName = 'f' + name

Environment

  • Operation system:
  • Node version: 14.15.0
  • Tracer version:
  • Agent version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions