Closed mpacer closed 5 years ago
Ok so it's definitely the publishNotebook xhr request that is off, so I'm going to try to iterate on that in python for a bit.
So the problem was that we hadn't enabled the serverextension on CI, and it doesn't currently happening automatically (currently working on a PR to fix this).
I added it to the README as well as to the CI and now it works gloriously.
The reason it caused a problem is that the request was expecting JSON back, but because the endpoint wasn't valid, the server was returning a 404 response with an html page.
It'd be nice if we could have a better error than
unhandledRejection SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
but there may be other reasons why that could occur and it would be overkill to build something special purpose for this case.
But I figure that this is a good place to document that if anyone else runs into Unexpected token < in JSON at position 0
, a good first guess is that it's getting an html page instead of a JSON object… and that might be because you're hitting an endpoint that the server doesn't think exists.
Thanks for taking this through the paces @mpacer!
This adds functionality for publishing Notebooks to ci-published and then to compare what is stored there against our in memory copy.
Also adds an integration test for that functionality.