ESLint server crash: `dyld[...]: missing symbol called`

This issue has been tracked since 2022-09-29.

Describe the bug

Installing and running SafeQL on an M1 machine (process.arch === 'arm64') causes crashes in the VS Code ESLint Output panel that look like this:

...more...
dyld[70673]: missing symbol called
[Info  - 5:42:07 PM] Connection to server got closed. Server will restart.
[Info  - 5:42:07 PM] ESLint server stopped.
[Info  - 5:42:07 PM] ESLint server is starting
[Info  - 5:42:07 PM] ESLint server running in node v16.11.0
[Info  - 5:42:07 PM] ESLint server is running.
[Info  - 5:42:07 PM] ESLint library loaded from: /Users/k/p/next-js-example-spring-2022/node_modules/eslint/lib/api.js
dyld[70680]: missing symbol called
[Error - 5:42:09 PM] The ESLint server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Info  - 5:42:09 PM] ESLint server stopped.

This also occurs on the command line:

$ yarn eslint . --max-warnings 0
yarn run v1.22.19
$ /Users/k/p/next-js-example-spring-2022/node_modules/.bin/eslint . --max-warnings 0
dyld[71873]: missing symbol called
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  • I also tried upgrading Node.js from 16.11.0 to 18.10.0, but encountered a similar problem.
  • Switching to a Node.js v16 version that is using i386 architecture via Rosetta 2 (process.arch === 'x64') resolves the issue

To Reproduce
Steps to reproduce the behavior:

  1. Install and run SafeQL on an M1 / M2 (ARM - Apple Silicon) machine
  2. Open a file that causes a connection to the database
  3. Observe the crash in the VS Code Output -> ESLint panel

Expected behavior

It should run on Apple Silicon machines too.

Screenshots

--

Desktop (please complete the following information):

  • OS: macOS Monterey 12.6 (21G115)
  • PostgreSQL version 14.2
  • Version @ts-safeql/[email protected]

Additional context

Also asked about this upstream in libpg-query here: pyramation/libpg-query-node#9 (comment)

karlhorky wrote this answer on 2022-10-17

Oh, just deleted my yarn.lock lockfile and re-ran yarn install it seems to be resolved... not sure which transitive dependency caused this, but it's fixed now!

Closing for now.

karlhorky wrote this answer on 2022-10-17

Hmm... actually getting this again now.

After investigating a bit, it seems to be an edge case related to running the installation in a VS Code "Intel Chip" terminal - even though the Node.js version installed on the machine is an arm64 version.

Reproduction steps:

  1. Open an "Intel Chip" version of VS Code on an M1 and open the terminal (the installed version of Node.js on the system should be arm64 architecture)
  2. Clone https://github.com/upleveled/next-js-example-fall-2022/tree/994747b1d24298ff8b27926e34792d7faecdd39f (commit hash 994747b1d24298ff8b27926e34792d7faecdd39f)
  3. Run yarn to install libpg-query and other dependencies - the installation will succeed
  4. Run yarn eslint . --max-warnings 0 - this will fail with the dyld[...]: missing symbol called error as in the output below
$ yarn eslint . --max-warnings 0
yarn run v1.22.19
$ /Users/k/projects/next-js-example-fall-2022/node_modules/.bin/eslint . --max-warnings 0
dyld[30868]: missing symbol called
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

So the solutions / workarounds for this are:

A) Install an "Apple Silicon" or "Universal" version of VS Code

or

B) Run the yarn installation in a terminal running in arm64 mode


Since there are solutions and workarounds for this, I'm leaving this closed.

Newbie012 wrote this answer on 2022-10-17

Thanks for investigating that; Hopefully, it would help others as well.

More Details About Repo
Owner Name ts-safeql
Repo Name safeql
Full Name ts-safeql/safeql
Language TypeScript
Created Date 2022-09-08
Updated Date 2023-03-16
Star Count 795
Watcher Count 5
Fork Count 14
Issue Count 7

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date