ShinyProxy: IE 11 error with JQuery that results in white screen

After a production of shiny apps on ShinyProxy, I have received reports from users that those apps do not open in Internet Explorer 11 (mostly) and 10 (less often) by remaining on white screen after choosing apps. While investigating the issue, I suspect the error was related to JQuery call.

Situation/Condition:
When a new instance is to be created (no previous instances) by IE 11 (or 10), the shiny app fails to load.

(Another approach to replicate the issue, rerun the ShinyProxy.)

Once the app is successfully loaded with Chrome, Firefox, or other modern browsers, IE can successfully access the app. There was no such (IE-related) error when alternatives were used.(Shiny Server, ShinyApps.io, etc.)

Error Message:
SCRIPT5007: Unable to get property ‘style’ of undefined or null reference

ShinyProxy Code

Launching Executive Dashboard...
<script type="text/javascript">
	function setShinyframeHeight() {
		$('#shinyframe').css('height', ($(window).height())+'px');
	}
	window.addEventListener("load", setShinyframeHeight);
	window.addEventListener("resize",  setShinyframeHeight);
	
	$(window).on('load', function() {
		var source = $("#shinyframe").attr("src");
		if (source == "") {
			$(".loading").show(); // **here is where error occurs**

Specifically, this error is raised when the following code was accessed:
(jquery/src/css/support.js)

JQuery Code (support.js)

    // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
	// Some styles come back with percentage values, even though they shouldn't
	div.style.right = "60%"; // ** this is the line causing the error.**

From the following link, someone pointed out that the error occurs when IE does not handle a CSS feature detection code above. Compatibility Mode does not solve it with any options (checked/unchecked).

Link (FYI):
https://github.com/jquery/jquery/issues/3273

Comment
Strangely, the app is loaded after couple (at least two) of Refresh (F5)* or anyhow an instance was previously created by other browsers. Also, based on finding that the same app works on shinyapps.io or shiny server, it may seem that it is related to how ShinyProxy handles such type of errors in IE. I am wondering if you can make a fix to handle JQuery erros on IE.

Again, I hope if there is a quick fix. (It is bit hard to persuade IE users to hit F5.) Thanks a bunch!

@Wongyu_Choi
There is a similar discussion in the following thread

I am yet to try the solution provided in the thread, will update if the header update fixes the issue.

Regards,
Jay

1 Like

@Jayaramm
Thanks for the comments. From the past post you attached, the ShinyProxy team could not replicate the issue. It may be related to instances that are already created by other browsers or by any means. I suspect that once an app instance is successfully created, it seems the above error does not occur.

I will look forward your follow-ups. Thanks.

@Wongyu_Choi Yes i have the same issue what you mention when i use the default shinyproxy index.html file.

First load will always show blank screen. When i hit F5 it loads the application. I have this issue only in IE.
Subsequent launch will not have issue as the container for the user is already started.

Regards,
Jay

1 Like

Does this thread help?https://github.com/openanalytics/shinyproxy/issues/118

1 Like

I guess this problem still exists. Any workaround found?

I am not sure why, but adding onclick=“window.open(this.href, “_self”);return false” did not solve the issue.

It works for me with compatible mode disabled. Anyway, you can always take advantage of the shinyproxy template feature and tweak the content inside until it works.

1 Like

The compatibility mode was disabled throughout.

Methods on onclick does not solve this issue so far. Even making browser refreshed with onclick does not solve the issue. Only manual F5 at the white screen does work…

I should need to dig into further with the Shinyproxy template. This issue exists in any IE11 in all three of my Windows environments. Thanks for your suggestion!

@Wongyu_Choi, did you ever solve this? I expect the similar issue, but in another context. I’m not using ShinyProxy, I get this on an intranet site which is using jQuery. Your thread is the only one I have found.

KR,
Matthias