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.

HTTPError: Signing request failed: 400 Bad Request

See original GitHub issue

Using electron-builder, I got HTTPError .

Here is the afterPack script I am using:

const util = require('util')
const childProcess = require('child_process')
const exec = util.promisify(childProcess.exec)

async function evsProcess(appPath) {
  const res = await exec('python3 -m castlabs_evs.vmp sign-pkg --persistent ' + appPath)
  console.log(res.stdout)
}
await evsProcess(context.appOutDir).catch(e => console.log(e))

stdout is:

'Signing: /Users/XXXXX/path/to/project/dist_electron/win-ia32-unpacked/XXXXX.exe\n' +
    ' - Verifying existing VMP signature\n' +
    ' - Signature invalid: Certificate is valid for development only\n' +
    ' - Requesting VMP signature\n' +
    'HTTPError: Signing request failed: 400 Bad Request\n' +
    ' <- InvalidDataError: Failed to generate verification digest\n' +
    " <- NameError: name 'HASH_BLOCK' is not defined\n",

Curiously, building for macOS doesn’t cause any problems, and building for Windows gives this error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
PhantomNimbicommented, Aug 17, 2021

Ok, good news that you may have found the problem.

If it persists I need to know the specific version of Electron for Content Security, a.k.a. ECS, that is used - this is different from EVS (which is the VMP signing service/client). There is certainly a possibility that a specific version of ECS has been incorrectly published, but this would mean other versions would still work. I checked the service itself after your last question and there was no problem signing the latest stable ECS release.

I’m not familiar with nativefier but it is also possible, albeit unlikely, that the packager is doing something to the executable that is incompatible with EVS, so a version update there could potentially also be interesting to look at.

I found my issue. My script wasn’t separating the lists properly. The list I had set to use Castlabs_EVS was in fact NOT using Castlabs_EVS due to this error. I managed to get it fixed and am updating my repo with the fixes right now.

0reactions
khwaajcommented, Oct 13, 2021

Since this appears to be solved I’m closing it, feel free to reopen if some issue persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 Bad Request error indicates that the server cannot or process the request due to a client error. Read about the common...
Read more >
How to Fix the 400 Bad Request Error - Lifewire
The 400 Bad Request error means that the request you sent to the website server to view the page was somehow incorrect.
Read more >
How to Fix a 400 Bad Request Error: 8 Easy Methods
Most HTTP error 400 bad requests are caused by malformed request syntax, invalid request message framing, or deceptive request routing.
Read more >
400 Bad Request Error: What It Is and How to Fix It
The 400 Bad Request Error is an HTTP response status code indicating that the server was unable to process the request sent by...
Read more >
What is HTTP error 400 and how do you fix it? - IT PRO
Since a malformed URL is the most common cause of the 400 Bad Request error, make sure there are no typing or syntax...
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