yugalatea / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

iGoogle seems to send a corrupt request for gadget with rpc #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
gwt-gadgets-1.0.1 (gwt 1.5.3)

Detailed description:
I am not 100% but think that iGoogle sends a corrupt request somehow (since
I use the same rpc method in a normal gwt app and that works fine).
This is the request:

POST /lenzcape.grails/lenzcape.gwt.gadget.LenzcapeGadget/gwt/rpc HTTP/1.1
User-Agent: FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)
X-IGoogle-Request: 1
Cache-Control: no-cache
Host: myhostname.com
Accept-Encoding: gzip
Content-Type: application/x-www-form-urlencoded
Content-Length: 190

And this the exception:

Exception while dispatching incoming RPC call
javax.servlet.ServletException: Client did not send 190 bytes as expected
    at
com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8(RPCServletUtils
.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
    at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1105)
    at groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java:957)
    at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749)
    at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAd
apter.java:170)
    at
org.codehaus.groovy.grails.plugins.gwt.GrailsRemoteServiceServlet.readContent(Gr
ailsRemoteServiceServlet.groovy:28)
    at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.
java:77)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1124)
    at
org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.processFilterCha
in(UrlMappingsFilter.java:169)
    at
org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal
(UrlMappingsFilter.java:160)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1115)
    at
org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.parsePage(GrailsPageFil
ter.java:122)
    at
org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilt
er.java:85)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1115)
    at
org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilter
Internal(GrailsReloadServletFilter.java:101)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1115)
    at
org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterIntern
al(GrailsWebRequestFilter.java:65)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1115)
    at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Characte
rEncodingFilter.java:96)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
    at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFi
lterProxy.java:236)
    at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterPr
oxy.java:167)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1115)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
    at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
    at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)

Original issue reported on code.google.com by rintc...@gmail.com on 16 Dec 2008 at 6:44

GoogleCodeExporter commented 9 years ago
If you haven't already, please check the GadgetRPC example for how to use GWT 
RPC in
conjunction with a gadget.

Also, check the RPC FAQ item here:
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=GadgetsF
AQ

Original comment by galgwt.reviews@gmail.com on 16 Dec 2008 at 10:13

GoogleCodeExporter commented 9 years ago
I checked the RPC doc's and override readContent server side and use
intrinsicMethods.getCachedUrl client side. Did I miss something?

And the GadgetRPC example is running fine in my environment, although I tested
without spring and grails in between (which are used when the exception 
occurs). I
will test the rpc sample with spring and grails and report back what the 
results are.

Original comment by rintc...@gmail.com on 16 Dec 2008 at 11:32

GoogleCodeExporter commented 9 years ago
Hm, I get a similar exception when I serve the rpc sample from a grails app. So 
it's
probably something with grails or spring in combination with iGoogle.

Original comment by rintc...@gmail.com on 17 Dec 2008 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 17 Dec 2008 at 11:41

GoogleCodeExporter commented 9 years ago
For the record so it may of help to someone else, I found a workaround for
grails/spring. See:
http://www.nabble.com/ServletException-on-RPC-call-via-grails-(Client-did-not-se
nd-198-bytes-as-expected)-tt21050215.html

I still hope that google can fix this issue at its root though (being igoogle
mangling the content type). What's the proper place to raise this issue 
(couldn't
find it)?

Original comment by rintc...@gmail.com on 22 Dec 2008 at 12:24

GoogleCodeExporter commented 9 years ago
I reported this as issue 3219 in google-web-toolkit

http://code.google.com/p/google-web-toolkit/issues/detail?id=3219

Original comment by galgwt.reviews@gmail.com on 22 Dec 2008 at 1:35