Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protect plugmatic from ill-formed about page json #6

Open
WardCunningham opened this issue Feb 28, 2018 · 1 comment
Open

protect plugmatic from ill-formed about page json #6

WardCunningham opened this issue Feb 28, 2018 · 1 comment

Comments

@WardCunningham
Copy link
Member

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 [email protected]
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 [email protected]

 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.

@WardCunningham
Copy link
Member Author

This is a trap where if you install a version that kills Plugmatic then you can't install it. Yuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant