[GH-ISSUE #311] Node example SSL Error #2212

Closed
opened 2026-03-15 18:03:13 +03:00 by kerem · 2 comments
Owner

Originally created by @harjot1singh on GitHub (Aug 25, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/311

When trying the example in node 10.16.0: Error: error:09091064:PEM routines:PEM_read_bio_ex:bad base64 decode.

I'm unable to get it to work. Any ideas? I assume it's something to do with SSL. I'm on Mac.

Trace

uploads_1        | [test ]     error:09091064:PEM routines:PEM_read_bio_ex:bad base64 decode
uploads_1        | [test ] 
uploads_1        | [test ]       at Object.sign (node_modules/jwa/index.js:152:45)
uploads_1        | [test ]       at Object.jwsSign [as sign] (node_modules/jws/lib/sign-stream.js:32:24)
uploads_1        | [test ]       at GoogleToken.requestToken (node_modules/gtoken/build/src/index.js:197:31)
uploads_1        | [test ]       at GoogleToken.getTokenAsync (node_modules/gtoken/build/src/index.js:136:21)
uploads_1        | [test ]       at GoogleToken.getToken (node_modules/gtoken/build/src/index.js:78:21)
uploads_1        | [test ]       at JWT.refreshTokenNoCache (node_modules/google-auth-library/build/src/auth/jwtclient.js:148:36)
uploads_1        | [test ]       at JWT.refreshToken (node_modules/google-auth-library/build/src/auth/oauth2client.js:150:24)
uploads_1        | [test ]       at JWT.getRequestMetadataAsync (node_modules/google-auth-library/build/src/auth/oauth2client.js:259:28)
uploads_1        | [test ]       at JWT.getRequestMetadataAsync (node_modules/google-auth-library/build/src/auth/jwtclient.js:81:26)
Originally created by @harjot1singh on GitHub (Aug 25, 2020). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/311 When trying the example in node 10.16.0: `Error: error:09091064:PEM routines:PEM_read_bio_ex:bad base64 decode`. I'm unable to get it to work. Any ideas? I assume it's something to do with SSL. I'm on Mac. Trace ``` uploads_1 | [test ] error:09091064:PEM routines:PEM_read_bio_ex:bad base64 decode uploads_1 | [test ] uploads_1 | [test ] at Object.sign (node_modules/jwa/index.js:152:45) uploads_1 | [test ] at Object.jwsSign [as sign] (node_modules/jws/lib/sign-stream.js:32:24) uploads_1 | [test ] at GoogleToken.requestToken (node_modules/gtoken/build/src/index.js:197:31) uploads_1 | [test ] at GoogleToken.getTokenAsync (node_modules/gtoken/build/src/index.js:136:21) uploads_1 | [test ] at GoogleToken.getToken (node_modules/gtoken/build/src/index.js:78:21) uploads_1 | [test ] at JWT.refreshTokenNoCache (node_modules/google-auth-library/build/src/auth/jwtclient.js:148:36) uploads_1 | [test ] at JWT.refreshToken (node_modules/google-auth-library/build/src/auth/oauth2client.js:150:24) uploads_1 | [test ] at JWT.getRequestMetadataAsync (node_modules/google-auth-library/build/src/auth/oauth2client.js:259:28) uploads_1 | [test ] at JWT.getRequestMetadataAsync (node_modules/google-auth-library/build/src/auth/jwtclient.js:81:26) ```
kerem closed this issue 2026-03-15 18:03:18 +03:00
Author
Owner

@harjot1singh commented on GitHub (Aug 25, 2020):

I think this might be more related to Docker/module installation. Will investigate further, because I can get it to work if I don't run the example in a Docker container.

<!-- gh-comment-id:680104888 --> @harjot1singh commented on GitHub (Aug 25, 2020): I think this might be more related to Docker/module installation. Will investigate further, because I can get it to work if I don't run the example in a Docker container.
Author
Owner

@harjot1singh commented on GitHub (Aug 25, 2020):

For anyone who encounters this, do not supply a dummy GOOGLE_APPLICATION_CREDENTIALS environment variable. The @google-cloud/storage will attempt to use it.

Completely unrelated to the fake gcs server :)

<!-- gh-comment-id:680184255 --> @harjot1singh commented on GitHub (Aug 25, 2020): For anyone who encounters this, do not supply a dummy `GOOGLE_APPLICATION_CREDENTIALS` environment variable. The `@google-cloud/storage` will attempt to use it. Completely unrelated to the fake gcs server :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#2212
No description provided.