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

Vague error message when seed dir not found #5851

Closed
gummz opened this issue May 16, 2023 · 3 comments · Fixed by #5905
Closed

Vague error message when seed dir not found #5851

gummz opened this issue May 16, 2023 · 3 comments · Fixed by #5905

Comments

@gummz
Copy link

gummz commented May 16, 2023

[REQUIRED] Environment info

firebase-tools: 11.30.0

Platform: Ubuntu 22.04 LTS

[REQUIRED] Test case

[REQUIRED] Steps to reproduce

  1. Call firebase emulators:start --import=./seed, where ./seed does not exist.

[REQUIRED] Expected behavior

The error message should be clear that the ./seed directory does not exist.

[REQUIRED] Actual behavior

  1. The error message is An unexpected error occurred.
[2023-05-16T23:20:42.930Z] > 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"]
[2023-05-16T23:20:42.931Z] > authorizing via signed-in user (gummi94@gmail.com)
[2023-05-16T23:20:42.984Z] openjdk version "18.0.2-ea" 2022-07-19

[2023-05-16T23:20:42.984Z] OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode, sharing)

[2023-05-16T23:20:42.990Z] Parsed Java major version: 18
i  emulators: Starting emulators: auth, functions, firestore, database, hosting, pubsub, storage, eventarc, extensions {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: auth, functions, firestore, database, hosting, pubsub, storage, eventarc, extensions"}}
[2023-05-16T23:20:42.993Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/remembsite [none]
[2023-05-16T23:20:43.293Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/remembsite 200
[2023-05-16T23:20:43.293Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/remembsite {"projectId":"remembsite","projectNumber":"83756440614","displayName":"remembsite","name":"projects/remembsite","resources":{"hostingSite":"remembsite","realtimeDatabaseInstance":"remembsite-default-rtdb","storageBucket":"remembsite.appspot.com","locationId":"europe-west"},"state":"ACTIVE","etag":"1_9d3f7861-9ed8-467a-9b41-d29f1365be3f"}
[2023-05-16T23:20:43.297Z] [logging] Logging Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [auth] Authentication Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [firestore] Firestore Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [firestore.websocket] websocket server for firestore only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [database] Database Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [hosting] Hosting Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [pubsub] Pub/Sub Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.298Z] [storage] Storage Emulator only supports listening on one address (127.0.0.1). Not listening on ::1
[2023-05-16T23:20:43.299Z] assigned listening specs for emulators {"user":{"hub":[{"address":"127.0.0.1","family":"IPv4","port":4400},{"address":"::1","family":"IPv6","port":4400}],"ui":[{"address":"127.0.0.1","family":"IPv4","port":4000},{"address":"::1","family":"IPv6","port":4000}],"logging":[{"address":"127.0.0.1","family":"IPv4","port":4500}],"auth":[{"address":"127.0.0.1","family":"IPv4","port":9099}],"firestore":[{"address":"127.0.0.1","family":"IPv4","port":8080}],"firestore.websocket":[{"address":"127.0.0.1","family":"IPv4","port":9150}],"database":[{"address":"127.0.0.1","family":"IPv4","port":9005}],"hosting":[{"address":"127.0.0.1","family":"IPv4","port":5000}],"pubsub":[{"address":"127.0.0.1","family":"IPv4","port":8085}],"storage":[{"address":"127.0.0.1","family":"IPv4","port":9199}]},"metadata":{"message":"assigned listening specs for emulators"}}
[2023-05-16T23:20:43.302Z] [hub] writing locator at /tmp/hub-remembsite.json
i  emulators: Shutting down emulators. {"metadata":{"emulator":{"name":"hub"},"message":"Shutting down emulators."}}
i  hub: Stopping emulator hub {"metadata":{"emulator":{"name":"hub"},"message":"Stopping emulator hub"}}
[2023-05-16T23:20:43.308Z] Error: ENOENT: no such file or directory, lstat '/home/gudmundur/projects/remembflutter/.seed'
    at Object.lstatSync (node:fs:1529:3)
    at Object.lstatSync (pkg/prelude/bootstrap.js:1503:33)
    at findExportMetadata (/home/gudmundur/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/controller.js:119:32)
    at Object.startAll (/home/gudmundur/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/controller.js:269:31)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /home/gudmundur/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/commands/emulators-start.js:32:43

Error: An unexpected error has occurred.
@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.

@aalej
Copy link
Contributor

aalej commented May 18, 2023

Hi @gummz, thanks for raising this issue. I was able to reproduce the error using the steps you provided. I agree that we could provide a more helpful error message here so that it would be easier to determine the cause.

I’ll notify the team of this issue so that we can provide more context and investigate this behavior.

@christhompsongoogle
Copy link
Contributor

We could print the error without the debug flag:

[2023-05-16T23:20:43.308Z] Error: ENOENT: no such file or directory, lstat '/home/gudmundur/projects/remembflutter/.seed'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants