{"record":{"id":"90c0c5fca3968114","repo":"usebruno/bruno","slug":"error-reading-pfx-file","errorCode":null,"errorMessage":"Error reading pfx file","messagePattern":"Error reading pfx file","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/network/cert-utils.js","lineNumber":104,"sourceCode":"            let certFilePath = interpolateString(clientCert?.certFilePath, interpolationOptions);\n            certFilePath = path.isAbsolute(certFilePath) ? certFilePath : path.join(collectionPath, certFilePath);\n            let keyFilePath = interpolateString(clientCert?.keyFilePath, interpolationOptions);\n            keyFilePath = path.isAbsolute(keyFilePath) ? keyFilePath : path.join(collectionPath, keyFilePath);\n\n            httpsAgentRequestFields['cert'] = fs.readFileSync(certFilePath);\n            httpsAgentRequestFields['key'] = fs.readFileSync(keyFilePath);\n          } catch (err) {\n            console.error('Error reading cert/key file', err);\n            throw new Error('Error reading cert/key file' + err);\n          }\n        } else if (type === 'pfx') {\n          try {\n            let pfxFilePath = interpolateString(clientCert?.pfxFilePath, interpolationOptions);\n            pfxFilePath = path.isAbsolute(pfxFilePath) ? pfxFilePath : path.join(collectionPath, pfxFilePath);\n            httpsAgentRequestFields['pfx'] = fs.readFileSync(pfxFilePath);\n          } catch (err) {\n            console.error('Error reading pfx file', err);\n            throw new Error('Error reading pfx file' + err);\n          }\n        }\n        httpsAgentRequestFields['passphrase'] = interpolateString(clientCert.passphrase, interpolationOptions);\n        break;\n      }\n    }\n  }\n\n  /**\n   * Proxy configuration\n   *\n   * New format:\n   * - disabled: boolean (optional, defaults to false)\n   * - inherit: boolean (required)\n   * - config: { protocol, hostname, port, auth, bypassProxy }\n   *\n   * When collection proxy has inherit=false and disabled=false, use collection-specific proxy\n   * When collection proxy has inherit=true, inherit from global preferences","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/network/cert-utils.js#L86-L122","documentation":"Error \"Error reading pfx file\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/network/cert-utils.js:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the pfx file path is correct and readable.","Check the file is a valid PKCS#12 bundle and not corrupted."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}