beakerbrowser / homebase

Self-deployable tool for hosting hyper:// websites
MIT License
406 stars 36 forks source link

approveDomains error when accessing site over dat or https #12

Closed ollybromham closed 6 years ago

ollybromham commented 6 years ago

Successfully serves the dat address but upon accessing over https I get the following error

[ERROR] Something went wrong in approveDomains:
TypeError: fs.statAsync is not a function
    at Object.checkAsync (/usr/lib/node_modules/@beaker/homebase/node_modules/le-store-certbot/index.js:233:14)
    at Object.checkAsync (/usr/lib/node_modules/@beaker/homebase/node_modules/greenlock/lib/core.js:392:38)
    at Object.getAsync (/usr/lib/node_modules/@beaker/homebase/node_modules/greenlock/lib/core.js:407:34)
    at /usr/lib/node_modules/@beaker/homebase/node_modules/greenlock/index.js:409:43
    at Object.approveDomains (/usr/lib/node_modules/@beaker/homebase/lib/lets-encrypt.js:13:14)
    at Object.gl.getCertificates (/usr/lib/node_modules/@beaker/homebase/node_modules/greenlock/index.js:377:14)
    at Object.tryCatcher (/usr/lib/node_modules/@beaker/homebase/node_modules/bluebird/js/release/util.js:16:23)
    at Object.ret [as getCertificatesAsync] (eval at makeNodePromisifiedEval (/usr/lib/node_modules/@beaker/homebase/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
    at Object.sniCallback (/usr/lib/node_modules/@beaker/homebase/node_modules/le-sni-auto/index.js:120:27)
    at TLSSocket.gl.tlsOptions.SNICallback [as _SNICallback] (/usr/lib/node_modules/@beaker/homebase/node_modules/greenlock/index.js:444:16)
    at loadSNI (_tls_wrap.js:113:8)
    at TLSSocket.oncertcb (_tls_wrap.js:193:3)
    at TLSWrap.ssl.oncertcb (_tls_wrap.js:454:39)
BUT WAIT! Good news: It's probably your fault, so you can probably fix it.

as well as this, it notifies that it cannot find the file or directory for /home/user/.homebase/letsencrypt/...

when accessing over dat, I get the same error followed by

[Error] approveDomains rejected tls sni 'example.com'
[Error] (see https://git.coolaj86.com/coolaj86/greenlock.js/issues/11)
[Error] This is the rejection message:
Invalid domain

for each domain set to serve in the config file

pfrazee commented 6 years ago

There is at least 1 upstream bug. We're a few versions behind on greenlock so maybe try running npm i greenlock-express@2.3.1 and see if this still happens

ollybromham commented 6 years ago

That sorted it, thanks a lot @pfrazee