Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Connect Emulator fails to start with Unknown system error -86 #7995

Closed
HassanBahati opened this issue Nov 25, 2024 · 4 comments · Fixed by #8030
Closed

Data Connect Emulator fails to start with Unknown system error -86 #7995

HassanBahati opened this issue Nov 25, 2024 · 4 comments · Fixed by #8030
Assignees
Labels
emulator: dataconnect Issues related to the dataconnect emulator type: bug

Comments

@HassanBahati
Copy link

[REQUIRED] Environment info

firebase-tools: 13.27.0

Platform: MacOs on Macbook Pro M3

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

  1. Initialize data connect app with Data Connect VsCode
  2. Use Data connect VsCode extension to start emulators

[REQUIRED] Expected behavior

expected emulators to start successfully

[REQUIRED] Actual behavior

emulators fail to start with the errors below
image

@google-oss-bot
Copy link
Contributor

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@jbalidiong jbalidiong added the emulator: dataconnect Issues related to the dataconnect emulator label Nov 25, 2024
@joehan
Copy link
Contributor

joehan commented Nov 25, 2024

Hey @HassanBahati - could you share the contents of firebase-debug.log and dataconnect-debug.log (or rerun the command with --debug and share that)? That will help us debug this issue further

@HassanBahati
Copy link
Author

Hey @HassanBahati - could you share the contents of firebase-debug.log and dataconnect-debug.log (or rerun the command with --debug and share that)? That will help us debug this issue further

Hey @joehan , i have been attempting to start the emulator with the GUI of the Firebase Data Connect VsCode extension by click the Start Emulators button. No firebase-debug.log gets generated but the dataconnect-debug.log created remains empty the whole time
image

i noticed when i attempt to start the emulator with the GUI of the Firebase Data Connect VsCode extension by click the Start Emulators button, it seems to execute the command

npx -y firebase-tools@latest emulators:start --project tqf-dataconnect 

when i executed the command without clicking Start Emulators button. these were the logs

bahati@Bahatis-MacBook-Pro test % npx -y firebase-tools@latest emulators:start --project tqf-dataconnect 
(node:25647) ExperimentalWarning: CommonJS module /Users/bahati/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /Users/bahati/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25664) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
i  emulators: Starting emulators: dataconnect
⚠  dataconnect: Fatal error occurred: 
   Error: spawn Unknown system error -86, 
   stopping all running emulators
i  dataconnect: Stopping Data Connect Emulator
⚠  dataconnect: Could not spawn child process for Data Connect Emulator.
i  hub: Stopping emulator hub

with --debug included, these were the logs

bahati@Bahatis-MacBook-Pro test % npx -y firebase-tools@latest emulators:start --project tqf-dataconnect --debug
(node:25700) ExperimentalWarning: CommonJS module /Users/bahati/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /Users/bahati/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25717) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2024-11-26T10:41:23.413Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2024-11-26T10:41:23.413Z] > authorizing via signed-in user (mukisabahati@gmail.com)
i  emulators: Starting emulators: dataconnect {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: dataconnect"}}
[2024-11-26T10:41:23.494Z] [logging] Logging Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2024-11-26T10:41:23.495Z] [dataconnect.postgres] postgres server for dataconnect only supports listening on one address (127.0.0.1). Not listening on ::1
[2024-11-26T10:41:23.495Z] assigned listening specs for emulators {"user":{"hub":[{"address":"127.0.0.1","family":"IPv4","port":4400},{"address":"::1","family":"IPv6","port":4400}],"logging":[{"address":"127.0.0.1","family":"IPv4","port":4500}],"dataconnect":[{"address":"127.0.0.1","family":"IPv4","port":9399},{"address":"::1","family":"IPv6","port":9399}],"dataconnect.postgres":[{"address":"127.0.0.1","family":"IPv4","port":5432}]},"metadata":{"message":"assigned listening specs for emulators"}}
[2024-11-26T10:41:23.496Z] [hub] writing locator at /var/folders/bm/98wj5c990ql8_1yqcc8b752m0000gn/T/hub-tqf-dataconnect.json
[2024-11-26T10:41:23.502Z] 'fdc build' failed with error: Error starting up Data Connect build: spawnSync /Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3 Unknown system error -86 {"metadata":{"emulator":{"name":"dataconnect"},"message":"'fdc build' failed with error: Error starting up Data Connect build: spawnSync /Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3 Unknown system error -86"}}
[2024-11-26T10:41:23.503Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"dataconnect"},"message":"Ignoring unsupported arg: auto_download"}}
[2024-11-26T10:41:23.503Z] Ignoring unsupported arg: port {"metadata":{"emulator":{"name":"dataconnect"},"message":"Ignoring unsupported arg: port"}}
[2024-11-26T10:41:23.503Z] Starting Data Connect Emulator with command {"binary":"/Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3","args":["--logtostderr","-v=2","dev","--listen=127.0.0.1:9399,[::1]:9399","--config_dir=/Users/bahati/Workspace/Invertase/test/dataconnect","--enable_output_schema_extensions=true","--enable_output_generated_sdk=true"],"optionalArgs":["listen","config_dir","enable_output_schema_extensions","enable_output_generated_sdk"],"joinArgs":true,"shell":false,"port":9399} {"metadata":{"emulator":{"name":"dataconnect"},"message":"Starting Data Connect Emulator with command {\"binary\":\"/Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3\",\"args\":[\"--logtostderr\",\"-v=2\",\"dev\",\"--listen=127.0.0.1:9399,[::1]:9399\",\"--config_dir=/Users/bahati/Workspace/Invertase/test/dataconnect\",\"--enable_output_schema_extensions=true\",\"--enable_output_generated_sdk=true\"],\"optionalArgs\":[\"listen\",\"config_dir\",\"enable_output_schema_extensions\",\"enable_output_generated_sdk\"],\"joinArgs\":true,\"shell\":false,\"port\":9399}"}}
⚠  dataconnect: Fatal error occurred: 
   Error: spawn Unknown system error -86, 
   stopping all running emulators {"metadata":{"emulator":{"name":"dataconnect"},"message":"Fatal error occurred: \n   Error: spawn Unknown system error -86, \n   stopping all running emulators"}}
i  dataconnect: Stopping Data Connect Emulator {"metadata":{"emulator":{"name":"dataconnect"},"message":"Stopping Data Connect Emulator"}}
⚠  dataconnect: Could not spawn child process for Data Connect Emulator. {"metadata":{"emulator":{"name":"dataconnect"},"message":"Could not spawn child process for Data Connect Emulator."}}
i  hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}

Having trouble? Try firebase [command] --help
bahati@Bahatis-MacBook-Pro test % 

and these were the contents of the firebase-debug.log

[debug] [2024-11-26T10:41:23.370Z] ----------------------------------------------------------------------
[debug] [2024-11-26T10:41:23.371Z] Command:       /Users/bahati/.nvm/versions/node/v23.2.0/bin/node /Users/bahati/.npm/_npx/ba4f1959e38407b5/node_modules/.bin/firebase emulators:start --project tqf-dataconnect --debug
[debug] [2024-11-26T10:41:23.371Z] CLI Version:   13.27.0
[debug] [2024-11-26T10:41:23.371Z] Platform:      darwin
[debug] [2024-11-26T10:41:23.371Z] Node Version:  v23.2.0
[debug] [2024-11-26T10:41:23.371Z] Time:          Tue Nov 26 2024 13:41:23 GMT+0300 (East Africa Time)
[debug] [2024-11-26T10:41:23.371Z] ----------------------------------------------------------------------
[debug] 
[debug] [2024-11-26T10:41:23.372Z] >>> [apiv2][query] GET https://firebase-public.firebaseio.com/cli.json [none]
[debug] [2024-11-26T10:41:23.413Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2024-11-26T10:41:23.413Z] > authorizing via signed-in user (mukisabahati@gmail.com)
[info] i  emulators: Starting emulators: dataconnect {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: dataconnect"}}
[debug] [2024-11-26T10:41:23.494Z] [logging] Logging Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[debug] [2024-11-26T10:41:23.495Z] [dataconnect.postgres] postgres server for dataconnect only supports listening on one address (127.0.0.1). Not listening on ::1
[debug] [2024-11-26T10:41:23.495Z] assigned listening specs for emulators {"user":{"hub":[{"address":"127.0.0.1","family":"IPv4","port":4400},{"address":"::1","family":"IPv6","port":4400}],"logging":[{"address":"127.0.0.1","family":"IPv4","port":4500}],"dataconnect":[{"address":"127.0.0.1","family":"IPv4","port":9399},{"address":"::1","family":"IPv6","port":9399}],"dataconnect.postgres":[{"address":"127.0.0.1","family":"IPv4","port":5432}]},"metadata":{"message":"assigned listening specs for emulators"}}
[debug] [2024-11-26T10:41:23.496Z] [hub] writing locator at /var/folders/bm/98wj5c990ql8_1yqcc8b752m0000gn/T/hub-tqf-dataconnect.json
[debug] [2024-11-26T10:41:23.502Z] 'fdc build' failed with error: Error starting up Data Connect build: spawnSync /Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3 Unknown system error -86 {"metadata":{"emulator":{"name":"dataconnect"},"message":"'fdc build' failed with error: Error starting up Data Connect build: spawnSync /Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3 Unknown system error -86"}}
[debug] [2024-11-26T10:41:23.503Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"dataconnect"},"message":"Ignoring unsupported arg: auto_download"}}
[debug] [2024-11-26T10:41:23.503Z] Ignoring unsupported arg: port {"metadata":{"emulator":{"name":"dataconnect"},"message":"Ignoring unsupported arg: port"}}
[debug] [2024-11-26T10:41:23.503Z] Starting Data Connect Emulator with command {"binary":"/Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3","args":["--logtostderr","-v=2","dev","--listen=127.0.0.1:9399,[::1]:9399","--config_dir=/Users/bahati/Workspace/Invertase/test/dataconnect","--enable_output_schema_extensions=true","--enable_output_generated_sdk=true"],"optionalArgs":["listen","config_dir","enable_output_schema_extensions","enable_output_generated_sdk"],"joinArgs":true,"shell":false,"port":9399} {"metadata":{"emulator":{"name":"dataconnect"},"message":"Starting Data Connect Emulator with command {\"binary\":\"/Users/bahati/.cache/firebase/emulators/dataconnect-emulator-1.7.3\",\"args\":[\"--logtostderr\",\"-v=2\",\"dev\",\"--listen=127.0.0.1:9399,[::1]:9399\",\"--config_dir=/Users/bahati/Workspace/Invertase/test/dataconnect\",\"--enable_output_schema_extensions=true\",\"--enable_output_generated_sdk=true\"],\"optionalArgs\":[\"listen\",\"config_dir\",\"enable_output_schema_extensions\",\"enable_output_generated_sdk\"],\"joinArgs\":true,\"shell\":false,\"port\":9399}"}}
[warn] ⚠  dataconnect: Fatal error occurred: 
   Error: spawn Unknown system error -86, 
   stopping all running emulators {"metadata":{"emulator":{"name":"dataconnect"},"message":"Fatal error occurred: \n   Error: spawn Unknown system error -86, \n   stopping all running emulators"}}
[info] i  dataconnect: Stopping Data Connect Emulator {"metadata":{"emulator":{"name":"dataconnect"},"message":"Stopping Data Connect Emulator"}}
[warn] ⚠  dataconnect: Could not spawn child process for Data Connect Emulator. {"metadata":{"emulator":{"name":"dataconnect"},"message":"Could not spawn child process for Data Connect Emulator."}}
[info] i  hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}

@joehan
Copy link
Contributor

joehan commented Nov 26, 2024

Hmmm, after digging into this a bit more I think this may be a executable incompatibility issue with the M3 chips. I'm surprised that you're hitting this though, because I've been able to run the emulator on M1 with no issues, which also is on ARM arch.

One thing you could try is to install Rosetta, and then try again:

softwareupdate --install-rosetta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emulator: dataconnect Issues related to the dataconnect emulator type: bug
5 participants