Skip to content

protect plugmatic from ill-formed about page json #6

@WardCunningham

Description

@WardCunningham

I'm having a strange problem with wiki-plugin-frame and plugmatic.
I got a version published on NPM: 0.1.0. And plugmatic happily installs it:

Here you can see the wiki logs where plugmatic installs it, I click the restart button in the web UI and then the first few lines after I reload the web page:

plugmatic installing wiki-plugin-frame@0.1.0
POST /plugin/plugmatic/install 200 2202 - 2254.486 ms
plugmatic exit to restart
restarting wiki server
Wiki starting in Farm mode, navigate to a specific server to start it.

friends starting
[ { _: {},
    autoseed: false,
    test: false,
    help: false,
...

That all worked great.

Then I improved the about page, tried npm version patch and republished version 0.1.1. But plugmatic crashed wiki when I tried to install that one. I tried again with 0.1.2 and still getting plugmatic crashing:

Here you can see the wiki log where plugmatic blows up:

plugmatic installing wiki-plugin-frame@0.1.2

 TypeError: Cannot read property 'title' of null
    at /home/app/lib/node_modules/wiki/node_modules/wiki-plugin-plugmatic/server/server.js:74:26
    at /home/app/lib/node_modules/wiki/node_modules/jsonfile/index.js:42:16
    at /home/app/lib/node_modules/wiki/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)


server unexpectly exitted, 122 (1)
wiki_farm_1 exited with code 1

the commits are here in case anyone can spot what's causing the crash:
https://github.com/dobbs/wiki-plugin-frame/commits/master
Ah... I found my cause. I manually edited the journal on the about page and left a trailing comma.

This commit fixed it.
dobbs/wiki-plugin-frame@6e0178c

So... wiki-plugin-frame version 0.1.3 is now available and installing correctly with plugmatic

Plugmatic wasn't much help there was it? I'll copy this discussion into an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions