deobfuscation does not work

67 views
Skip to first unread message

confile

unread,
Feb 20, 2014, 9:34:18 AM2/20/14
to gwt...@googlegroups.com
I tried to get remote log messages. I tried this:

Log.fatal("This is what an exception might look like", new RuntimeException("2 + 2 = 5"));

I can see that in WEB-INF/deploy/web/symbolMaps/ there are many files of size 4.3MB each. So I guess the symbolMaps are generated successful. 


My remote servlet config is:

<servlet>
  <servlet-name>gwt-log-remote-logger-servlet</servlet-name>
  <servlet-class>com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl</servlet-class>
<init-param>
<param-name>symbolMaps</param-name>
<param-value>WEB-INF/deploy/web/symbolMaps/</param-value>
      </init-param>

</servlet>
<servlet-mapping>
<servlet-name>gwt-log-remote-logger-servlet</servlet-name>
<url-pattern>/gwt/web/gwt-log</url-pattern>
</servlet-mapping>


On the client side I get

(-:-) 2014-02-20 15:22:04,388 [FATAL] This is what an exception might look like java.lang.RuntimeException: 2 + 2 = 5 at Unknown.X7b(Unknown Source:180) at Unknown.CTb(Unknown Source:518) at Unknown.ATb(Unknown Source:56) at Unknown.CVb(Unknown Source:29) at Unknown.GVb(Unknown Source:29) at Unknown.vQ(Unknown Source:53) at Unknown.N7b(Unknown Source:180) at Unknown.E7b(Unknown Source:345) at Unknown.R7b(Unknown Source:78) at Unknown.L7b(Unknown Source:138) at Unknown._6b(Unknown Source:290) at Unknown.d7b(Unknown Source:347) at Unknown.anonymous(Unknown Source:93) at Unknown.anonymous(Unknown Source:42)


On the server side I get: 

2014-02-20 15:22:04,259 [http-nio-8080-exec-7] FATAL gwt-log  - This is what an exception might look like
Message: 2 + 2 = 5
   Line | Method
->> 180 | X7b       in Unknown
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   518 | CTb       in     ''
|    56 | ATb . . . in     ''
|    29 | CVb       in     ''
|    53 | vQ . . .  in     ''
|   180 | N7b       in     ''
|   345 | E7b . . . in     ''
|    78 | R7b       in     ''
|   138 | L7b . . . in     ''
|   290 | _6b       in     ''
|   347 | d7b . . . in     ''
|    93 | anonymous in     ''
^    42 | anonymous in     ''


What do I have to do to get the deobfuscation working?






confile

unread,
Feb 20, 2014, 5:19:36 PM2/20/14
to gwt...@googlegroups.com
I made a demo gwt project to show this problem: https://github.com/confile/gwtlogtest  

When I compile with style obfuscated I get on the client: 

(-:-) 2014-02-20 23:09:54,529 [FATAL] This is what an exception might look like java.lang.RuntimeException: 2 + 2 = 5 at Unknown.ui(StackTraceCreator.java:180) at Unknown.Zf(StackTraceCreator.java:518) at Unknown.Yf(Throwable.java:56) at Unknown.kh(Exception.java:29) at Unknown.mh(RuntimeException.java:29) at Unknown.PW(Testgwt.java:66) at Unknown.TW(Testgwt.java:52) at Unknown.ki(SchedulerImpl.java:180) at Unknown.bi(SchedulerImpl.java:345) at Unknown.oi(SchedulerImpl.java:78) at Unknown.ii(SchedulerImpl.java:138) at Unknown.Kh(Impl.java:290) at Unknown.Oh(Impl.java:347) at Unknown.anonymous(Impl.java:93) at Unknown.anonymous(UnloadSupport.java:42)

and on the server: 

SEVERE: This is what an exception might look like
java.lang.RuntimeException: 2 + 2 = 5
at Unknown.ui(StackTraceCreator.java:180)
at Unknown.Zf(StackTraceCreator.java:518)
at Unknown.Yf(Throwable.java:56)
at Unknown.kh(Exception.java:29)
at Unknown.mh(RuntimeException.java:29)
at Unknown.PW(Testgwt.java:66)
at Unknown.TW(Testgwt.java:52)
at Unknown.ki(SchedulerImpl.java:180)
at Unknown.bi(SchedulerImpl.java:345)
at Unknown.oi(SchedulerImpl.java:78)
at Unknown.ii(SchedulerImpl.java:138)
at Unknown.Kh(Impl.java:290)
at Unknown.Oh(Impl.java:347)
at Unknown.anonymous(Impl.java:93)
at Unknown.anonymous(UnloadSupport.java:42)

confile

unread,
Feb 20, 2014, 5:20:16 PM2/20/14
to gwt...@googlegroups.com
I use GWT 2.6

confile

unread,
Feb 20, 2014, 6:19:20 PM2/20/14
to gwt...@googlegroups.com
In my catalina.out I see: 

WARNING: Servlet configuration parameter 'symbolMaps' specifies directory 'WEB-INF/deploy/testgwt/symbolMaps/' which does not exist or is not relative to your server's current working directory '/'
Feb 21, 2014 12:08:11 AM com.allen_sauer.gwt.log.server.ServerLogImplJDK14 log
WARNING: In order to enable stack trace deobfuscation, please specify the 'symbolMaps' <init-param> for the com.allen_sauer.gwt.log.server.RemoteLoggerServlet servlet in your web.xml


How do I fix that?

Fred Sauer

unread,
Feb 28, 2014, 8:07:21 PM2/28/14
to gwt...@googlegroups.com
Note this part of the error message:

         .....or is not relative to your server's current working directory '/'

You specified 'WEB-INF/deploy/testgwt/symbolMaps/', and the working directory is '/', which means it will expect '/WEB-INF/deploy/testgwt/symbolMaps/' to contain the symbol maps. Unless your webapp is deployed to '/', then this is wrong.





--
You received this message because you are subscribed to the Google Groups "gwt-log" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-log+u...@googlegroups.com.
To post to this group, send email to gwt...@googlegroups.com.
Visit this group at http://groups.google.com/group/gwt-log.
For more options, visit https://groups.google.com/groups/opt_out.



--
Fred Sauer
fre...@gmail.com

confile

unread,
Mar 23, 2014, 5:46:40 PM3/23/14
to gwt...@googlegroups.com
I made it working see my other post.


Now I find that remote logging only works with error and fatal messages. When I set

<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" /> 

I do not get any trace, debug, info, warn messages reported to the server. They appear in the console but only error and fatal written to server logs.

Is there any option I miss?

Fred Sauer

unread,
Mar 23, 2014, 9:56:52 PM3/23/14
to gwt...@googlegroups.com

Yes you need to configure the server-side logging level separately

Fred Sauer on Android

For more options, visit https://groups.google.com/d/optout.

confile

unread,
Mar 23, 2014, 9:58:14 PM3/23/14
to gwt...@googlegroups.com
How do I configure the server side log level? Could you please give an example?

Michael

Fred Sauer

unread,
Apr 6, 2014, 3:37:00 PM4/6/14
to gwt...@googlegroups.com
Depends on what server side logging library you use, e.g. java.util.logging, log4j, etc.

Simply write Log.debug(...) ... Log.error(...) in your server side code (e.g. in a servlet) and make sure you see those messages.
--
Fred Sauer
fre...@gmail.com
Reply all
Reply to author
Forward
0 new messages