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

bug: Missing App configuration value: "projectId" #391

Closed
prescottprue opened this issue May 1, 2021 · 7 comments
Closed

bug: Missing App configuration value: "projectId" #391

prescottprue opened this issue May 1, 2021 · 7 comments

Comments

@prescottprue
Copy link
Owner

prescottprue commented May 1, 2021

Describe the bug

Uncaught (in promise) FirebaseError: Installations: Missing App configuration value: "projectId" (installations/missing-app-config-values)
As described here by @mikeover

To Reproduce
Steps to reproduce the behavior:

Expected behavior/code
A clear and concise description of what you expected to happen (or code).

Possible Solution

  • Confirming settings in .firebaserc under projects matches branch structure (i.e. there is a project alias for the current branch such as prod for the prod branch)
    Additional Context/Screenshots
@prescottprue
Copy link
Owner Author

v8.0.0 was released with a bunch of major changes including how config is loaded in CI - @mikeover please reach out if you duplicate this issue with the new version

@mikeover
Copy link
Contributor

mikeover commented May 3, 2021

@prescottprue Trying this today, initially my github deploy action is failing with:

i  functions: updating Node.js 14 (Beta) function indexUser(us-central1)...

Functions deploy had errors with the following functions:
	indexUser(us-central1)

To try redeploying those functions, run:
    firebase deploy --only "functions:indexUser"

To continue deploying other features (such as database), run:
    firebase deploy --except functions

Error: Functions did not deploy properly.
✖ Error: Error in deploying to firebase:
 

 undefined

@prescottprue
Copy link
Owner Author

prescottprue commented May 3, 2021

@mikeover Thanks for such a quick response! Thats weird... Were any messages writing to your functions logs in the console?

You should be able to add the following to the deploy workflow right after the deploy step to archive the log files that Firebase generates:

# Archive debug logs if deploy fails
- name: Archive Debug Logs
   if: ${{ failure() }}
   uses: actions/upload-artifact@v2
    with:
       name: debug-logs
       path: '*.log'

On that note, I'm going to add ^ to the deploy workflow in the generator for future debugging 🚀

prescottprue added a commit that referenced this issue May 3, 2021
* feat: add debug log archiving to deploy workflow - #391
@mikeover
Copy link
Contributor

mikeover commented May 3, 2021

@prescottprue I'm not sure I understand your question but I added that step after the deploy but all it gave me was

Warning: No files were found with the provided path: *.log. No artifacts will be uploaded.

@mikeover
Copy link
Contributor

mikeover commented May 3, 2021

Note also that trying to just deploy that function from the command line via firebase deploy --only "functions:indexUser" yields:

Error: package.json in functions directory has an engines field which is unsupported. The only valid choices are: {"node": "8"} and {"node": "10"}. Note that Node.js 6 is now deprecated.

In firebase logs I see this error:

{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":3,"message":"Build failed: npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.\nnpm ERR! \nnpm ERR! \nnpm ERR! Invalid: lock file's ts-jest@26.5.5 does not satisfy ts-jest@^26.4.2a\nnpm ERR! \n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /builder/home/.npm/_logs/2021-05-03T23_55_59_120Z-debug.log; Error ID: beaf8772"},"authenticationInfo":{"principalEmail":"mike@mail.com"},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/testapp-311417/locations/us-central1/functions/indexUser"} 

I went into the functions dir and ran npm install - not sure why there's a disconnect on the versions.

@mikeover
Copy link
Contributor

mikeover commented May 4, 2021

Fixed with this change and ready to roll:

diff --git a/functions/package.json b/functions/package.json
index cea7df3..be86c55 100644
--- a/functions/package.json
+++ b/functions/package.json
@@ -36,7 +36,7 @@
     "firebase-functions-test": "^0.2.3",
     "jest": "^26.6.3",
     "rimraf": "^3.0.2",
-    "ts-jest": "^26.4.2a",
+    "ts-jest": "^26.5.5",
     "ts-node": "^9.1.1",
     "typescript": "^4.2.4"
   }

prescottprue added a commit that referenced this issue May 5, 2021
Co-Authored-By: Mike Over <mikeover@users.noreply.github.com>
@prescottprue prescottprue mentioned this issue May 5, 2021
prescottprue added a commit that referenced this issue May 5, 2021
* feat: add debug log archiving to deploy workflow - #391
* fix: remove a from ts-jest version - #391

Co-Authored-By: Mike Over <mikeover@users.noreply.github.com>
@prescottprue
Copy link
Owner Author

prescottprue commented May 5, 2021

The engines should be set to 14.0.0 with v8.0.0 of the generator which matches what the newer versions of firebase-tools should, so not sure why that wouldn't be picked up correctly. Was this from your local machine or in CI? If it was from your local it could be due to an old version of firebase tools which is installed globally - firebase-tools is included as a dev dep too (which is used in CI), but you can use with $(yarn bin)/firebase or $(npm bin)/firebase

That dependency version issue issue is fixed in v8.0.1.

Thanks for all of your help with reporting - added you as a contributor on that last commit/PR. Let me know if anything else isn't running perfectly or if you have any ideas for features 😄

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

2 participants