Why would anyone block *.cache.html on a proxy?
> Once again: a firewall is blocking the .cache.html file. GWT just sits
> there doing nothing, no error messages or anything.
> Is there any way we can check to see if the cache.html file is loaded
> correctly? It would be great to tell our users "you need to ask your
> network administrators to remove our site from the banned list".
You can probably change the default (iframe) linker to rename files
pritty easily, or create your own
see code in dev/core/src/com/google/gwt/core/linker/*
However i have no experience with this.
How do you know it's a firewall?
Are you saying there are two different firewalls (with potentially
different settings) blocking the same document?
Is this a private site? Perhaps posting a link might help debug this
problem.
I don't have the links at hand, but have you tried enabling compression
on the server side?
I think there may be some Apache incantations on this list to enable
that feature.
Yes. I'd give that a shot. I am wondering why you're not going for the
watchdog timer. I'd throw such logic at this problem too.
>
> On Aug 14, 3:30 am, Joe Cole <profilercorporat...@gmail.com> wrote:
>>> Is it malformed, or missing?
>>
>> If I remove the file (cause a 404 response) gwt doesn't throw an error
>> that I can catch. I used this to reproduce the error for testing
>> purposes.
Which is demonstrated by the above patch.
>> In production, the file is there, and the user has a firewall that
>> blocks it and if it returns an error page, gwt doesn't throw an error
>> that I can catch. I was using the missing file to replicate it
>> locally.
Comment below.
>>> The MD5 value is the STRONGNAME. Whether
>>> you can reproduce that hash is another matter; which algorithm means
>>> another trip through the source. If you can recalculate the hash,
>>> you'd simply compare that value to STRONGNAME. But you'd never get a
>>> chance to calculate the hash since the file's only partially received.
>>
>> I was hoping that the generated nocache.js would have this (or
>> something) to check that the document returned by the server (or
>> firewall) it loaded via xhttp was valid.
I think that it doesn't have this logic because there's no single error
handler that would satisfy all users.
>> I understand we can't regenerate it - I was trying to propose a
>> solution.
I think you *might* be able to regenerate it. You'd have to see how the
compiler creates that hash to know for sure.
>> Another solution would be for the gwt script to check the response for
>> an error code - is that possible?
Which you've demonstrated above.
>>> I'm under the impression that the file's missing. In which case I'd
>>> implement a watchdog timer in that routine. I'm guessing that Google
>>> doesn't implement a such a timer because there's no single
>>> implementation that would fit all circumstances.
>>
>> The file isn't missing - if I load up the cache.html file manually
>> (e.g.www.mycompany.com/STRONGNAME.cache.html) at sites with a strict
>> firewall we get an error document explaining that it's been blocked by
>> the firewall and rationale (e.g. a high "score").
Now I see that the bootstrap logic in trunk HEAD is somewhat different
than your original example (posted on 4-Aug). Please take a moment to
look at trunk HEAD's bootstrap to see if there's something you can use.
Perhaps the diff between your current GWT version and HEAD will be
illuminating.
>>> After reviewing the source, the onerror function doesn't get called
>>> when you need it for this particular issue.
>>
>> Agreed.
>>
>>> Please try the cross-site linker.
>>
>> I've never used it before - how will this help?
I'm not sure it will. The XS linker implements another way of getting
the *.cache.html file to the client. It's cheap to try (simply add a
line to your module.xml file) and may be a win in that the firewall
responds differently. Although if it's a size-based rule, the firewall
will probably restrict this technique too. I admit that I'm grasping at
straws with this suggestion.
On this topic, you might also try upgrading to the GWT trunk and
experimenting with the code splitting logic. There is a cost to this
besides time: you will have to analyze and modify the code to see what
parts of it can load later than others[*]. So, following this suggesting
will produce a branch of your current trunk. The SOYC linker produces a
report that will aid in this implementation. Remember that you can have
several GWT versions installed on a single machine; if there's a problem
you simply revert to the older GWT version.
[*]
And if you're on GWT 1.5 or earlier, you will see a lot of deprecated
code warnings.
>>> I'm guessing others haven't seen this since it's specific to these
>>> firewall settings? Or are these separate customers with different
>>> firewalls? I have seen on this list a very difficult to reproduce
>>> issue regarding RPC cargo getting truncated on the trip to the server.
>>> But, obviously, that's after loading the script.
>>
>> These are two separate customers (one university installation, one
>> corporate on separate continents).
>> I have seen the truncation issue before with a personal firewall
>> (Norton) as well.
Just to be clear: these installations use the same firewall with the
same (probably default) settings?
>> Thanks for your help. Apologies if you are confused!
No prob.
That's a problem with watchdog timers. I'm not happy it takes minutes to
load the site; but that's an issue for another time.
>> I think that it doesn't have this logic because there's no single error
>> handler that would satisfy all users.
>
> Ok, makes sense.
That being said, there is some exception handling in the trunk version
of the IFrame linker's JavaScript template that you should review.
>> Now I see that the bootstrap logic in trunk HEAD is somewhat different
>> than your original example (posted on 4-Aug). Please take a moment to
>> look at trunk HEAD's bootstrap to see if there's something you can use.
>> Perhaps the diff between your current GWT version and HEAD will be
>> illuminating.
>
> Ahh. I just checked and the current linker we are using is the old
> IFrame linker from 1.5.3 as you suspected.
> Am I going to have to upgrade (we are currently on 1.5) to try this
> linker?
Yes, if you want to go whole-hog. I'd suggest a diff first to see if you
can simply patch your local copy.
>>>>> Please try the cross-site linker.
>>
>>>> I've never used it before - how will this help?
>>
>> I'm not sure it will. The XS linker implements another way of getting
>> the *.cache.html file to the client. It's cheap to try (simply add a
>> line to your module.xml file) and may be a win in that the firewall
>> responds differently. Although if it's a size-based rule, the firewall
>> will probably restrict this technique too. I admit that I'm grasping at
>> straws with this suggestion.
>
> :)
>
>> On this topic, you might also try upgrading to the GWT trunk and
>> experimenting with the code splitting logic. There is a cost to this
>> besides time: you will have to analyze and modify the code to see what
>> parts of it can load later than others[*]. So, following this suggesting
>> will produce a branch of your current trunk. The SOYC linker produces a
>> report that will aid in this implementation. Remember that you can have
>> several GWT versions installed on a single machine; if there's a problem
>> you simply revert to the older GWT version.
>
> I'd love to upgrade asap, but can't really before things stabilize as
> we release daily at the moment to production sites.
> Any idea when things are going to stabilize for an RC?
No. That being said, if you're on 1.5 you should /very seriously/
evaluate the upgrade of your code base to 1.7. I know: there's never
time to upgrade.
I don't know what the delta is in the linker between TRUNK and 1.7. You
should be able to comprehend the differences in the IFrame linker's
JavaScript template between your version and the version in HEAD. I
cannot see a reason why some of the differences between HEAD and 1.5
cannot be backported. At least you'll see a path to get some of the
exception trapping and reporting you want.
Hmm. The gwt code to load the cache.html seems to be ignoring error
states:
line 315:
xhr.onreadystatechange = function() {
// 4 == DONE
if (xhr.readyState == 4) {
Shouldn't we add another check like:
if( xhr.status != 200 || xhr.status != 304 ) throwDocumentError();
This is probably a good thing to add in do you think?