You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is caused by improper parsing of the templates. The "parsing engine" that finds the helper functions cannot handle delimiters inside of delimiters. For example, in the Casper theme there is:
{{!-- jQuery needs to come before``{{ghost_foot}}``so that jQuery can be used in code injection --}}
The findHelper function chokes on this, I believe because it mixes up the locations of the delimiters and winds up pairing them backwards or something. I get a panic: runtime error: slice bounds out of range, because the function tries to extract a block of bytes between indexes 1100->900...backwards.
A temporary workaround involves modifying those unescaped delimiters so they no longer match, such as making the above into { {ghost_foot} } (spaces added). I can confirm that this works.
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc2080c4000, 0x1741, 0x1741, 0xc208030800, 0x6, 0x8, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:107 +0xba0
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208106800, 0x1781, 0x1781, 0xc208030800, 0x6, 0x8, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:118 +0xaea
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208105000, 0x179a, 0x179a, 0xc208030800, 0x5, 0x8, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:118 +0xaea
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208103800, 0x17b3, 0x17b3, 0xc2080bc5a0, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:118 +0xaea
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208102000, 0x17cd, 0x17cd, 0xc2080bc5a0, 0x3, 0x4, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:118 +0xaea
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208062800, 0x17e7, 0x17e7, 0xc2080d5950, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:107 +0xba0
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208061000, 0x17fe, 0x17fe, 0xc2080d5950, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:107 +0xba0
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208094b00, 0x180c, 0x180c, 0xc2080d5950, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:118 +0xaea
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208093200, 0x1820, 0x1820, 0xc20800d180, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:118 +0xaea
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208091900, 0x182e, 0x182e, 0xe742b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:107 +0xba0
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.findHelper(0xc208090000, 0x183e, 0x183e, 0xe742b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:107 +0xba0
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.compileTemplate(0xc2080f6000, 0x1856, 0x1a56, 0xc20803bc69, 0x7, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:171 +0x283
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.createTemplateFromFile(0xc20803bc40, 0x34, 0x34, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:193 +0x2ac
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.compileFile(0xc20803bc40, 0x34, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:198 +0x44
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.inspectTemplateFile(0xc20803bc40, 0x34, 0x7f83eb942418, 0xc20802ef50, 0x0, 0x0, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:208 +0xca
Apr 18 02:42:32 Asgard su[1290]: path/filepath.walk(0xc20803bc40, 0x34, 0x7f83eb942418, 0xc20802ef50, 0xac5150, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /usr/local/go/src/path/filepath/path.go:347 +0x91
Apr 18 02:42:32 Asgard su[1290]: path/filepath.walk(0xc20803d830, 0x28, 0x7f83eb942418, 0xc20802fc70, 0xac5150, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /usr/local/go/src/path/filepath/path.go:372 +0x51d
Apr 18 02:42:32 Asgard su[1290]: path/filepath.Walk(0xc20803d830, 0x28, 0xac5150, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /usr/local/go/src/path/filepath/path.go:394 +0xf2
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.compileTheme(0xc20803d830, 0x28, 0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:221 +0x234
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.checkThemes(0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:257 +0x16e
Apr 18 02:42:32 Asgard su[1290]: github.com/kabukky/journey/templates.Generate(0x0, 0x0)
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/templates/generation.go:293 +0xcd
Apr 18 02:42:32 Asgard su[1290]: main.main()
Apr 18 02:42:32 Asgard su[1290]: /go/src/github.com/kabukky/journey/main.go:73 +0x54a
Apr 18 02:42:32 Asgard su[1290]: goroutine 5 [chan receive]:
Apr 18 02:42:32 Asgard su[1290]: database/sql.(*DB).connectionOpener(0xc20803f9a0)
Apr 18 02:42:32 Asgard su[1290]: /usr/local/go/src/database/sql/sql.go:589 +0x4c
Apr 18 02:42:32 Asgard su[1290]: created by database/sql.Open
Apr 18 02:42:32 Asgard su[1290]: /usr/local/go/src/database/sql/sql.go:452 +0x31c
Apr 18 02:42:32 Asgard su[1290]: goroutine 17 [syscall, locked to thread]:
Apr 18 02:42:32 Asgard su[1290]: runtime.goexit()
Apr 18 02:42:32 Asgard su[1290]: /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1
Apr 18 02:42:32 Asgard systemd[1]: journey.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 18 02:42:32 Asgard su[1290]: pam_unix(su-l:session): session closed for user wesley
Apr 18 02:42:32 Asgard systemd[1]: journey.service: Unit entered failed state.
Apr 18 02:42:32 Asgard systemd[1]: journey.service: Failed with result 'exit-code'.
Having trouble loading up alternative themes, seems Journey crashes when a i select a new theme and reload the service, tried odin and casper themes.
Any idea what may be causing this?
The text was updated successfully, but these errors were encountered: