Pages

Wednesday, March 18, 2015

Grails flash message not working in production mode

In dev mode it works, but on production flash messages do not appear. If i put message in session scope then it appears, but not in flash.message. The first idea is that there are some additional redirects happening in production mode, those clear the flash message. Also if i run my app with command grails prod run-app, then flash messages also do not appear. There must be some configuration that disables flash messages for production mode!

The only difference that i found in config.groovy between prod and dev modes was this line:

 grails.logging.jul.usebridge = false

But altering the value didn't affect the production environment flash messages in any way.

Also when i created a test project and ran it in prod mode, the flash message appeared correctly. So there must be something wrong with my project. 

SOLVED:
With a bit of help from ZYRO <3 from grails at freenode.

I had a heroku plugin installed, that was sucking in a database session plugin that had some deprecated class and turns out that was causing the problem.
OMFG. How easy was that:

  1. Check logs.
  2. See what causes the problem.
  3. Disable that thing.

Two days of desperate researching were wasted because of incorrect approach. 

No comments:

Post a Comment