2017-12-30 25 views
0

Google 클라우드 기능에 GitHub auto-deployer을 설치했지만 GitHub 저장소에 기능을 추가하면 "The request has errors"과 다음과 같은 추상 오류 메시지가 표시됩니다. - 상세한 설명. 여기서 구체적으로 무엇이 잘못 될 수 있습니까?Google 클라우드 기능 GitHub 자동 배포자 메시지 : 요청에 오류가 있음

E  githubAutoDeployer [CODE] 2017-12-30 19:19:37.362 
Failed to create function projects/[MY_BUCKET]/locations/us-central/functions/[MY_FUNCTION] { Error: The request has errors 
at Request._callback (/user_code/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:85:15) 
at Request.self.callback (/user_code/node_modules/googleapis/node_modules/request/request.js:186:22) 
at emitTwo (events.js:106:13) 
at Request.emit (events.js:191:7) 
at Request.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1163:10) 
at emitOne (events.js:96:13) 
at Request.emit (events.js:188:7) 
at IncomingMessage.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1085:12) 
at IncomingMessage.g (events.js:292:16) 
at emitNone (events.js:91:20) 
code: 400, 
errors: 
[ { message: 'The request has errors',                
    domain: 'global',           
    reason: 'badRequest' } ] } 
E  githubAutoDeployer [CODE] 2017-12-30 19:19:37.363 Error: The request has errors 
at Request._callback (/user_code/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:85:15) 
at Request.self.callback (/user_code/node_modules/googleapis/node_modules/request/request.js:186:22) 
at emitTwo (events.js:106:13) 
at Request.emit (events.js:191:7) 
at Request.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1163:10) 
at emitOne (events.js:96:13) 
at Request.emit (events.js:188:7) 
at IncomingMessage.<anonymous> (/user_code/node_modules/googleapis/node_modules/request/request.js:1085:12) 
at IncomingMessage.g (events.js:292:16) 
at emitNone (events.js:91:20) 
D  githubAutoDeployer [CODE] 2017-12-30 19:19:37.365 
Function execution took 2319 ms, finished with status code: 500 

UPDATE 스택 추적에 google-auth-library의 대한 언급은 내가 뭔가 내 자격 증명이 잘못 될 수 있다고 생각했다. 그러나 gcloud auth list의 출력이 확실히 나타납니다 아마도 약간 틀에 얽매이지 않는 무엇

Credentialed Accounts 
ACTIVE ACCOUNT 
*  [MY_ID]@gmail.com 

UPDATE 것은 내 config.json에서 "path":"",을 가지고있다. 하지만 내 index.js은 내 저장소의 상단에 직접 위치하므로 지정할 경로가 없습니다. Google 클라우드 기능에서 오류가 githubAutoDeployer에 의해 전달되는 경우 UPDATEThis

은 (업스트림 서버에 대한 불행하게도 소스 코드를 분명히 가능하지 않음)입니다 :

gcf.projects.locations.functions.create({ resource, location }, (err, operation) => { 
    if (err && err.errors && err.errors[0] && err.errors[0].reason === 'alreadyExists') { 
    // ... 
    } else if (err) { 
    console.error(`Failed to create function ${resource.name}`, err); 
    reject(err); 
    } 

답변

0

말썽 내가 "location" : "us-central"를 지정하는 것을이었다 대신 us-central1 (어느 supports Google Cloud Functions) 내 config.json에.

Google Cloud Functions API (서비스 계정 및 액세스 토큰 등을 획득 한 후)으로 원시 POST 요청을 보냄으로써 알게되었습니다. 이 레벨에서 API는 명확한 오류 표시를 반환 :

"fieldViolations": [ 
    { 
    "field": "region", 
    "description": "region us-central is not supported." 
    } 
] 

분명히하고 githubAutoDeployer가 같은 통화를 시도 할 때 불행하게도이 로그 파일 중 하나를 입력하지 않습니다.

관련 문제