Sometimes when running tests (seems to occur when running the tests for @small-tech/https), I’m hitting the following error:
file:///Users/aral/Projects/other/auto-encrypt/lib/AcmeRequest.js:262
protectedHeader.jwk = AcmeRequest.accountIdentity.publicJWK
^
TypeError: Cannot read properties of null (reading 'publicJWK')
at NewAccountRequest.prepare (file:///Users/aral/Projects/other/auto-encrypt/lib/AcmeRequest.js:262:57)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async NewAccountRequest.request (file:///Users/aral/Projects/other/auto-encrypt/lib/AcmeRequest.js:107:29)
at async NewAccountRequest.execute (file:///Users/aral/Projects/other/auto-encrypt/lib/acme-requests/NewAccountRequest.js:23:22)
at async Account.init (file:///Users/aral/Projects/other/auto-encrypt/lib/Account.js:67:19)
at async Account.getInstanceAsync (file:///Users/aral/Projects/other/auto-encrypt/lib/Account.js:37:7)
at async file:///Users/aral/Projects/other/auto-encrypt/lib/Certificate.js:227:27
at async #initialiseAcmeRequest (file:///Users/aral/Projects/other/auto-encrypt/lib/Certificate.js:231:9)
at async Certificate.checkForRenewal (file:///Users/aral/Projects/other/auto-encrypt/lib/Certificate.js:362:5)
Node.js v24.6.0
Likely a race condition.
Sometimes when running tests (seems to occur when running the tests for @small-tech/https), I’m hitting the following error:
```
file:///Users/aral/Projects/other/auto-encrypt/lib/AcmeRequest.js:262
protectedHeader.jwk = AcmeRequest.accountIdentity.publicJWK
^
TypeError: Cannot read properties of null (reading 'publicJWK')
at NewAccountRequest.prepare (file:///Users/aral/Projects/other/auto-encrypt/lib/AcmeRequest.js:262:57)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async NewAccountRequest.request (file:///Users/aral/Projects/other/auto-encrypt/lib/AcmeRequest.js:107:29)
at async NewAccountRequest.execute (file:///Users/aral/Projects/other/auto-encrypt/lib/acme-requests/NewAccountRequest.js:23:22)
at async Account.init (file:///Users/aral/Projects/other/auto-encrypt/lib/Account.js:67:19)
at async Account.getInstanceAsync (file:///Users/aral/Projects/other/auto-encrypt/lib/Account.js:37:7)
at async file:///Users/aral/Projects/other/auto-encrypt/lib/Certificate.js:227:27
at async #initialiseAcmeRequest (file:///Users/aral/Projects/other/auto-encrypt/lib/Certificate.js:231:9)
at async Certificate.checkForRenewal (file:///Users/aral/Projects/other/auto-encrypt/lib/Certificate.js:362:5)
Node.js v24.6.0
```
Likely a race condition.