Viewer won't open properly

3078
7
01-22-2012 03:12 AM
EinarLjung_Opedal
New Contributor
When opening my localy deployed viewer the toolbar is not loaded and I am not able to add tool when in edit mode.

I recieve the following message for about one second; "The viewer could not be loaded. Check browser's console for further details." The viewer has worked perfect so far!

Thanks Einar
0 Kudos
7 Replies
EinarLjung_Opedal
New Contributor
So, I am able to create a new application, deploy it localy and then open it up with no problems. I have changed nothing compared to the non functioning application

I must add that the non functioning application opens the basemap, shows the title and links i've created and otherwise works fine. It's only the toolbar that does not load, but without the custom toolbar the viewer is of little help.
There is little trouble creating a new application, but I am afraid this will happen again when the application is used live.

Thank you for any help!

Einar
0 Kudos
DerekLaw
Esri Esteemed Contributor
Hi Einar,

  ... It's only the toolbar that does not load, but without the   custom toolbar the viewer is of little help.


From your posts, it sounds like you have implemented a custom toolbar in the ArcGIS Viewer for Silverlight application builder and it is not deploying in your web applications correctly.
Can you please confirm this is your issue?

Does the custom toolbar work outside of the ArcGIS Viewer for Silverlight application builder in a stand-alone Silverlight API web application?
Have you tried to view the HTTP request and response using a standard tool for interrogating HTTP communication such as Fiddler, Silverlight Spy, FireBug (FireFox add-on)?

Hope this helps,
0 Kudos
EinarLjung_Opedal
New Contributor
Thanks Derek. I have not been able to figure out the cause of my problem. But there are some updates which might give you a better clue to what is going on.

By custom toolbar I simply mean using the bookmark and time slider sample add ins from the resource centre. I have not customized anything beyond this. I have discovered that by using internet explorer instead of google chome as my web browser I am able to eliminate some trouble; instead of the entire toolbar disappering only the bookmark and timeslider are gone when opening the viewer. This may indicate the the add ins are to blame, but they work on and off and have been built through visual studios without any errors. Any clues as to what is the cause?

Thank you!
0 Kudos
DerekLaw
Esri Esteemed Contributor
Hi Einar,

... instead of the entire toolbar disappering only the bookmark and timeslider are gone when opening the viewer. This may indicate the the add ins are to blame, but they work on and off and have been built through visual studios without any errors.


Q1) What OS are you running the Silverlight Viewer on?
Q2) What version of Visual Studio are you using?
Q3) Can you please elaborate on "instead of the entire toolbar disappering only the bookmark and timeslider are gone"? Can you provide some screenshots?
Q4) What do you mean when you say "they work on and off"?
Q5) Did you have the beta 2 release installed previously? Did you also have the beta SDK installed and ran some custom tools?
Q6) Have you tried to view the HTTP request and response using a standard tool for interrogating HTTP communication such as Fiddler, Silverlight Spy, FireBug (FireFox add-on)?

Hope this helps,
0 Kudos
RiverTaig1
Occasional Contributor
I am experiencing the exact same problem on both Firefox (ver 13.01) and Chrome (works in IE though).  I believe this is an identical situation.  I created an AddIn using the ESRI Silverlight AddIn template.  It was working just fine on all browsers, but now for some strange reason it won't load the toolbar at all in Firefox and Chrome.  I get the same exact error mesage as the original poster. I looked at the Firefox web console, and I see, "uncaught exception: TypeError: frame is undefined. It's not just my machine either.  Several other people are complaing that it doesn't work for them either (although on some browsers apparently it does work).
0 Kudos
RiverTaig1
Occasional Contributor
I am experiencing the exact same problem on both Firefox (ver 13.01) and Chrome (works in IE though).  I believe this is an identical situation.  I created an AddIn using the ESRI Silverlight AddIn template.  It was working just fine on all browsers, but now for some strange reason it won't load the toolbar at all in Firefox and Chrome.  I get the same exact error mesage as the original poster. I looked at the Firefox web console, and I see, "uncaught exception: TypeError: frame is undefined. It's not just my machine either.  Several other people are complaing that it doesn't work for them either (although on some browsers apparently it does work).

For clarification, I do get a map in Firefox, but no tools. As to the questions you posed above:
Q1) What OS are you running the Silverlight Viewer on? Windows 7
Q2) What version of Visual Studio are you using? Visual Studio 2010 SP1
Q3) Can you please elaborate on "instead of the entire toolbar disappering only the bookmark and timeslider are gone"? Can you provide some screenshots? In my case, all the tools on the toolbar disappear. Without question though it is associated with my addin as the toolbar reappears if I take my add-in off.  Note that even the silverlight builder itself can't load the toolbar in Firefox (I had to use IE to edit it). At this point, even a "Hello World" add-in fails in Firefox
Q4) What do you mean when you say "they work on and off"? My add-in was working fine in Firefox. I didn't make any changes to Firefox that I am aware of.  Now it simply never works.  Of the 5 or so people I have had look at this, all but one are unable to view using Firefox. The only thing I can think of that might have changed is a Windows Update which was run on 6/27
Q5) Did you have the beta 2 release installed previously? I probably did, yes Did you also have the beta SDK installed and ran some custom tools?Not sure
Q6) Have you tried to view the HTTP request and response using a standard tool for interrogating HTTP communication such as Fiddler, Silverlight Spy, FireBug (FireFox add-on)? It's in FireFox's Error console that I see Error: uncaught exception: TypeError: frame is undefined. I don't see much in the way of useful information in Fiddler. I do have Firebug installed, but am too much of a newbie to it to know how to really use it.
0 Kudos
DerekLaw
Esri Esteemed Contributor
Hi Einar and Devon,

Apologies for the late reply to this thread, I have been away on business travel in recent weeks.

The Silverlight Viewer Dev team investigated your issues:

#1 - Toolbars failed to load entirely in Firefox and Chrome when a custom tool is included. It appears that there is an erroneous line of code in the default add-in.  In the LoadConfiguration method of MyTool.cs, line 37 is:


[INDENT]configDialog.InputTextBox.Text = configData;[/INDENT]


The problem is that, by default, configData is null, and you cannot assign a null value to the Text property of a TextBox.  In IE, the the exception is handled gracefully and the tool loads anyway. But for some reason, it crashes the whole toolbar in Firefox and Chrome. Unfortunately, the browser was swallowing the exception, which made it difficult to track down. The fix is to simply change the line to the following:
[INDENT]
configDialog.InputTextBox.Text = configData ?? "";[/INDENT]


This just sets the text value to an empty string if configData is null.

#2 - The Time Slider and Measure add-ins would not load in IE, but other tools loaded without issue. We were not able to reproduce this issue. Please open a ticket with Esri Technical Support so they can look into this further.

Hope this helps,
0 Kudos