FlowiseAI/Flowise · error · Error
Please specify your Google Application Credential
Error message
Please specify your Google Application Credential
What it means
buildGoogleCredentials() requires at least one of googleApplicationCredentialFilePath (path to a service-account JSON file) or googleApplicationCredential (the JSON content as a string) when a credential is attached (Object.keys(credentialData).length !== 0). If both are empty the function throws. Note: the immediately following 'More than one component' check on line 16 uses the SAME condition as line 14 and is therefore dead code — it can never fire, and the intended 'provided both' case is not actually guarded.
Source
Thrown at packages/components/src/google-utils.ts:15
import { getCredentialData, getCredentialParam, type ICommonObject, type INodeData } from '.'
import type { ChatVertexAIInput, VertexAIInput } from '@langchain/google-vertexai'
type SupportedAuthOptions = ChatVertexAIInput['authOptions'] | VertexAIInput['authOptions']
export const buildGoogleCredentials = async (nodeData: INodeData, options: ICommonObject): Promise<SupportedAuthOptions | null> => {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const googleApplicationCredentialFilePath = getCredentialParam('googleApplicationCredentialFilePath', credentialData, nodeData)
const googleApplicationCredential = getCredentialParam('googleApplicationCredential', credentialData, nodeData)
const projectID = getCredentialParam('projectID', credentialData, nodeData)
const authOptions: any = {}
if (Object.keys(credentialData).length !== 0) {
if (!googleApplicationCredentialFilePath && !googleApplicationCredential)
throw new Error('Please specify your Google Application Credential')
if (!googleApplicationCredentialFilePath && !googleApplicationCredential)
throw new Error(
'Error: More than one component has been inputted. Please use only one of the following: Google Application Credential File Path or Google Credential JSON Object'
)
if (googleApplicationCredentialFilePath && !googleApplicationCredential) authOptions.keyFile = googleApplicationCredentialFilePath
else if (!googleApplicationCredentialFilePath && googleApplicationCredential)
authOptions.credentials = JSON.parse(googleApplicationCredential)
if (projectID) authOptions.projectId = projectID
}
return authOptions
}
View on GitHub (pinned to abe4a8601a)
Solutions
- Provide EITHER the service-account JSON file path in googleApplicationCredentialFilePath OR paste the JSON content into googleApplicationCredential.
- Verify the credential component attached to the node is the one you intend (nodeData.credential resolves to it).
- If you intend to use Application Default Credentials via the environment, remove the credential from the node entirely so credentialData is empty and the function returns empty authOptions (falls back to ADC).
- Report the dead-code 'More than one component' branch: its condition should be `googleApplicationCredentialFilePath && googleApplicationCredential` to actually guard the both-provided case.
Example fix
// before: credential attached, both fields blank
credentialData = { name: 'GoogleAuth' } // no file path, no JSON
buildGoogleCredentials(nodeData, options) // throws
// after: provide one
credentialData.googleApplicationCredentialFilePath = '/etc/flowise/gcp-sa.json' Defensive patterns
Strategy: validation
Validate before calling
// Validate Google credential shape before calling buildGoogleCredentials
function assertGoogleCredential(credentialData) {
if (Object.keys(credentialData).length === 0) return // ADC fallback is fine
const { googleApplicationCredentialFilePath, googleApplicationCredential } = credentialData
if (!googleApplicationCredentialFilePath && !googleApplicationCredential) {
throw new Error('Provide either googleApplicationCredentialFilePath or googleApplicationCredential')
}
if (googleApplicationCredentialFilePath && googleApplicationCredential) {
throw new Error('Provide only ONE of file path or JSON object')
}
} Type guard
function hasGoogleCredentialSource(credentialData) {
const { googleApplicationCredentialFilePath, googleApplicationCredential } = credentialData
return Boolean(googleApplicationCredentialFilePath) !== Boolean(googleApplicationCredential) // exactly one
} Try / catch
try {
const auth = await buildGoogleCredentials(nodeData, options)
} catch (e) {
if (/specify your Google Application Credential/i.test(e.message)) {
// prompt the user to attach a Google credential with a file path or JSON
}
throw e
} Prevention
- Provide exactly one of file-path or JSON for Google credentials.
- If relying on ADC, do not attach a credential component to the node at all.
- Report the dead-code 'More than one component' branch upstream — its condition is identical to the 'Please specify' check and never fires.
When it happens
Trigger: A Google credential component is attached to the node (so credentialData is non-empty) but neither the file path nor the JSON object field is filled in.
Common situations: Created a Google Auth credential record but left both fields blank; the file path was cleared during an edit; migrating from file path to JSON object and removed the path before adding the JSON.
Related errors
- Cloudflare API Token is missing in credential.
- CometAPI API Key is missing or empty. Please provide a valid
- Fireworks API key not found. Please set the FIREWORKS_API_KE
- HuggingFace API key is required. Please configure it in the
- Perplexity API Key missing from credential
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/158262618d829bd9.
Report an issue: GitHub.