Hi,
I've set up a Staticman instance on Heroku, here:
https://staticman-axiomshift.herokuapp.com/
to use on my Gatsby blog hosted on Netlify here:
https://wikiskills.org/
Here are the config files:
https://github.com/joeczar/wikiSkills-blog/blob/master/staticman.yml
https://github.com/joeczar/wikiSkills-blog/blob/master/_config.yml
The error:
{"success":false,"message":"Error whilst parsing Staticman config file","rawError":{"_smErrorCode":"MISSING_CONFIG_BLOCK"},"errorCode":"MISSING_CONFIG_BLOCK"}
I have read all the threads I can find and they all say that the issue has something to do with the staticman.yml file. I have tried every version of this I can find and nothing works. I'm sure it's something small I've overseen, so I could really use some help. I want to use Staticman!
Thank you,
Joe
Can you try deploying the dev branch to Heroku and try using that to see if you get a different error message? There are some issues with the Staticman error handler that are resolved on the dev branch (see #342). You can have multiple applications running on Heroku so this should be pretty easy to deploy. Just go to the README on the dev branch, click the deploy button, and copy over your config variables from your existing instance.
Thanks for the quick response.
Dev build is running here:
https://staticman-dev-axiomshift.herokuapp.com/
I've provided Heroku with the same RSA & GitHub Token as the other instance.
But, when I try and get the invitation with:
https://staticman-dev-axiomshift.herokuapp.com/v2/connect/joeczar/wikiskills-blog
I get:
No invitation found
I changed up the git token and RSA key but only got the same response. I went ahead to try a post call.
With the comment post, I get the following 404 looking for the
"method":"GET","url":"https://api.github.com/repos/joeczar/wikiSkills-blog/contents/staticman.yml?ref=master" ( complete response below )
I then created a new contents folder in the root and copied the staticman.yml there, but I get the same response.
Thanks again.
{"success":false,"rawError":{"name":"HttpError","status":404,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset","connection":"close","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Mon, 30 Mar 2020 09:43:18 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","status":"404 Not Found","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-accepted-oauth-scopes":"","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; format=json","x-github-request-id":"B594:2D379:801F8FF:96268C8:5E81BF36","x-oauth-scopes":"repo, user","x-ratelimit-limit":"5000","x-ratelimit-remaining":"4982","x-ratelimit-reset":"1585561877","x-xss-protection":"1; mode=block"},"request":{"method":"GET","url":"https://api.github.com/repos/joeczar/wikiSkills-blog/contents/staticman.yml?ref=master","headers":{"accept":"application/vnd.github.v3+json","user-agent":"Staticman octokit.js/16.35.0 Node.js/13.11.0 (Linux 4.4; x64)","authorization":"token [REDACTED]"},"request":{"timeout":5000,"validate":{"owner":{"required":true,"type":"string"},"path":{"required":true,"type":"string"},"ref":{"type":"string"},"repo":{"required":true,"type":"string"}}}},"documentation_url":"https://developer.github.com/v3/repos/contents/#get-contents","_smErrorCode":"GITHUB_READING_FILE"},"errorCode":"GITHUB_READING_FILE"}
OK, looks like it's working!
https://github.com/joeczar/wikiSkills-blog/pull/1#issue-395539472
One thing I'm going to have to figure out is how to keep the request from opening in a new window. I've had to stitch together several tutorials to get this running on my setup
Thanks, @alexwaibel for the Dev branch suggestion. it got me up and running.
Most helpful comment
Can you try deploying the dev branch to Heroku and try using that to see if you get a different error message? There are some issues with the Staticman error handler that are resolved on the dev branch (see #342). You can have multiple applications running on Heroku so this should be pretty easy to deploy. Just go to the README on the dev branch, click the deploy button, and copy over your config variables from your existing instance.