question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

register.ftl and login-verify-email.ftl throw errors

See original GitHub issue

Hello, i made a fully custom theme using others deps as ‘styled-components’ and ‘react-intl’, everything is working well except the register and login verify email where both of those pages throw me the same error:

FTL stack trace ("~" means nesting-related):
        - Failed at: #local value = object[key]  [in template "login-verify-email.ftl" in macro "objectToJson" at line 70, column 21]

this is the code at line 70:

 <#attempt>
                    <#local value = object[key]>
                <#recover>
                    /* couldn't dereference ${key} of object */
                    <#continue>
                </#attempt>

Do you have any ideas of what is going on with this issue, the user cannot register and verify its email (he can only log in) ? Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
garronejcommented, Jun 29, 2021

Ok cool, So, just so you know, it is expected that a lot of errors appears in the Keycloak logs. To converts the .ftl values into a JavaScript object blindly we have to do things that throws. But it’s all-right because every statement that can fail is inside a <#attempt><#recorver> block.
You are not the first one however to be concerned by all the error in the Keycloak logs, maybe I should explain this in the README.

However, back to our problem. As long as you don’t get a 500 when loading the pages and as long as window.kcContext looks alright you should be able to implement the page…

How is your window.kcContext looking on the problematic pages? (You can display it in the devlopper tool of your browser)

0reactions
garronejcommented, Jun 29, 2021

It’s alright, even our Keycloak expert got mislead by those errors.
Thanks for reporting

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error handling - Apache FreeMarker Manual
DEBUG_HANDLER : Prints stack trace (includes FTL error message and FTL stack trace) and re-throws the exception. This is the default handler ...
Read more >
What are different ways to handle error in FreeMarker template?
IGNORE_HANDLER." I am using Struts2 and also how to show another ftl page instead of showing the stack trace? class MyTemplateExceptionHandler ...
Read more >
Visiting BambooBaseURL/agent/viewAgents.action throws ftl ...
is thrown in application logs. This is reproducible on Data Center: (yes). Steps to Reproduce. Visit BambooBaseURL/agent/viewAgents.action without arguments ...
Read more >
keycloak/services/src/main/java/org/keycloak/forms/login ...
return "login-verify-email.ftl" ;. case LOGIN_IDP_LINK_CONFIRM: ... return "register.ftl" ;. case INFO: ... throw new IllegalArgumentException();. }.
Read more >
Using FreeMarker templates (FTL)- Tutorial - Vogella.com
Inside that, create the following file with name helloworld.ftl . ... class MainTest { public static void main(String[] args) throws Exception { //...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found