[Greenlock] HTTP exception logged for user-provided handler. #48

Closed
opened 2020-04-11 04:13:26 +00:00 by Ghost · 2 comments

When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser:

Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.

This is what the real meat of my greenlock.js file looks like:

var path = require('path');
var os = require('os')
var Greenlock = require('greenlock');
var GreenlockExpress = require('greenlock-express')

var greenlock = GreenlockExpress.create({
    version: 'draft-12',
    email: 'john.doe@yahoo.com',
    agreeTos: true,
    server: 'https://acme-v02.api.letsencrypt.org/directory',
    approveDomains: approveDomains,
    app: function (req, res) {
        console.log(req.url);
        var myapp = require("./server.ts");
        console.log(myapp.toString());
        myapp(req, res);
    },
    store: store,
    renewBy: 10 * 24 * 60 * 60 * 1000,
    renewWithin: 14 * 24 * 60 * 60 * 1000
});

I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts?

https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/efd7693dcd9622bae768658066f55cff17bc2605/index.js

Also FWIW, the server.ts file does export an Express app: module.exports = app;

When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser: ```Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.``` This is what the real meat of my `greenlock.js` file looks like: ``` var path = require('path'); var os = require('os') var Greenlock = require('greenlock'); var GreenlockExpress = require('greenlock-express') var greenlock = GreenlockExpress.create({ version: 'draft-12', email: 'john.doe@yahoo.com', agreeTos: true, server: 'https://acme-v02.api.letsencrypt.org/directory', approveDomains: approveDomains, app: function (req, res) { console.log(req.url); var myapp = require("./server.ts"); console.log(myapp.toString()); myapp(req, res); }, store: store, renewBy: 10 * 24 * 60 * 60 * 1000, renewWithin: 14 * 24 * 60 * 60 * 1000 }); ``` I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts? [https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/efd7693dcd9622bae768658066f55cff17bc2605/index.js](http://) Also FWIW, the `server.ts` file does export an Express app: `module.exports = app;`
Owner

Just seeing this.

You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README.

It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.

Just seeing this. You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README. It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.
Owner

Closing since this is old, but feel free to re-open if needed.

Closing since this is old, but feel free to re-open if needed.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/greenlock.js-ARCHIVED#48
No description provided.