sidorares / sidorares/node-mysql2

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

Open
#920 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.4k
Forks
680
Avg merge
9h 7m
Merged PRs (30d)
59

Description

I decided to enable debug mode for my connection pool to identify any potential issues. For some reason I am getting spammed with the following error:

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
    at PoolConnection.addCommand (C:\Bots\TestBot\node_modules\mysql2\lib\connection.js:471:47)
    at new Connection (C:\Bots\TestBot\node_modules\mysql2\lib\connection.js:114:12)
    at new PoolConnection (C:\Bots\TestBot\node_modules\mysql2\lib\pool_connection.js:7:5)
    at Pool.getConnection (C:\Bots\TestBot\node_modules\mysql2\lib\pool.js:54:20)
    at Pool.execute (C:\Bots\TestBot\node_modules\mysql2\lib\pool.js:167:10)
    at C:\Bots\TestBot\node_modules\mysql2\promise.js:338:16
    at new Promise (<anonymous>)
    at PromisePool.execute (C:\Bots\TestBot\node_modules\mysql2\promise.js:337:12)
    at Database.userExists (C:\Bots\TestBot\Database.js:62:44)
    at Database.syncUser (C:\Bots\TestBot\Database.js:102:28)

Any ideas why I am getting this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/connection.js:471 and trace the addCommand call from lib/connection.js:114 through lib/pool_connection.js:7, lib/pool.js:54 and lib/pool.js:167. Compare this path with promise.js:337-338 and reproduce the debug-mode pool call described in the report; done means explaining the strict-mode TypeError and preventing the repeated error without breaking pool execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mysql, node.js
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.