Server API repeat steps returning empty array on a custom server (Vultr) deployment

We found the issue to be in the mysql2 package version 3.9.4.

The following update is causing the error.

fix(security): improve results object creation by wellwelwel · Pull Request #2574 · sidorares/node-mysql2 (github.com)

The probrem it is causing is that we depend on the .hasOwnProperty() method which no longer works after the update. An issue is already posted at their repo.

Release 3.9.4 breaks code that depended on .hasOwnProperty() · Issue #2585 · sidorares/node-mysql2 (github.com)

There is also a new pull request to revert this change and hopefully get applied soon.

fix: revert breaking change in results creation by wellwelwel · Pull Request #2591 · sidorares/node-mysql2 (github.com)

We will investigate to improve the deployment process and lock the versions to prevent this kind of problems in the future.

For a workarround you can the mysql2 version to 3.9.3 in your package.json without the ^.

7 Likes