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

ECONNREFUSED when using clearFirestoreData on Node 18 #190

Open
ericvera opened this issue Jan 23, 2023 · 0 comments
Open

ECONNREFUSED when using clearFirestoreData on Node 18 #190

ericvera opened this issue Jan 23, 2023 · 0 comments
Labels
type: bug Something isn't working

Comments

@ericvera
Copy link

There is already a fix for this issue, but I could not find a related bug. (Pull request #184).

The problem is that node 18 and node 16 handle localhost differently. The code is hardcoded to use localhost which no longer works.

In addition to that it seems to load the process env variable to define the emulator host too soon which the pull request also addresses.

Version info

firebase-functions-test: 3.0.0

firebase-functions: 4.2.0

firebase-admin: 11.5.0

** Node: ** v18.13.0

Test case

Using node 18+ attempt to run

await firestoreFunctionsTest.firestore.clearFirestoreData({
projectId: 'project-id',
})

Expected behavior

It works.

Actual behavior

Fails with ECONNREFUSED ::1:8080.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants