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

firebase-functions 6.0.0 breaks firebase-functions-test #1648

Open
IchordeDionysos opened this issue Nov 25, 2024 · 3 comments
Open

firebase-functions 6.0.0 breaks firebase-functions-test #1648

IchordeDionysos opened this issue Nov 25, 2024 · 3 comments

Comments

@IchordeDionysos
Copy link

Related issues

firebase/firebase-functions-test#241

A PR to fix it has been provided here:
firebase/firebase-functions-test#243

[REQUIRED] Version info

node: 20

firebase-functions: 6.0.0

firebase-tools: 13.27.0

firebase-admin: 13.0.1

firebase-functions-test: 3.3.0

[REQUIRED] Test case

  1. Install firebase-functions >6.0.0
  2. Install firebase-functions-test any version, e.g. 3.3.0
  3. Run the following code:
  const userRecord: UserRecord = testEnv.auth.makeUserRecord({
    email: customer.email,
    displayName: customer.displayName,
    uid: userUid,
  });

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

No errors are thrown.

[REQUIRED] Actual behavior

Errors are thrown due to the import requirements changing.

TypeError: Cannot read properties of undefined (reading 'userRecordConstructor')
      at Object.makeUserRecord (node_modules/firebase-functions-test/lib/providers/auth.js:30:38)
      at mockCustomer (test/helpers/customers.ts:10:47)
      at Context.<anonymous> (test/purchases/handlers/savePurchase.spec.ts:11:38)
      at processImmediate (node:internal/timers:478:21)
      at process.callbackTrampoline (node:internal/async_hooks:130:17)

Were you able to successfully deploy your functions?

n/a

@google-oss-bot
Copy link
Collaborator

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • 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.

@IchordeDionysos
Copy link
Author

@blidd-google @taeold this breaks our and many others use-cases and prevents them from upgrading to firebase-functions 6.0.0.

Would be amazing if you could work on a fix there ☺️
Thanks already 🫶

@Nushio
Copy link

Nushio commented Nov 26, 2024

Been holding off from creating an issue here, but thanks for this! I wish more support was provided to the firebase-functions-test project, it's very important for established Firebase projects!

@CorieW CorieW added api: functions dependencies Pull requests that update a dependency file and removed needs-triage dependencies Pull requests that update a dependency file api: functions labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants