HubPress / hubpress.io

A web application to build your blog on GitHub
MIT License
2.81k stars 2.63k forks source link

"TypeError: Cannot read property 'sha' of null" when trying to post #542

Open rorosaurus opened 6 years ago

rorosaurus commented 6 years ago

I recently updated my hubpress and tried to get it working with my custom domain and HTTPS, now that GitHub is offering both together.

When I try to edit an existing post and save remotely, I get the following error in console, and the spinner continues on forever: Uncaught (in promise) TypeError: Cannot read property 'sha' of null

I think I must have messed up some configuration file. I tried reverting it back to the default from hubpress.io repo, and editing only those default settings, but it immediately repopulated with all the old values again as soon as I logged into the admin page.

Example strange CNAME empty commit (also see this for config file as well): https://github.com/rorosaurus/roryhay.es/commit/c0a617605437d3f08e5904bb51a634317f38fb05 Example strange config automatically reverted commit: https://github.com/rorosaurus/roryhay.es/commit/52c4b988c75b96a783d7a751ef207ad1cd5b72cb

anthonny commented 6 years ago

Hi @rorosaurus

Could you send me the full stacktrace about the error on the property sha please?

You are not te only one with this error: https://github.com/HubPress/hubpress.io/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+Cannot+read+property+%27sha%27+of+null

But the code had a lot of changes since the 0.8.1 and it will be easier for me to find the problem with a recent stacktrace.

For the CNAME file, did you create the file manually?

rorosaurus commented 6 years ago

The CNAME file was originally created manually by me. But now it appears that it creates an empty commit with the description "Update CNAME" every time I make any modification. Another example: https://github.com/rorosaurus/roryhay.es/commit/56972728001908e0f213b58ee5dd36930cfda7c4

Here is my log file: roryhay.es-1527042591653.log Please note, there's a "Maximum call stack size exceeded" which takes up many lines. I'm not sure if that's related, since it seems to happen when I log in to the admin page, not when I save the document.