I’m having authentication problems trouble running my single-file wiki inside GitLab Enterprise Edition Pages. I will check with the infrastructure folks here at GigantiCorp, but as it took them a year to get GL Pages working, I’m not counting on quick help.
I’m trying to use git and Node to track changes made to the content but then deploy a read-only mode single page to all the users (this is software documentation, and I want to restrict authors.)
I’m able to build my Node wiki into a standalone HTML version with
tiddlywiki . --output public --render '$:/core/save/all' index.html 'text/plain'
from inside an NPM package.json > scripts
step. I can then open the generated file from the file system or from a simple local HTTP server. But when I try to open it from inside the GitLab pages, I get this error every few seconds:
Network Error
It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.
Any unsaved changes will be automatically synchronised when connectivity is restored .
Everything is there, working fine except for that error. But that one of course makes it all pretty useless.
This does not happen for a plain HTML file published alongside it for testing. In the Network console for the plain page, I see:
GET https:/<myaccount>.<corp-gitlab>/<project>/foobar.html
304
GET https://<myaccount>.<corp-gitlab>/favicon.ico
302 Location: https://<gitlab-auth-server>?domain=https://<myaccount>.<corp-gitlab>&state=<base64-token>
GET https://<gitlab-auth-server>?domain=https://<myaccount>.<corp-gitlab>&state=<base64-token>
302 Location: https://<gitlab-oauth-server>/authorize?client_id=<token>&redirect_uri=<gitlab-auth-server>&response_type=code&state=<base64-token>&scope=api
GET https://<gitlab-oauth-server>/authorize?client_id=<token>&redirect_uri=<gitlab-auth-server>&response_type=code&state=<base64-token>&scope=api
200 OK
But when I try to load my wiki, I get
GET https://<myaccount>.<corp-gitlab>/<project>/index.html
304
GET https//<myaccount>.<corp-gitlab>/<project>/status
302 Location: https://<gitlab-auth-server>?domain=https://<myaccount>.<corp-gitlab>&state=<base64-token>
OPTIONS https://<myaccount>.<corp-gitlab>/<project>/index.html
200 Body: <html-wiki>
HEAD https://<myaccount>.<corp-gitlab>/<project>/index.html
200 (from disk cache)
data:images/png;base64,<image-from-default-tiddler>
GET https://<gitlab-auth-server>?domain=https://<myaccount>.<corp-gitlab>&state=<base64-token>
302: https://<gitlab-oauth-server>/authorize?client_id=<token>&redirect_uri=<gitlab-auth-server>&response_type=code&state=<base64-token>&scope=api
GET https://<gitlab-oauth-server>/authorize?client_id=<token>&redirect_uri=<gitlab-auth-server>&response_type=code&state=<base64-token>&scope=api
302 Location: https://<corp-gitlab>/users/sign_in
GET https://<myaccount>.<corp-gitlab>/recipes/undefined/tiddlers.json?filter=[all[tiddlers]] -[[$:/isEncrypted]] -[prefix[$:/temp/]] -[prefix[$:/status/]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/library/sjcl.js]] -[[$:/core]]'
GET https://<gitlab-auth-server>?domain=https://<myaccount>.<corp-gitlab>&state=<base64-token>
302: https://<gitlab-oauth-server>/authorize?client_id=<token>&redirect_uri=<gitlab-auth-server>&response_type=code&state=<base64-token>&scope=api
GET https://<gitlab-oauth-server>/authorize?client_id=<token>&redirect_uri=<gitlab-auth-server>&response_type=code&state=<base64-token>&scope=api
302 Location: https://<corp-gitlab>/users/sign_in
And those last three repeat over and over.
I’m especially confused by recipes/undefined
. What is that coming from?
I guess from this group, I was hoping to find out if that makes any sense. I have no idea why my oauth works in one case and not another, when both are serving plain HTML.
But even if there are no ideas about that. Is there some way I can stop the server requests when I’m serving in this fashion? Again, it’s not just a matter of serving the plain HTML over HTTP; as I tested with with a local web server and localhost.
Any suggestion are welcome. If this fails, it’s not the end of the world: I’ll just end up just deploying the Node version. But if I can get this flow to work, it would probably be better for my project. And I really want to know why!