[gwt-contrib] Re: IE + SSL + Image.setURL throws an Operation Exception at runtime

2011-09-20 Thread DaveC
There was also another runtime Exception being thrown - this time the
culprit was the iFrame for GWT History (the exception was thrown at
the point the iframe's document was being accessed)... it was unused
and removing it fixed the problem.

I find it hard to believe that no one else has seen this error???

Anyone?

On Sep 19, 3:46 pm, DaveC david.andrew.chap...@gmail.com wrote:
 I think this maybe be a bug with GWT (but I'm not sure).

 I'm running my app under https/ssl, in IE (7  8) I get an Operation
 Exception (Network Error) if I set a previously created Image
 widget's url to an unsecured url (which causes IE to popup a dialog
 asking the user for permission).

 The following code causes an exception to be thrown (using HTTPS/SSL
 self signed certs):

 public class TestingDeferImageLoad implements EntryPoint {

     public void onModuleLoad() {

         final Image image = new Image();
         RootPanel.get().add(image);

         Timer deferImageLoad = new Timer() {

             @Override
             public void run() {

                 try {
                     image.setUrl(http://www.google.co.uk/logos/2011/
 Albert_Szent_Gyorgyi-2011-hp.jpg);
                 } catch(Exception e) {
                     Window.alert(e.getLocalizedMessage());
                }

             }
         };

         deferImageLoad.schedule(1000);
     }

 }

 Without SSL everything works fine. Obviously I can catch/handle the
 exception but should I have to? - It was a pain to track down.

 Note: I've mirrored the same code in vanilla Javascript without the
 Exception being thrown.

 Although it's a bit of an edge case, has anyone else come accross this
 problem? Should I file a bug??

 Cheers,
 Dave

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: IE + SSL + Image.setURL throws an Operation Exception at runtime

2011-09-20 Thread John Tamplin
On Tue, Sep 20, 2011 at 4:20 AM, DaveC david.andrew.chap...@gmail.comwrote:

 There was also another runtime Exception being thrown - this time the
 culprit was the iFrame for GWT History (the exception was thrown at
 the point the iframe's document was being accessed)... it was unused
 and removing it fixed the problem.


Note that the history iframe is only unused if you don't use history (and
you probably should be if you don't want people to back out of your app
accidentally by hitting the back button).

I find it hard to believe that no one else has seen this error???


Could it be related to your use of self-signed certs?  Have you added the
signing certificate as a trusted cert so you don't get a dialog when
browsing to it?

Also, in your example above you are loading an image from http, which will
get you a mixed-mode content warning in an SSL page (and some browsers will
not even fetch it by default).

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: IE + SSL + Image.setURL throws an Operation Exception at runtime

2011-09-20 Thread Jens
I think its a mixed-mode content problem (HTTPS for app and HTTP for your 
requested image). I can't see the issue in our app which uses HTTPS for both 
the app and all resources (to avoid the mixed-mode warning of browsers).

-- J.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: IE + SSL + Image.setURL throws an Operation Exception at runtime

2011-09-20 Thread DaveC
Thanks for the replies John  Jens,

The app can run in http/https, the user can then configure the app to
consume various resources, for example rss feeds, web services - in
this instance the feed resources contained images which were then
loaded over http.

The issue was/is that IE throws a javascript network error when the
image has it's url set - this is only reproducible in IE + GWT + SSL -
mimicking the GWT code in vanilla Javascript + IE +SSL doesn't throw
any errors, so I don't *think* it's a certificate/ssl/browser thing.

Your right we should be using history management - but the inclusion
of an iframe shouldn't cause a runtime error. Again this only occurs
in IE + GWT + SSL.

Cheers,
Dave

On Sep 20, 2:26 pm, Jens jens.nehlme...@gmail.com wrote:
 I think its a mixed-mode content problem (HTTPS for app and HTTP for your
 requested image). I can't see the issue in our app which uses HTTPS for both
 the app and all resources (to avoid the mixed-mode warning of browsers).

 -- J.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors