Monday, October 3, 2016

Re: GWT google crawler error undefined.cache.js

Hi All,

I tried to run the app in standard dev mode under 2.8.0RC3 using the fallback property : <set-property-fallback name="user.agent" value="gecko1_8"/> and removing my own UserAgentPropertyGenerator <!-- <property-provider name="user.agent" generator="fr.onevu.vume.client.common.UserAgentPropertyGenerator"/> -->

It shows up that the error still persits (when I emulate a googlebot user.agent), in addition of the compiler being run for my first page display (as if I was running in super dev mode) :

So I have two questions: 

  1. how do I configure the fallback user agent?
  2. how do I force the compiler to run in production mode? without the super dev mode compilation at startup 

The compile time user.agent value (gecko1_8) does not match the runtime user.agent value (safari).
Expect more errors.
com.google.gwt.useragent.client.UserAgentAsserter$UserAgentAssertionError: Possible problem with your *.gwt.xml module file.
The compile time user.agent value (gecko1_8) does not match the runtime user.agent value (safari).
Expect more errors.
at Unknown.Id_g$(Unknown Source)
at Unknown.Cgf_g$(Unknown Source)
at Unknown.Mgf_g$(Unknown Source)
at Unknown.Tgf_g$(Unknown Source)
at Unknown.rgf_g$(Unknown Source)
at Unknown.BM_g$(Unknown Source)
at Unknown.EM_g$(Unknown Source)
at Unknown.anonymous(Unknown Source)

On Friday, September 30, 2016 at 6:54:03 PM UTC+1, Zied Hamdi wrote:

I have a GWT application http://islamart.tn which fails on google crawling : The 'fetch as google' feature fails with a 'partial' status saying that it can't find undefined.cache.js

After some research, I found that this js is the app js when the user.agent is not recognized

I therefore changed my

UserAgentPropertyGenerator.UserAgent

enum value for gecko to recgnize google bot:

 gecko1_8("return (ua.indexOf('Googlebot') || ua.indexOf('gecko') != -1 || docMode >= 11);");  

In my core GWT module I naturally added the line :

<property-provider name="user.agent" generator="fr.onevu.vume.client.common.UserAgentPropertyGenerator"/>  

I installed 'Chrome UA spoofer" to emulate the Googlebot user.agent request, and what happened is that now I have a warning at startup saying that the runtime value safari is different than the compile time gecko_18

I still see some checking runtime code in the generated js

{$stackDepth_0=stackIndex_0-1;return 'gecko1_8'}$stackDepth_0=stackIndex_0-1;return 'unknown'}  

but those files are very large, and I don't know from which classes they are generated.

Additionally, I had to fall back to the version 2.6.1 since compilation with 2.8.0RC2 and 2.7.0 don't finish the job (for some reasons I don't have the time to investigate now)

Any ideas please?...

I need an answer to one of these questions :

  • How to personalize the runtime user agent check generated code ?
  • How to make googlebot use the gecko_18 version of my app ? 

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

No comments:

Post a Comment