Closed supernovahimura closed 4 years ago
@supernovahimura : Hi, looking at your log file there is something wrong with the encryption related.
Why there is /B/ prefix in the secret value definition? How you define the parameter "keyPath" in your /functions/src/config.ts file?
getEncryptionKeyTest { Error: 3 INVALID_ARGUMENT: Resource ID [projects/12312323131/secrets/B/ASDMALDSACNAKSCNASCNKASC/UI=/versions/1] is not in a valid format.
@supernovahimura : Hola, mirando tu archivo de registro hay algo mal con el cifrado relacionado.
¿Por qué hay un prefijo / B / en la definición del valor secreto? ¿Cómo define el parámetro "keyPath" en su archivo /functions/src/config.ts?
getEncryptionKeyTest {Error: 3 INVALID_ARGUMENT: ID de recurso [projects / 12312323131 / secrets / B / ASDMALDSACNAKSCNASCNKASC / UI = / versiones / 1] no está en un formato válido.
as follows: keyPath: "B/ASDMALDSACNAKSCNASCNKASC/UI=" I get it with the following command head -c32 /dev/urandom | base64
@supernovahimura : After you generate the result from head command, use the random value generated as secret value inside the SECRET MANAGER API (if you're using the GCP).
And Inside the config.ts you should put the value of secret key name in the key path (not the secret value).
Thanks @alexissinglaire.
config.ts
encryption
getEncryptionSecret: Getting encryption key: 1) should succeed in getting encryption key
upload
3 passing (3s) 1 failing
1) config.ts
encryption
getEncryptionKeyTest { Error: 3 INVALID_ARGUMENT: Resource ID [projects/12312323131/secrets/B/ASDMALDSACNAKSCNASCNKASC/UI=/versions/1] is not in a valid format. at Object.callErrorFromStatus (opentrace-cloud-functions/functions/node_modules/@grpc/grpc-js/src/call.ts:79:24) at Http2CallStream.call.on (opentrace-cloud-functions/functions/node_modules/@grpc/grpc-js/src/client.ts:155:18) at Http2CallStream.emit (events.js:203:15) at process.nextTick (opentrace-cloud-functions/functions/node_modules/@grpc/grpc-js/src/call-stream.ts:186:14) at process._tickCallback (internal/process/next_tick.js:61:11) code: 3, details: 'Resource ID [projects/12312323131/secrets/B/ASDMALDSACNAKSCNASCNKASC/UI=/versions/1] is not in a valid format.', metadata: Metadata { internalRepr: Map { 'grpc-server-stats-bin' => [Array] }, options: {} }, note: 'Exception occurred in retry method that was not classified as transient' } npm ERR! Test failed. See above for more details.