-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/js runtime errors #359
base: main
Are you sure you want to change the base?
Conversation
Hi @leonpahole, I greatly appreciate your positive feedback and the effort you've put into exploring the situation. It appears that the issue at hand might be due to the utilization of custom fields, which, by default, aren't listed in the system. To rectify this, you need to declare these fields in your package.json. For further guidance on this, please refer to our documentation: https://docs.keycloakify.dev/build-options#keycloakify.customuserattributes We're excited to share that in upcoming versions of Keycloakify, we will incorporate automatic code analysis. This feature will eliminate the need for manual specification of such parameters, further enhancing user experience. Stay tuned for these updates and thank you again for your constructive engagement with our platform. Best regards, |
@garronej Thank you for your response. I am not using any custom fields in the Keycloak - it is a standard, clean (no configuration changed) Keycloak 11.0.2 instance. I can prepare a repro repository if needed. |
Oh my bad for assuming this was what's happening. Would you share the exact message of the JavaScript runtime error you're getting? |
Oh! I see! My bad, you are right. What you did in the PR seems like the sensible thing to do. But before merging I neet to investigate a little bit. There must be a lot of error in your Keycoak log if the FTL gets rendered this way. Do you occur? |
Ok I understand what's going on. You are using an old version of Keycloak that where the keycloakify/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl Lines 39 to 41 in f98d1aa
|
The issue should be solved in Keycloakify 7.12.3 now being deployed. |
@garronej thanks for the quick feedback and the solution 🙌 |
Hold on, after futher examination, I see other use of existsError that I need to remove. |
@leonpahole I'm sorry, I had to rollback. I'll release a patched version tomorrow. It's much more complicated that I enticipated. |
Probably fixed in 7.12.6-rc.0. I didn't test yet though |
Should be working now |
@leonpahole, ohhhhh 😞 Just like you did when you shared this screenshot: |
Here is what I am getting:
|
Thanks for sharing the log. So you are positive that this is what you get when you are using Keycloakify 7.13.2-rc.0? Unfortunately, I can't easyly spin up a Keycloak 11 container on my M1 mac. Could you:
Thanks a lot for you help for getting to the bottom of this. |
Hello @garronej , sorry for slow response, It's been a busy week :) Yes, I am sure I am using Keycloakify 7.13.2-rc.0.
|
Hello,
First of all thanks for the great package!
When I ran this project in a production environment, it failed for a few pages, such as registration and update password - white screen was shown and there was a JavaScript error in the console. I located the error to be in the
printIfExists
function. In my case, the function had if statements with empty bodies, so no matter what was passed in, the error was thrown:I noticed that inside the ftl file, there was an attempt / recover block, and in my case (I am using Keycloak 11.0.2), the recover block was being triggered, but that recover block did not generate any code, which led to empty if statements.
I fixed this issue by adding a return statement in the recover block. I am not sure if this is the right way to do it, could you advise?