Closed zubairzahoor closed 2 years ago
Having the same issue with the package in firebase cloud functions.
This is most likely an issue with google-auth-library that was updated yesterday. Issue here: https://github.com/googleapis/google-auth-library-nodejs/issues/1374
This is most likely an issue with google-auth-library that was updated yesterday. Issue here: googleapis/google-auth-library-nodejs#1374
Yes, I also think the same, having the same issue with @google-cloud/logging-winston
package which uses google-auth-library
I'm having the same issue.
π for folks having issues, could you provide the output of npm ls google-auth-library
, a new version of the auth library was released yesterday, but the current latest
version of the library remained 7.12.0
. So, I'm not sure how npm would be pulling in 7.14.0
.
@SametSahin10 @zubairzahoor follow up question, what @google-cloud
library are you using?
wave for folks having issues, could you provide the output of
npm ls google-auth-library
, a new version of the auth library was released yesterday, but the currentlatest
version of the library remained7.12.0
. So, I'm not sure how npm would be pulling in7.14.0
.
Output of npm ls google-auth-library
:
functions@ /home/sametsahin/work/firebase-projects/flambu/functions βββ¬ firebase-admin@10.0.2 βββ¬ @google-cloud/firestore@4.15.1 β βββ¬ google-gax@2.30.0 β βββ google-auth-library@7.14.0 deduped βββ¬ @google-cloud/storage@5.18.2 βββ¬ @google-cloud/common@3.9.0 β βββ google-auth-library@7.14.0 deduped βββ google-auth-library@7.14.0
@SametSahin10 @zubairzahoor follow up question, what
@google-cloud
library are you using?
Does my last comment answer this as well?
@SametSahin10 @zubairzahoor if you remove your package-lock.json
and reinstall, you should stop seeing a build error.
I'm keeping this open until the problem is fixed, for now I just rolled back google-gax
, which is the dependency forcing 7.14.0
of the auth library.
Hey everyone! Apologies for the broken builds; the type-related issues should now be resolved via (nodejs-common
v3.10.0
) https://github.com/googleapis/nodejs-common/pull/733.
@danielbankhead I think because of the collision on the key-name authClient
we should call the update to GoogleAuth breaking, or else folks could end up with trees that can't compile.
What do you think?
edit: perhaps as long as all the dependencies are functioning together, we're in okay shape, let's just monitor this closely throughout the day.
[Synced offline, sharing here for visibility]
I think we should be fine, nodejs-common
is the only library in googleapis
with the name collision (others use the conventional auth
param) - and is the only library with issues with the updated auth library.
https://github.com/googleapis/nodejs-common/pull/733 should resolve this, however I'll keep this open and monitor over the next few days.
π for folks having issues, could you provide the output of
npm ls google-auth-library
, a new version of the auth library was released yesterday, but the currentlatest
version of the library remained7.12.0
. So, I'm not sure how npm would be pulling in7.14.0
.
@bcoe : Here is the output
βββ¬ @google-cloud/logging-winston@4.1.2 β βββ google-auth-library@7.14.0 βββ¬ @google-cloud/logging@9.7.0 β βββ¬ @google-cloud/common@3.9.0 β β βββ google-auth-library@7.14.0 deduped β βββ google-auth-library@7.14.0 deduped β βββ¬ google-gax@2.30.0 β βββ google-auth-library@7.14.0 deduped βββ¬ @google-cloud/storage@5.18.2 βββ google-auth-library@7.14.0 deduped
Hi guys, me output β βββ¬ @. β βββ¬ @@. β β βββ¬ @. β β βββ @. deduped β βββ¬ @@. β βββ¬ @@. β β βββ @. β βββ @. deduped βββ¬ @. βββ¬ @@. β βββ @. β βββ¬ @. β βββ @. deduped βββ @.
Looks like when google-auth-library is a dependency of @. is installing @. Good luck!
On Wed, Feb 23, 2022 at 4:10 PM Daniel Bankhead @.***> wrote:
[Synced offline, sharing here for visibility]
I think we should be fine, nodejs-common is the only library in googleapis https://github.com/googleapis with the name collision (others use the conventional auth param) - and is the only library with issues with the updated auth library.
733 https://github.com/googleapis/nodejs-common/pull/733 should
resolve this, however I'll keep this open and monitor over the next few days.
β Reply to this email directly, view it on GitHub https://github.com/googleapis/nodejs-common/issues/734#issuecomment-1049218940, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATVDB6KB5DGT7Y3XDBKPCELU4VEL3ANCNFSM5PDMVTGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
@finallyRaunak a clean install (make sure have @google-cloud/common@3.10.0) should address the problem you were seeing.
For anyone else bumping into issues, use npm ls
to list deps, and ensure your tree has the latest patch.
Things are looking stable as of @google-cloud/common@3.10.0
- closing. https://github.com/googleapis/nodejs-common/pull/733.
I still have a similar issue.
node_modules/@google-cloud/common/build/src/service.d.ts:29:18 - error TS2430: Interface 'ServiceOptions' incorrectly extends interface 'GoogleAuthOptions<JSONClient>'.
Types of property 'authClient' are incompatible.
Type 'GoogleAuth<JSONClient> | undefined' is not assignable to type 'JWT | UserRefreshClient | Impersonated | BaseExternalAccountClient | undefined'.
Type 'GoogleAuth<JSONClient>' is not assignable to type 'JWT | UserRefreshClient | Impersonated | BaseExternalAccountClient | undefined'.
Type 'GoogleAuth<JSONClient>' is not assignable to type 'JWT'.
29 export interface ServiceOptions extends GoogleAuthOptions {
~~~~~~~~~~~~~~
node_modules/@google-cloud/common/build/src/util.d.ts:42:18 - error TS2430: Interface 'MakeAuthenticatedRequestFactoryConfig' incorrectly extends interface 'GoogleAuthOptions<JSONClient>'.
Types of property 'authClient' are incompatible.
Type 'GoogleAuth<JSONClient> | undefined' is not assignable to type 'JWT | UserRefreshClient | Impersonated | BaseExternalAccountClient | undefined'.
Type 'GoogleAuth<JSONClient>' is not assignable to type 'JWT | UserRefreshClient | Impersonated | BaseExternalAccountClient | undefined'.
Type 'GoogleAuth<JSONClient>' is missing the following properties from type 'JWT': createScoped, getRequestMetadataAsync, fetchIdToken, hasUserScopes, and 53 more.
42 export interface MakeAuthenticatedRequestFactoryConfig extends GoogleAuthOptions {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using Firebase Functions with typeScript. Using the following imports:
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
import * as geofire from "geofire-common";
import * as key from './service-account-key.json';
import { google } from 'googleapis';
Running Β΄npm ls google-auth-libraryΒ΄ gives me:
βββ (empty)
Tried updating all npm's to latest version. My package.json looks like this:
{
"name": "functions",
"scripts": {
"lint": "eslint --ext .js,.ts .",
"build": "tsc",
"serve": "npm run build && firebase emulators:start --only functions",
"shell": "npm run build && firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "16"
},
"main": "lib/index.js",
"dependencies": {
"@google-cloud/logging": "^9.8.0",
"date-fns": "^2.28.0",
"dateformat": "^5.0.2",
"firebase": "^9.6.8",
"firebase-admin": "^9.8.0",
"firebase-functions": "^3.18.1",
"geofire-common": "^5.2.0",
"googleapis": "^96.0.0",
"request": "^2.88.2"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.8.0",
"eslint": "^7.6.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-promise": "^6.0.0",
"firebase-functions-test": "^0.2.0",
"typescript": "^3.8.0"
},
"private": true
}
Adding "skipLibCheck": true
to my tsconfig.json solves the issue but seems like a workaround.
@appfrilans could I bother you to rm package-lock.json
, and to reinstall. My guess is you're still on an older version of the auth library.
Solved it by manually installing @google-cloud/common@3.10.0 with npm install --save @google-cloud/logging
@appfrilans great, sorry for the slow response I'm glad you're unblocked π
For people who arrive here wondering why they can't deploy new Firebase Cloud Functions anymore:
It seems to me that firebase-admin@10.0.2
requires @google-cloud/storage@5.3.0
which requires @google-cloud/common@3.6.0
.
For everyone looking to resolve that without using skipLibCheck:true
, run npm install @google-cloud/common@3.10.0
and you should be able to deploy your Cloud Functions again.
Since today, I am unable to build my project with this error. Nothing changed from our side,
Types of property 'authClient' are incompatible. 11:08:51 Type 'GoogleAuth | undefined' is not assignable to type 'JSONClient | undefined'.
11:08:51 node_modules/@google-cloud/common/build/src/util.d.ts(42,18): error TS2430: Interface 'MakeAuthenticatedRequestFactoryConfig' incorrectly extends interface 'GoogleAuthOptions'.
11:08:51 Types of property 'authClient' are incompatible.
11:08:51 Type 'GoogleAuth | undefined' is not assignable to type 'JSONClient | undefined'.
11:08:51 Type 'GoogleAuth' is not assignable to type 'JSONClient | undefined'.
11:08:51 Type 'GoogleAuth' is missing the following properties from type 'JWT': createScoped, getRequestMetadataAsync, fetchIdToken, hasUserScopes
Environment details
@google-cloud/common
version: 3.9.0Steps to reproduce
A simple npm run build causes this.