cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there any kind of incompatibility between the Agent and Thymeleaf?

alfredo_iglesia
Participant

Hello!


I'm simulating visits with selenium, if I raise the application without the agent (java -jar myapp.jar) everything goes well, but when I add the -agentpath to the JVM (java -agentpath:<mi agentpath> -jar <myapp.jar>), to monitor it in Appmon shows me an exception that does not show in any other circumstance
(SEE IMAGE).

2018-11-27-190043.png

line-exception.png

Is there any kind of incompatibility between the Agent and Thymeleaf that is what the app view is made of?


Thank you


11 REPLIES 11

Alfredo, try to go to System Profile => User Expirience and move switch responsible for injecting UEM from right to middle. Make those tests again and check if this will show again. If yes it means that auto injecting of UEM is causing problems with parsing HTML of you template. In this case you will have to try tweaking place of injection agent into dom.

Regards,

Sebastian


alfredo_iglesia
Participant

Hello @sebastian K.


Thank You For Your Help
I have moved the switch that injects EUM towards the center, and effectively no longer gives the problem, but of course I can not see the visits.

What can I do to inject it manually and be able to see the visits?


I assume that in any other pages UEM does not cause problems with template parsing, only on logout? I'm curious if this form looks ok in browser with and without agent in the same way. Can you check it? You can always copy whole html to some IDE and check if it is correct in both ways. Strange thing for mi is that this problem appears only when you click logout. This form is presented before this action. What does application after click?


I can't remember how it should work in spring but I have question. Is there need for adding action="#" if after that you have template invocation which should replace action after render?


Hi,

Do you see on your website JS scripts named: dtagent_.js (you can check in developer mode)? and please check whether Dynatrace Monitor are working on <your_domain>/DynaTraceMonitor. Please send the results.

Of course you can try manually injection:
https://www.dynatrace.com/support/doc/appmon/appl...
but first i recommend use the UEM Health Check (https://www.dynatrace.com/support/doc/appmon/user-experience-management/user-experience-management-administration/uem-health-check/) to diagnose the problem.

Radek


alfredo_iglesia
Participant

Hello @Radek J.


I send you the images, tell you that I already tried http://localhost:8084/dynaTraceMonitor, and http://mc0yzqbc:9998/dynaTraceMonitor and the result was the same, only fails in the logout!! and without the agent does not fail.....

2018-11-28-131529.png

2018-11-28-131555.png

2018-11-28-134221.png

2018-11-28-134310.png

2018-11-28-134341.png

2018-11-28-134412.png

2018-11-28-141830.png

Thanks for your help


alfredo_iglesia
Participant

Hi @Radek J. and @sebastian K.

After going over it a lot, I discovered that deactivating the _csrf tag in the Spring Security configuration no longer produces this error in the logout....

2018-11-29-092257.png

If I leave it enabled in the logout appears an input hidden type, (with the label csrf) that is not in the original code and I imagine that produces this conflict with the js agent.

Regards.


Ok there is any difference in how this hidden field is looking with UEM enabled and disabled when you are loading this page?


alfredo_iglesia
Participant

At first glance the main difference seems the value....

uem-enabled.png

uem-disabled.png


Ok changes in value aren't problem because token is generated new for each session. One extra question is what webserver is doing after clicking logout. I assume that it's trying to render some kind of page, and there is 500 error. Yes? It's strange I think you can start support ticket for this because without deep investigation it can be problem with diagnosing this.


With csrf disabled does not give the error, it may be by some kind of conflict with the agent....I don't know.


What I would like to achieve now is that each IP of the simulated visits is different because when doing them with selenium from my computer all IPs are the same.

Regards!!