question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use CSC_LINK as base64 string

See original GitHub issue
  • Version: 21.2.0
  • Target: dmg

I created a * .p12 certificate. Converted it to base64 string (as recommended in your documentation) and saved it to GitHub Secrets.

In GitHub action I set two env:

  • CSC_LINK — base64 string
  • CSC_KEY_PASSWORD

However, I get an error when running an action:

  env:
    GH_TOKEN: ***
    CSC_LINK: ***
    CSC_KEY_PASSWORD: ***

...


Building app with electron-builder:
  • electron-builder  version=21.2.0 os=19.0.0
  • packaging       platform=darwin arch=x64 electron=8.0.0-beta.4 appOutDir=dist_electron/mac
  • downloading     url=https://github.com/electron/electron/releases/download/v8.0.0-beta.4/electron-v8.0.0-beta.4-darwin-x64.zip size=65 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v8.0.0-beta.4/electron-v8.0.0-beta.4-darwin-x64.zip duration=1.284s
  • default Electron icon is used  reason=application icon is not set
 ERROR  Error: /Users/runner/runners/2.162.0/work/play-shikimori-online/play-shikimori-online/*** doesn't exist
Error: /Users/runner/runners/2.162.0/work/play-shikimori-online/play-shikimori-online/*** doesn't exist
    at downloadCertificate (/Users/runner/runners/2.162.0/work/play-shikimori-online/play-shikimori-online/node_modules/app-builder-lib/src/codeSign/codesign.ts:43:11)
From previous event:
    at processImmediate (internal/timers.js:439:21)
    at process.topLevelDomainCallback (domain.js:130:23)
From previous event:
    at createKeychain (/Users/runner/runners/2.162.0/work/play-shikimori-online/play-shikimori-online/node_modules/app-builder-lib/src/codeSign/macCodeSign.ts:179:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at MacPackager.sign (/Users/runner/runners/2.162.0/work/play-shikimori-online/play-shikimori-online/node_modules/app-builder-lib/src/macPackager.ts:148:27)

I’m assuming the electron-builder is trying to use CSC_LINK as the filename and logically doesn’t find it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
morisukecommented, May 11, 2020

@cawa-93 It can be read from the following implementation that the end must end with “=” when using BASE64. Also, from my experience, BASE64 containing line feed code will cause an error.

https://github.com/electron-userland/electron-builder/blob/4e454f8b4390a4bcc38a30f065e0ed1eba2acee9/packages/app-builder-lib/src/codeSign/codesign.ts#L25

0reactions
stale[bot]commented, Jul 10, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I encode and decode a base64 string? - Stack Overflow
We encode the string into the bytes using UTF8 representation, which can represent all the possible string characters. We then serialize that data...
Read more >
Code Signing - electron-builder
CSC_LINK, The HTTPS link (or base64-encoded data, or file:// link, ... Thus, you can't export the certificate for signing code on a CI,...
Read more >
Base64 encoding: What sysadmins need to know - Red Hat
Once I explain this simple encoding format, I will introduce the base64 command-line utility that you can use to encode and decode data....
Read more >
Base64 - MDN Web Docs Glossary: Definitions of ... - Mozilla
Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a ......
Read more >
base64_encode - Manual - PHP
For anyone interested in the 'base64url' variant encoding, you can use this ... Use the function below to turn base64 encoded strings to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found