[BUG]AppInsights not working in IE7

Description/Screenshot
We are in the process of upgrading our pages to support multiple browsers.  But, there are pages where we force compatibility to IE7.  When we inject appinsight script into these pages, we get javascript syntax error.  It would be appreciated if we can receive a workaround to get it working for our old pages until we roll out the new pages.
Steps to Reproduce

OS/Browser:IE 11 with forced compatibility to IE7

SDK Version [e.g. 22]:

How you initialized the SDK:
We are using below code to inject the appinsight script:
StringBuilder AppInsightCli = new StringBuilder();
AppInsightCli.Append("<script type="text/javascript">");
AppInsightCli.Append("var appInsights = window.appInsights || function (a) {");
AppInsightCli.Append("function b(a) { c[a] = function () { var b = arguments; c.queue.push(function () { c[a].apply(c, b) }) } } var c = { config: a }, d = document, e = window; setTimeout(function () { var b = d.createElement("script"); b.src = a.url || "https://az416426.vo.msecnd.net/scripts/a/ai.0.js\", d.getElementsByTagName("script")[0].parentNode.appendChild(b) }); try { c.cookie = d.cookie } catch (a) { } c.queue = []; for (var f = ["Event", "Exception", "Metric", "PageView", "Trace", "Dependency"]; f.length;)b("track" + f.pop()); if (b("setAuthenticatedUserContext"), b("clearAuthenticatedUserContext"), b("startTrackEvent"), b("stopTrackEvent"), b("startTrackPage"), b("stopTrackPage"), b("flush"), !a.disableExceptionTracking) { f = "onerror", b("" + f); var g = e[f]; e[f] = function (a, b, d, e, h) { var i = g && g(a, b, d, e, h); return !0 !== i && c["" + f](a, b, d, e, h), i } } return c");
AppInsightCli.AppendLine("}({").Append($"instrumentationKey: "{ConfigurationManager.AppSettings["AppInsights.Key"]}"")
.Append(",").AppendLine("disableCorrelationHeaders: false")
.AppendLine("});");
AppInsightCli.Append("window.appInsights = appInsights;");
AppInsightCli.Append("appInsights.queue.push(function(){");
AppInsightCli.Append("appInsights.context.addTelemetryInitializer(function (envelope) {");
AppInsightCli.Append("const tags = envelope.tags;");
AppInsightCli.Append("if (tags) {");
AppInsightCli.Append($"tags['ai.user.id'] = "{HttpContext.Current.User.Identity.Name.Split(new string[] { "\" }, StringSplitOptions.RemoveEmptyEntries).Last()}";").AppendLine("}");
AppInsightCli.Append("var telemetryItem = envelope.data.baseData;");
AppInsightCli.Append("if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {");
AppInsightCli.Append($"telemetryItem.name = "{requestName}";");
AppInsightCli.Append($"envelope.tags['ai.operation.name'] = telemetryItem.name;");
AppInsightCli.AppendLine("}");
AppInsightCli.Append("telemetryItem.properties = telemetryItem.properties || {};");
AppInsightCli.Append($"telemetryItem.properties["portal"] = "{psetting.PortalName}";");
AppInsightCli.Append($"telemetryItem.properties["area"] = "{psetting.ActiveArea.AreaName}";");
AppInsightCli.Append($"telemetryItem.properties["zone"] = "{psetting.ActiveZone.ZoneName}";");
AppInsightCli.Append($"telemetryItem.properties["section"] = "{psetting.ActiveSection.SectionName}";");
         if (AdditionalProperties != null && AdditionalProperties.Count > 0)
         {
             foreach (string key in AdditionalProperties.Keys)
             {
                 if (!string.IsNullOrWhiteSpace(key) && !string.IsNullOrWhiteSpace(AdditionalProperties[key]))
                 {
                     AppInsightCli.Append($"telemetryItem.properties[\"{key}\"] = \"{AdditionalProperties[key]}\";");
                 }
             }
         }

         AppInsightCli.AppendLine("});");
         AppInsightCli.Append($"var serverId = \"{HttpContext.Current.GetRequestTelemetry().Context.Operation.Id}\";");
         AppInsightCli.Append("appInsights.context.operation.id = serverId;");
         AppInsightCli.AppendLine("});");
         AppInsightCli.Append("appInsights.trackPageView();");
         AppInsightCli.Append("</script>");
         page.ClientScript.RegisterStartupScript(page.GetType(), "AppInsight", AppInsightCli.ToString());

Expected behavior
What's happening is that server requests are being logged but page views are not.  We expect page view, user and session info to be logged.
Additional context
Add any other context about the problem here.

I suspect your getting some form of JS exception being thrown.
Can you load the dev tools (F12) and see what errors are appearing on the console?
And as a couple of side notes

You should be encoding the strings used in the StringBuilder as this might corrupt your script
It looks like your using an older version as it's downloading from https://az416426.vo.msecnd.net/scripts/a/ai.0.js which appears to have an internal version of <IP_ADDRESS>
I also assume that this works in without forcing IE7 mode?

We recently added ES3 support to allow the SDK to function on older browsers and in compatibility mode such as this... So you may want to consider upgrading -- but lets identify the error first.

Nev,
Can you please provide url of the JS that I should be using?  I just get a generic syntax error which I don’t see if I remove compatibility mode.   The error is somewhere in this code and it is not clear what is not compatible:
AppInsightCli.AppendLine("}({").Append($"instrumentationKey: "{ConfigurationManager.AppSettings["AppInsights.Key"]}"")
.Append(",").AppendLine("disableCorrelationHeaders: false")
Thanks,
Tim
Sent from my iPhone
On Dec 18, 2019, at 6:00 PM, Nev <notifications<EMAIL_ADDRESS>wrote:
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
I suspect your getting some form of JS exception being thrown.
Can you load the dev tools (F12) and see what errors are appearing on the console?
And as a couple of side notes

You should be encoding the strings used in the StringBuilder as this might corrupt your script
It looks like your using an older version as it's downloading from https://az416426.vo.msecnd.net/scripts/a/ai.0.js which appears to have an internal version of <IP_ADDRESS>
I also assume that this works in without forcing IE7 mode?

We recently added ES3 support to allow the SDK to function on older browsers and in compatibility mode such as this... So you may want to consider upgrading -- but lets identify the error first.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUPL57NDI6ID7PPQKATQZKTRRA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHHY66I#issuecomment-567250809, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUIDIAT5BB36BR5X6QDQZKTRRANCNFSM4J4QWRFQ.

The version you are using is now considered to be "legacy" and will not have any changes like this fixed. As such to continue getting the latest code and therefore ES3 (IE7/8) support you will need to upgrade to the new version/snipet which is documented in the readme (which includes the new CDN URL). - https://github.com/microsoft/ApplicationInsights-JS#snippet-setup-ignore-if-using-npm-setup
On the error...
If I'm decoding your c# correctly this looks like it resolves to something like this
}({instrumentationKey: "" ,disableCorrelationHeaders: false});
Which is really the end of the snipet initialization (the pass the argments portion), so it could be any of the following

ES3 incompatible syntax in the pasted snippet code (will need to pull this apart)
the configured instrumentation key is somehow corrupting the generated javascript (including quotes would do this)
Some older browsers don't like JSON notation with unquoted keys (normal safari and really old browsers), but it's normally just for reserved words which these are not... - so you could try quoting the keys in this case so it looks like the following but I don't expect this to "fix" an IE7 issue
}({"instrumentationKey": "" ,"disableCorrelationHeaders": false});

If you look at the end of the Readme, I've added a table of know ES3 incompatible JS functions which if used can cause this issue. And for any of your javascript you will also need to be aware of.

Had some time so did a quick pass on the pasted snippet and it doesn't look like there are any ES3 usage issues, however, unless it's a copy/paste issue you do have something going on with quotes around this
.url || "https://az416426.vo.msecnd.net/scripts/a/ai.0.js", d.getElementsByTagName("script")[0].parentNode.appendChild(b) }); try { c.cookie = d.cookie
@ the end of the ai.0.js you have an escaped quote " " ", but your not escaping other quotes...
It might be somthing around this where later versions handle this better than IE7...

This is what my javascript resolves to:

Sorry, here is actual script.  Please ignore above.
`

`

Thanks,
I've used this and found a couple of issues that needs to be fixed
Issue 1)

In the configuration you have "const tags = envelope.tags" this should be "var tags = envelope.tags" as IE7/8 doesn't understand the const keyword

Issue 2)

This are 2 issues in the SDK (which we will need to fix)

The published version "https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js" and unminified version includes a .catch(function(reason) from the code that is using fetch. While this code will never be executed by IE7/8 it is causing a JS parsing error in IE8 mode
And in IE7 mode there is another (unidentified at them moment) issue where the JS parsing is expecting a ';' somewhere but can't find it. I also hit a file that included "export" which will also break JS parsing.

As an expectation on timeframe, we won't get to or publish a fix for this until early 2020 as we are about to hit a lockdown period.
Can you try rolling back to your v1 usage and remove the const?

Thanks Nev, I think that might have done the trick.  I am doing some testing to verify.
From: Nev<EMAIL_ADDRESS>Sent: Thursday, December 19, 2019 2:25 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
As an expectation on timeframe, we won't get to or publish a fix for this until early 2020 as we are about to hit a lockdown period.
Can you try rolling back to your v1 usage and remove the const?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUJZJMRDXZLE2T5VZZDQZPC7DA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHKVBFQ#issuecomment-567627926, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUOO77K6TFU6SQ5HSYLQZPC7DANCNFSM4J4QWRFQ.

The issue with the v2.3 is that we have not yet published the IE8 compatibility bits (v 2.3.1) to the CDN.
I'm going to perform some additional validation now and we will publish the corrected bits in early Jan 2020.

Version 2.3.1 does not throw and exceptions (during initialization) in IE7 and IE8 modes.

I will keep version 1 until 2.3 is added to CDN.  I am noticing that not all page views are logged when user is using IE.  When they switched to Edge, all page views are tracked.

I suspect these are events associated with unload of the browser (especially for safari and idevices), this has been addressed as part of #1080 which will be in the version 2.4 or greater (I created a beta version of this yesterday but we only published the npm package), I suspect this will be the end of Jan (maybe Feb) before 2.4 is published to the CDN.

We have now published v 2.3.1 to the CDN so
https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js and
https://az416426.vo.msecnd.net/scripts/b/ai.2.js
now downloads v 2.3.1
So this should address the above errors on IE7/8

Nev,
Thanks.  I gave it a  try and I am getting couple of javascript errors.  Below are errors and the script I am using on my pages.  Am I doing something incorrectly in script?
SCRIPT5007: Unable to get property 'push' of undefined or null reference
SCRIPT438: Object doesn't support property or method 'defineProperty'
File: ai.2.min.js, Line: 5, Column: 118792

From: Nev<EMAIL_ADDRESS>Sent: Tuesday, January 07, 2020 5:09 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
We have now published v 2.3.1 to the CDN so
https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js and
https://az416426.vo.msecnd.net/scripts/b/ai.2.js
now downloads v 2.3.1
So this should address the above errors on IE7/8
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUJVOBDAJZ2SE3ED6PDQ4T4PFA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIKOVKY#issuecomment-571796139, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJTNE3EN5HKYDZQFJ3Q4T4PFANCNFSM4J4QWRFQ.

Ok, there are 2 issues identified here.

'push' undefined

This is a difference between the versions, to fix this you need to update the snippet that you burn on the page (copy the current from the readme) https://github.com/Microsoft/ApplicationInsights-JS#snippet-setup-(ignore-if-using-npm-setup)

The second is a problem with the way TypeScript or rollup is creating the module, while we appear to have fixed all of the ES3 issues in the script, at the very end of the module is the following line
Object.defineProperty(exports, '__esModule', { value: true });
The issue is that IE7 doesn't implement "defineProperty" while IE8 defines it but may throw, so this issue is specific to IE7.... Will need to dig into this a bit deeper as using the F12 for IE11 in IE7 mode it appears that IE is not letting the script run (even though it should work).

I was able to clear out first issue.  I miscopied something from github.
For second issue, it is failing in init.js and going to catch block:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { ApplicationInsightsContainer } from "./ApplicationInsightsContainer";
export { Initialization as ApplicationInsights } from "./Initialization";
"use strict";
// should be global function that should load as soon as SDK loads
try {
// E2E sku on load initializes core and pipeline using snippet as input for configuration
// tslint:disable-next-line: no-var-keyword
var aiName;
if (typeof window !== "undefined" && typeof JSON !== "undefined") {
// get snippet or initialize to an empty object
aiName = window["appInsightsSDK"] || "appInsights";
if (window[aiName] !== undefined) {
// this is the typical case for browser+snippet
var snippet = window[aiName] || { version: 2.0 };
// overwrite snippet with full appInsights
// for 2.0 initialize only if required
if ((snippet.version === 2.0 && window[aiName].initialize) || snippet.version === undefined) {
ApplicationInsightsContainer.getAppInsights(snippet, snippet.version);
}
}
}
}
catch (e) {
// TODO: Find better place to warn to console when SDK initialization fails
if (console) {
console.warn('Failed to initialize AppInsights JS SDK for instance ' + aiName + e.message);
}
}
//# sourceMappingURL=Init.js.map
From: Nev<EMAIL_ADDRESS>Sent: Wednesday, January 08, 2020 1:22 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Ok, there are 2 issues identified here.

'push' undefined

This is a difference between the versions, to fix this you need to update the snippet that you burn on the page (copy the current from the readme) https://github.com/Microsoft/ApplicationInsights-JS#snippet-setup-(ignore-if-using-npm-setup)

The second is a problem with the way TypeScript or rollup is creating the module, while we appear to have fixed all of the ES3 issues in the script, at the very end of the module is the following line
Object.defineProperty(exports, '__esModule', { value: true });
The issue is that IE7 doesn't implement "defineProperty" while IE8 defines it but may throw, so this issue is specific to IE7.... Will need to dig into this a bit deeper as using the F12 for IE11 in IE7 mode it appears that IE is not letting the script run (even though it should work).

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUL3RYZFF3QRCMICPC3Q4YKVFA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEINP2OA#issuecomment-572194104, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUMIMHSQJZ7GQ2PMPWDQ4YKVFANCNFSM4J4QWRFQ.

Yes, I dug into it and identified the root cause as that final Object.defineProperty() which is added by rollup (used to create the modules at the point of packaging) so we are going to need to post process the generated files to "fixup" this issue and release a new version -- I expect it will be a few weeks before I'll get to and fix this problem.

Version 2.4.3 is now published to CDN and NPM, this fixes the identified issues in this thread.
Note: If you are using / forcing IE7 mode you MUST also supply a JSON polyfil (before) App Insights is loaded otherwise app Insights will not be able to initialize.

Thanks.  What’s good library to include for JSON polyfil?
From: Nev<EMAIL_ADDRESS>Sent: Tuesday, February 04, 2020 2:56 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Version 2.4.3 is now published to CDN and NPM, this fixes the identified issues in this thread.
Note: If you are using / forcing IE7 mode you MUST also supply a JSON polyfil (before) App Insights is loaded otherwise app Insights will not be able to initialize.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUKKA7JJUZUFVYRGCBTRBHB4NA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKY7B4A#issuecomment-582086896, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJGDEM2XHXKFBKMTSLRBHB4NANCNFSM4J4QWRFQ.

Here is one possible version (there are many)
https://github.com/douglascrockford/JSON-js

Hi Nev,
I finally got to try your solution.  I included JSON polyfil and updated the appinsight script that is injected onto page.  However, the browser activity is still not being logged.  Server activity is logged fine.  Please let me know if I have something wrong in below script.

From: Nev<EMAIL_ADDRESS>Sent: Tuesday, February 4, 2020 2:56 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Closed #1142https://github.com/microsoft/ApplicationInsights-JS/issues/1142.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUIZ2QQRT5CIAAZNH23RBHB4NA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWNBLSUY#event-3007494483, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJGDEM2XHXKFBKMTSLRBHB4NANCNFSM4J4QWRFQ.

I realized I was still referencing version 2.  Switched to 2.4.3 but still seeing the issue of page views not being logged.
From: Sorial, Timothy
Sent: Saturday, February 29, 2020 12:33 PM
To: 'microsoft/ApplicationInsights-JS'<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Hi Nev,
I finally got to try your solution.  I included JSON polyfil and updated the appinsight script that is injected onto page.  However, the browser activity is still not being logged.  Server activity is logged fine.  Please let me know if I have something wrong in below script.

From: Nev <notifications<EMAIL_ADDRESS>Sent: Tuesday, February 4, 2020 2:56 PM
To: microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy <t.sorial<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Closed #1142https://github.com/microsoft/ApplicationInsights-JS/issues/1142.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142?email_source=notifications&email_token=AOCLWUIZ2QQRT5CIAAZNH23RBHB4NA5CNFSM4J4QWRF2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWNBLSUY#event-3007494483, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJGDEM2XHXKFBKMTSLRBHB4NANCNFSM4J4QWRFQ.

Hey, what do you mean by "page views not being logged"?
When running in IE7 (or IE7 mode) the browser does not support the onhashchange event (which is what is used to track SPA page changes) as such NO automatic instrumentation will occur and there is no generic way that App Insights could do this (without causing issues). As such this is an unsupported feature for IE7.
You can however, still call trackPageView() yourself and this will attempt to send the requests to the server, I created a local script and ran it in IE7 mode to confirm that the request is "Attempted" so it will work.
What I mean by "Attempted" is that when running in IE7 mode my local file (file://T:/xxxx.html) is coming from the local domain, I have the script being fetched from "https://az416426.vo.msecnd.net/scripts/b/ai.2.js" (uncompressed published version) which then calls trackPageView() -- However, this fails because the XDomainRequest() fails because the page domain is not on the same protocol as the page (file / https). If you load the unminified version this is in the Sender.js around line 540 the code attempts to log a warning, however, again IE7 mode doesn't support console.log...
While AI "supports" ES3 mode (i.e. IE7/8) not all of the features will work, we will fix any JS error and you can manually call trackXXX methods and we will make sure the automatic traceException() continue. I believe this is stated in the readme.
Now in terms of IE7 mode, exactly why do you need to support IE7?
As the total number of users still using IE7 is extremely low. I am aware that when you "host" (embed) a Browser control into your own application C# / C++ (ActiveX) by default every version of IE (including IE11) will run in IE7 mode.
However, you can change this default behavior by adding a meta tag to your returned HML page which will then run in the requested mode (if available), and if all these fail it will still default back to IE7 mode. This is one of the primary reasons why we are supporting and ES3 environment as we have customers internal to MS and external that have applications that run inside of hosted browsers and can't control the "real" version of the browser installed (Mostly because that are running really old (now unsupported) OS versions -- e.g. XP / ME etc)
The following links provide some good descriptions on the meta tags
https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-iedoco/380e2488-f5eb-4457-a07a-0cb1b6e4b4b5
https://stackoverflow.com/questions/26346917/why-use-x-ua-compatible-ie-edge-anymore

Nev,
There are some pages which require forced compatibility to IE7 for them to work properly.  Our app is quite large and we are in the process of trying to slowly convert these legacy pages so we don’t have to do forced compatibility.
When I inspect further, I am noticing Expected Identifier error when opening developer tools which I didn’t see before the upgrade.  It is pointing to this injected script.  Please let me know if I am doing anything incorrect in this script.

By the way, I did make sure to include json polyfil as you had suggested.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Thursday, March 19, 2020 11:32 AM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Nev,
There are some pages which require forced compatibility to IE7 for them to work properly.  Our app is quite large and we are in the process of trying to slowly convert these legacy pages so we don’t have to do forced compatibility.
When I inspect further, I am noticing Expected Identifier error when opening developer tools which I didn’t see before the upgrade.  It is pointing to this injected script.  Please let me know if I am doing anything incorrect in this script.

You have an extra { here which IE 7 mode doesn't like, you will also need to watch out for missing ';' as IE 7/8 can get picky depending on what trails it.
return o}({{
instrumentationKey: "c1a84ccf-ed3a-4245-adfb-9ecbad40dc46",disableCorrelationHeaders: false
});

I just noticed that  and removed it.  However, I am getting long running script error in IE.  I tried to open developer tools to inspect but couldn’t as the browser gets locked up.  It seems like this only happens when the appinsight script is injected.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Thursday, March 19, 2020 3:40 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
You have an extra { here which IE 7 mode doesn't like, you will also need to watch out for missing ';' as IE 7/8 can get picky depending on what trails it.
return o}({{
instrumentationKey: "c1a84ccf-ed3a-4245-adfb-9ecbad40dc46",disableCorrelationHeaders: false
});
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-601379933, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUITJI6GHBLYJP5H4EDRIJYJXANCNFSM4J4QWRFQ.

Is the syntax specified below on SDK website compatible with IE7?

Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Friday, March 20, 2020 9:04 AM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Author<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
I just noticed that  and removed it.  However, I am getting long running script error in IE.  I tried to open developer tools to inspect but couldn’t as the browser gets locked up.  It seems like this only happens when the appinsight script is injected.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev <notifications<EMAIL_ADDRESS>Sent: Thursday, March 19, 2020 3:40 PM
To: microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy <t.sorial<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
You have an extra { here which IE 7 mode doesn't like, you will also need to watch out for missing ';' as IE 7/8 can get picky depending on what trails it.
return o}({{
instrumentationKey: "c1a84ccf-ed3a-4245-adfb-9ecbad40dc46",disableCorrelationHeaders: false
});
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-601379933, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUITJI6GHBLYJP5H4EDRIJYJXANCNFSM4J4QWRFQ.

It took a bit of digging to find the problem, but this is an issue with the changes in 2.5.x and it's usage of dynamicProto() where the dynamicProto() is in an endless loop -- causing the long running script.
As a work around, you can change the url to this.
https://az416426.vo.msecnd.net/scripts/b/ai.2.4.3.min.js
While I fix the dynamicProto component

I've just rolled back the main ai.2.min.js script to version 2.4.4, so you shouldn't need to change the url anymore

Created a new bug as there was a secondary issue that was also breaking IE7/8, so will fix both with the new issue
[BUG] When running in IE7/8 the app insights doesn't initialize and gets stuck in a loop #1224

Thanks Nev.  I think that resolved the error.  Is there a reason why I am not seeing users being logged in Azure for my requests?  I believe in version 1, this used to work.
<EMAIL_ADDRESS>Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Friday, March 20, 2020 10:46 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Created a new bug as there was a secondary issue that was also breaking IE7/8, so will fix both with the new issue
[BUG] When running in IE7/8 the app insights doesn't initialize and gets stuck in a loop #1224https://github.com/microsoft/ApplicationInsights-JS/issues/1224
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-601982626, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUMAOBZFDFE3KIAID33RIQS7NANCNFSM4J4QWRFQ.

Hi Nev,
Any update on this will be greatly appreciated.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Saturday, March 21, 2020 10:33 AM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Thanks Nev.  I think that resolved the error.  Is there a reason why I am not seeing users being logged in Azure for my requests?  I believe in version 1, this used to work.
<EMAIL_ADDRESS>Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev <notifications<EMAIL_ADDRESS>Sent: Friday, March 20, 2020 10:46 PM
To: microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy <t.sorial<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Created a new bug as there was a secondary issue that was also breaking IE7/8, so will fix both with the new issue
[BUG] When running in IE7/8 the app insights doesn't initialize and gets stuck in a loop #1224https://github.com/microsoft/ApplicationInsights-JS/issues/1224
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-601982626, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUMAOBZFDFE3KIAID33RIQS7NANCNFSM4J4QWRFQ.

Hi Tim,
I'm hoping to publish v2.5.3 either later tonight or tomorrow -- waiting on PR signoff.
Sorry I missed this question from above
"Is there a reason why I am not seeing users being logged in Azure for my requests?"

I can't think of why this should not be working the user details are stored in a cookie ai_user along with the session ai_session, so unless we can't get the authenticated user details it should be present, I'm not currently aware of any IE 7/8 issues and I believe that IE 7/8 is still currently on the support matrix for Identity (My previous team here @ MS).

We might need to look at a fiddler trace to see what's going on on the page, it may be some form of crossorigin or something...
Cheers
Nev

What I am finding is that user is being logged at server level but not browser level.  So, I am not able to see the user browser/operating system info.  How would you want me to capture the fiddler trace?  Is there anything specific that I should be looking for?
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Tuesday, March 24, 2020 9:42 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Hi Tim,
I'm hoping to publish v2.5.3 either later tonight or tomorrow -- waiting on PR signoff.
Sorry I missed this question from above
"Is there a reason why I am not seeing users being logged in Azure for my requests?"

I can't think of why this should not be working the user details are stored in a cookie ai_user along with the session ai_session, so unless we can't get the authenticated user details it should be present, I'm not currently aware of any IE 7/8 issues and I believe that IE 7/8 is still currently on the support matrix for Identity (My previous team here @ MS).

We might need to look at a fiddler trace to see what's going on on the page, it may be some form of crossorigin or something...
Cheers
Nev
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-603593013, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUKG6YRTHSDPW5WVT2DRJFOPNANCNFSM4J4QWRFQ.

Nev,
I did some further debugging and found syntax error in the way I am sending telemetry.  I was using aisdk.context.addTelemetryInitializer instead of aisdk.addTelemetryInitializer.  Do you see any other glaring mistakes in below snippet:
window[aiName]=aisdk;aisdk.queue.push(function(){aisdk.addTelemetryInitializer(function (envelope) {var tags = envelope.tags;if (tags) {tags['ai.user.id'] = "t.sorial";}
var telemetryItem = envelope.data.baseData;if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {telemetryItem.name = "Daily Routine/Project Mgmt./Queries/Site Search";envelope.tags['ai.operation.name'] = telemetryItem.name;}
telemetryItem.properties = telemetryItem.properties || {};telemetryItem.properties["portal"] = "Daily Routine";telemetryItem.properties["area"] = "Project Mgmt.";telemetryItem.properties["zone"] = "Queries";telemetryItem.properties["section"] = "Site Search";});
var serverId = "a4b660578acd9a498518129cd68a15a5";aisdk.context.operation.id = serverId;});
aisdk.trackPageView();
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Tuesday, March 24, 2020 9:42 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Hi Tim,
I'm hoping to publish v2.5.3 either later tonight or tomorrow -- waiting on PR signoff.
Sorry I missed this question from above
"Is there a reason why I am not seeing users being logged in Azure for my requests?"

I can't think of why this should not be working the user details are stored in a cookie ai_user along with the session ai_session, so unless we can't get the authenticated user details it should be present, I'm not currently aware of any IE 7/8 issues and I believe that IE 7/8 is still currently on the support matrix for Identity (My previous team here @ MS).

We might need to look at a fiddler trace to see what's going on on the page, it may be some form of crossorigin or something...
Cheers
Nev
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-603593013, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUKG6YRTHSDPW5WVT2DRJFOPNANCNFSM4J4QWRFQ.

Nothing obvious, the only recomendation I would have is around adding some additional checks for the following line, as this could evaluate to undefined depending on the source of the telemetry (e.g. for example a cross origin exception doesn't (currently) populate the envelope.data.baseData so this would block all exceptions of this type from being sent to the server)
var telemetryItem = envelope.data.baseData;
So either of these would work
var data = envelelope.data = envelelope.data || {};
var telemetryItem = data.baseData = data.baseData || {}
where this both assigns the local variable and the embedded envelope data with either the target (itself) or the new empty object.
Cheers
Nev

I made the recommended change and found no difference in behavior.  This is what I am seeing.  Server requests are being logged fine but user info is not.  Notice upper portion is missing region, operating system, and browser info.  Not sure why the telemetry on the client side is not being sent.
<EMAIL_ADDRESS>Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Wednesday, March 25, 2020 1:20 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Nothing obvious, the only recomendation I would have is around adding some additional checks for the following line, as this could evaluate to undefined depending on the source of the telemetry (e.g. for example a cross origin exception doesn't (currently) populate the envelope.data.baseData so this would block all exceptions of this type from being sent to the server)
var telemetryItem = envelope.data.baseData;
So either of these would work
var data = envelelope.data = envelelope.data || {};
var telemetryItem = data.baseData = data.baseData || {}
where this both assigns the local variable and the embedded envelope data with either the target (itself) or the new empty object.
Cheers
Nev
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-603973008, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJM3UG2D5X6I4QUO6LRJI4NZANCNFSM4J4QWRFQ.

I noticed this note regarding breaking change for version 2 upgrade:
Moved context.operation to context.telemetryTrace. Some fields were also changed (operation.id --> telemetryTrace.traceID)

If you want to maunally refresh the current pageview id (e.g. in SPA apps) this can be done with appInsights.properties.context.telemetryTrace.traceID = Util.newId()

I tried this with my aisdk object below but there is no properties object for this one.  Am I missing something or is this under telemetryItem object?
Below is modified script:

Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Wednesday, March 25, 2020 1:20 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Nothing obvious, the only recomendation I would have is around adding some additional checks for the following line, as this could evaluate to undefined depending on the source of the telemetry (e.g. for example a cross origin exception doesn't (currently) populate the envelope.data.baseData so this would block all exceptions of this type from being sent to the server)
var telemetryItem = envelope.data.baseData;
So either of these would work
var data = envelelope.data = envelelope.data || {};
var telemetryItem = data.baseData = data.baseData || {}
where this both assigns the local variable and the embedded envelope data with either the target (itself) or the new empty object.
Cheers
Nev
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-603973008, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJM3UG2D5X6I4QUO6LRJI4NZANCNFSM4J4QWRFQ.

Hi Tim,
I don't have the history from the v1 -> v2 updates, but I grabbed your code and added some additional logging to see what was happening and ran it locally in edge, IE and IE in 7 emulation mode and it looks like the properties are present and it is populating the correct location (as far as I currently know)
This shows that the aisdk.properties.context object exists and is being populated and during the telemetry initializer the value assigned for the traceId is populated.
The new location for the values is located in the
traceId == envelope.ext.trace.traceId
user == envelope.ext.user.id
While the console.log is not showing anything in the tags [] looking at the network request that is sent it does include the values set. And when running in IE7 mode and debugging into the packaging the tags are also set.
So I think it looks ok...
I've also just released v2.5.3 with the IE7 fix to the CDN, so these tests where done with that version,
context:{"sessionManager":{"logger":{"queue":[],"AIInternalMessagePrefix":"AITR","_messageCount":0,"_messageLogged":{}},"config":{},"automaticSession":{}},"application":{},"device":{"id":"browser","deviceClass":"Browser"},"internal":{"sdkVersion":"javascript:2.5.3"},"location":{},"user":{"isNewUser":true,"logger":{"queue":[],"AIInternalMessagePrefix":"AITR","_messageCount":0,"_messageLogged":{}},"config":{},"id":"7naqk","accountAcquisitionDate":"2020-03-25T19:19:49.586Z","accountId":null},"telemetryTrace":{"traceID":"ed81555338e9324393867494f2536b24","name":"/T:/IE7_Error.local.html"},"session":{}}
IE7_Error.local.html:38 envelope:{"name":"Microsoft.ApplicationInsights.{0}.Pageview","time":"2020-03-25T19:19:49.698Z","iKey":"711858ea-f0e0-4ee9-9ddb-5b8a9b79392f","ext":{"device":{"localId":"browser","deviceClass":"Browser"},"user":{"id":"7naqk"},"app":{"sesId":"USyNi"},"trace":{"traceID":"ed81555338e9324393867494f2536b24","name":"/T:/IE7_Error.local.html"}},"tags":[],"data":{"duration":29.27500003715977},"baseType":"PageviewData","baseData":{"name":"","uri":"file:///T:/IE7_Error.local.html","refUri":""},"ver":"4.0"}
IE7_Error.local.html:38 envelope:{"name":"Microsoft.ApplicationInsights.{0}.PageviewPerformance","time":"2020-03-25T19:19:49.702Z","iKey":"711858ea-f0e0-4ee9-9ddb-5b8a9b79392f","ext":{"device":{"localId":"browser","deviceClass":"Browser"},"user":{"id":"7naqk"},"app":{"sesId":"USyNi"},"trace":{"traceID":"ed81555338e9324393867494f2536b24","name":"/T:/IE7_Error.local.html"}},"tags":[],"data":{"duration":29.27500003715977},"baseType":"PageviewPerformanceData","baseData":{"name":"","uri":"file:///T:/IE7_Error.local.html","isValid":true,"durationMs":29.27500003715977,"duration":"00:00:00.029","perfTotal":"00:00:00.029","networkConnect":"00:00:00.000","sentRequest":"00:00:00.000","receivedResponse":"00:00:00.007","domProcessing":"00:00:00.021"},"ver":"4.0"}
IE7_Error.local.html:38 envelope:{"name":"InternalMessageId: 72","iKey":"711858ea-f0e0-4ee9-9ddb-5b8a9b79392f","time":"2020-03-25T19:19:59.597Z","baseType":"MessageData","baseData":{"message":"AI (Internal): 72 message:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4080.0 Safari/537.36 Edg/82.0.453.2""},"ver":"4.0","tags":[],"ext":{"device":{"localId":"browser","deviceClass":"Browser"},"user":{"id":"7naqk"},"app":{"sesId":"USyNi"},"trace":{"traceID":"ed81555338e9324393867494f2536b24","name":"/T:/IE7_Error.local.html"}}}
var sdkInstance="appInsightsSDK";
window[sdkInstance]="appInsights";
var aiName=window[sdkInstance],aisdk=window[aiName]||function(n){var o={config:n,initialize:!0},t=document,e=window,i="script";
setTimeout(function(){var e=t.createElement(i);
e.src=n.url||"https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js",t.getElementsByTagName(i)[0].parentNode.appendChild(e)});
try{o.cookie=t.cookie}catch(e){}function a(n){o[n]=function(){var e=arguments;
o.queue.push(function(){o[n].apply(o,e)})}}o.queue=[],o.version=2;
for(var s=["Event","PageView","Exception","Trace","DependencyData","Metric","PageViewPerformance"];s.length;)a("track"+s.pop());
var r="Track",c=r+"Page";
a("start"+c),a("stop"+c);
var u=r+"Event";
if(a("start"+u),a("stop"+u),a("addTelemetryInitializer"),a("setAuthenticatedUserContext"),a("clearAuthenticatedUserContext"),a("flush"),o.SeverityLevel={Verbose:0,Information:1,Warning:2,Error:3,Critical:4},!(!0===n.disableExceptionTracking||n.extensionConfig&&n.extensionConfig.ApplicationInsightsAnalytics&&!0===n.extensionConfig.ApplicationInsightsAnalytics.disableExceptionTracking)){a("_"+(s="onerror"));
var p=e[s];
e[s]=function(e,n,t,i,a){var r=p&&p(e,n,t,i,a);
return!0!==r&&o"_"+s,r},n.autoExceptionInstrumented=!0}return o}({instrumentationKey: "711858ea-f0e0-4ee9-9ddb-5b8a9b79392f",disableCorrelationHeaders: false});
window[aiName]=aisdk;
aisdk.queue.push(function(){
aisdk.addTelemetryInitializer(function (envelope) {
var tags = envelope.tags;
if (tags) {tags['ai.user.id'] = "t.sorial";}
var data = envelope.data || {};
var telemetryItem = data.baseData || {};
if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {
telemetryItem.name = "123Emily/Setup/Rule/Conditional Reporting & Alert";
envelope.tags['ai.operation.name'] = telemetryItem.name;
}
telemetryItem.properties = telemetryItem.properties || {};
telemetryItem.properties["portal"] = "123Emily";
telemetryItem.properties["area"] = "Setup";
telemetryItem.properties["zone"] = "Rule";
telemetryItem.properties["section"] = "Conditional Reporting & Alert";
try {
var values = JSON.stringify(envelope);
console && console.log && console.log("envelope:" + values);
} catch (e) {
console && console.log && console.log("error:" + e);
}
});
var serverId = "ed81555338e9324393867494f2536b24";
aisdk.properties.context.telemetryTrace.traceID = serverId;
try {
var values = JSON.stringify(aisdk.properties.context);
console && console.log && console.log("context:" + values);
} catch (e) {
console && console.log && console.log("error:" + e);
}
});
aisdk.trackPageView()

Nev,
I am seeing infinite loop issue again after the recent update.  When I deploy this to production,  I don’t want to risk something breaking due to updates.  Do you suggest I host the file instead of using the CDN?  What is recommended?
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Wednesday, March 25, 2020 1:20 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Nothing obvious, the only recomendation I would have is around adding some additional checks for the following line, as this could evaluate to undefined depending on the source of the telemetry (e.g. for example a cross origin exception doesn't (currently) populate the envelope.data.baseData so this would block all exceptions of this type from being sent to the server)
var telemetryItem = envelope.data.baseData;
So either of these would work
var data = envelelope.data = envelelope.data || {};
var telemetryItem = data.baseData = data.baseData || {}
where this both assigns the local variable and the embedded envelope data with either the target (itself) or the new empty object.
Cheers
Nev
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-603973008, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJM3UG2D5X6I4QUO6LRJI4NZANCNFSM4J4QWRFQ.

Hi Tim,
I'm not seeing the infinite loop issue with 2.5.3... I've tested multiple times locally on this.
Can you change the url to the non-minified version, run it in the debugger (F12) and when it gets stuck in the loop press the pause link
https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js => https://az416426.vo.msecnd.net/scripts/b/ai.2.js
In normal situations it will be running the setInterval() for polling the queue each 10 seconds, but this is not the loop / deadlock issue...
I did have 1 case where it seemed to lockup, but I just forced (Ctrl-F5) the current version to be re-fetched from the CDN rather than using the local cached version of the older release

And to answer the questions (sorry missed that in previous response).
Do you suggest I host the file instead of using the CDN?  What is recommended?
It's recommended that you use the CDN as this means

browsers cache the requests based on the domain so if accessing multiple websites that use AI the browser will only fetch once for each site during the max-age timeframe
the CDN's tend to have access points (POP's) closer to the users than the number of locations that your application is deployed to (talking on the global scale here).

The only real advantage of hosting on your own domain is that browsers don't need to perform the DNS lookup fir the different domain, however, browsers have limits in the number of connections (resources) they can download per domain, so multiple domains can actually help -- depending on the users bandwidth and where they are fetching the resources from.

The IE browser just locks up and I am unable to debug.  This morning I wasn’t having these issues.  It seems like after the update was pushed, something went wrong.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Wednesday, March 25, 2020 4:20 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Hi Tim,
I'm not seeing the infinite loop issue with 2.5.3... I've tested multiple times locally on this.
Can you change the url to the non-minified version, run it in the debugger (F12) and when it gets stuck in the loop press the pause link
https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js => https://az416426.vo.msecnd.net/scripts/b/ai.2.js
In normal situations it will be running the setInterval() for polling the queue each 10 seconds, but this is not the loop / deadlock issue...
I did have 1 case where it seemed to lockup, but I just forced (Ctrl-F5) the current version to be re-fetched from the CDN rather than using the local cached version of the older release
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604064596, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUJBQHYNUHR2I6GEBTTRJJRN3ANCNFSM4J4QWRFQ.

What version is it showing at the top of the file, it should be 2.5.3, version 2.5.2 had the issue...
https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js
/*!

Application Insights JavaScript SDK - Web, 2.5.3
Copyright (c) Microsoft and contributors. All rights reserved.
*/

Another question, when the browser locks up is IE doing a bunch of CPU usage?
I just checked locally with IE11 running in IE7 compat mode and it's working fine.
Even when the previous version had the issue I found the browser itself didn't lock up it just burnt ~15% CPU and the debugger pause still worked (at least for me)

Nev,
I switched version to 2.4.4 and the browser no longer locks.  So, that tells me that something is going with version 2.5.x.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Wednesday, March 25, 2020 5:39 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Another question, when the browser locks up is IE doing a bunch of CPU usage?
I just checked locally with IE11 running in IE7 compat mode and it's working fine.
Even when the previous version had the issue I found the browser itself didn't lock up it just burnt ~15% CPU and the debugger pause still worked (at least for me)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604101670, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUPILOC4ZX7EHBMM3F3RJJ2XFANCNFSM4J4QWRFQ.

Nev,
I am also noticing that for cases where page views are logged, the custom properties are not being set.  Below is the way I am setting the properties.  Did this change for version 2 as well?  Also, I know you mentioned before that there is an issue with IE7 logging page views.  Is there a workaround that can be done in the meantime until we get all of our pages converted?
aisdk.addTelemetryInitializer(function (envelope) {var tags = envelope.tags;if (tags) {tags['ai.user.id'] = "t.sorial";}var data = envelope.data || {};var telemetryItem = data.baseData || {};if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {telemetryItem.name = "_Matt-3/Setup/Subject Binder/Subject ID Format";envelope.tags['ai.operation.name'] = telemetryItem.name;}telemetryItem.properties = telemetryItem.properties || {};telemetryItem.properties["portal"] = "_Matt-3";telemetryItem.properties["area"] = "Setup";telemetryItem.properties["zone"] = "Subject Binder";telemetryItem.properties["section"] = "Subject ID Format";});var serverId = "d871d213250e664fb58560a247513d88";aisdk.properties.context.telemetryTrace.traceID  = serverId;});
Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Thursday, March 26, 2020 8:50 AM
To: 'microsoft/ApplicationInsights-JS'<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Nev,
I switched version to 2.4.4 and the browser no longer locks.  So, that tells me that something is going with version 2.5.x.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev <notifications<EMAIL_ADDRESS>Sent: Wednesday, March 25, 2020 5:39 PM
To: microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy <t.sorial<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Another question, when the browser locks up is IE doing a bunch of CPU usage?
I just checked locally with IE11 running in IE7 compat mode and it's working fine.
Even when the previous version had the issue I found the browser itself didn't lock up it just burnt ~15% CPU and the debugger pause still worked (at least for me)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604101670, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUPILOC4ZX7EHBMM3F3RJJ2XFANCNFSM4J4QWRFQ.

Hi Tim,
I'll try and answer your question, if I miss one just ping me again on it, but first a couple of questions from me.

Was it downloading v 2.5.3 and still locking up with that version (as opposed to 2.5.2)
What is the runtime environment XP, 32 or 64 and assuming native IE 7 (not IE 11 running in emulation mode -- as I can no longer repro in this mode)? I want to spend a little bit of time trying to repro to find the issue if I can as we don't have the infrastructure to create hotfixes from older builds and the changes introduced in 2.5 will be further extended so I don't want to compound any issues.

Now to answer the questions
Page Views

Assuming you are talking about local SPA (updating the url with '#' arguments) then there is no automatic solution as IE 7/8 doesn't support the onhashchange event. Your only option here is to add manual event firing (perhaps with just track) when you are manually changing the page view (in your controller / route manager -- depending on your JS framework).

Custom Properties

As I'm not familiar with the locations in v1, I'm just looking at the current code and looking at the ITelemetryItem interface the answer looks like - yes, custom properties look like they are  now on the data field (https://github.com/microsoft/ApplicationInsights-JS/blob/master/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts)

Hi Nev,
It locks up in version 2.5.2 as well.   2.5.2 throws long run script error.   For 2.5.3,  the browser just hangs on loading page and doesn’t respond.
I am running IE11 with forced compatibility to IE7.  Runtime environment is 64 bit, windows 10.
Do you have an example of how custom property can be set with the new version?  I am trying to make sure I have the syntax correct.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 1:33 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Hi Tim,
I'll try and answer your question, if I miss one just ping me again on it, but first a couple of questions from me.

Was it downloading v 2.5.3 and still locking up with that version (as opposed to 2.5.2)
What is the runtime environment XP, 32 or 64 and assuming native IE 7 (not IE 11 running in emulation mode -- as I can no longer repro in this mode)? I want to spend a little bit of time trying to repro to find the issue if I can as we don't have the infrastructure to create hotfixes from older builds and the changes introduced in 2.5 will be further extended so I don't want to compound any issues.

Now to answer the questions
Page Views

Assuming you are talking about local SPA (updating the url with '#' arguments) then there is no automatic solution as IE 7/8 doesn't support the onhashchange event. Your only option here is to add manual event firing (perhaps with just track) when you are manually changing the page view (in your controller / route manager -- depending on your JS framework).

Custom Properties

As I'm not familiar with the locations in v1, I'm just looking at the current code and looking at the ITelemetryItem interface the answer looks like - yes, custom properties look like they are now on the data field (https://github.com/microsoft/ApplicationInsights-JS/blob/master/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604569181, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUOOL5OEN5T6HSPDJBDRJOGTFANCNFSM4J4QWRFQ.

Do you think this will help with hashchange event issue?
https://stackoverflow.com/questions/6833650/binding-hashchange-event-in-ie7-issue
Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Thursday, March 26, 2020 2:34 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Author<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Hi Nev,
It locks up in version 2.5.2 as well.   2.5.2 throws long run script error.   For 2.5.3,  the browser just hangs on loading page and doesn’t respond.
I am running IE11 with forced compatibility to IE7.  Runtime environment is 64 bit, windows 10.
Do you have an example of how custom property can be set with the new version?  I am trying to make sure I have the syntax correct.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev <notifications<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 1:33 PM
To: microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy <t.sorial<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Hi Tim,
I'll try and answer your question, if I miss one just ping me again on it, but first a couple of questions from me.

Was it downloading v 2.5.3 and still locking up with that version (as opposed to 2.5.2)
What is the runtime environment XP, 32 or 64 and assuming native IE 7 (not IE 11 running in emulation mode -- as I can no longer repro in this mode)? I want to spend a little bit of time trying to repro to find the issue if I can as we don't have the infrastructure to create hotfixes from older builds and the changes introduced in 2.5 will be further extended so I don't want to compound any issues.

Now to answer the questions
Page Views

Assuming you are talking about local SPA (updating the url with '#' arguments) then there is no automatic solution as IE 7/8 doesn't support the onhashchange event. Your only option here is to add manual event firing (perhaps with just track) when you are manually changing the page view (in your controller / route manager -- depending on your JS framework).

Custom Properties

As I'm not familiar with the locations in v1, I'm just looking at the current code and looking at the ITelemetryItem interface the answer looks like - yes, custom properties look like they are now on the data field (https://github.com/microsoft/ApplicationInsights-JS/blob/master/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604569181, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUOOL5OEN5T6HSPDJBDRJOGTFANCNFSM4J4QWRFQ.

Also, currently none of our pages use # argument.  Is this something that is used by app insights that requires support for onhashchangeevent?
Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Thursday, March 26, 2020 3:10 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Author<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Do you think this will help with hashchange event issue?
https://stackoverflow.com/questions/6833650/binding-hashchange-event-in-ie7-issue
Thanks,
Tim Sorial
Sr. Software Engineer
From: Sorial, Timothy
Sent: Thursday, March 26, 2020 2:34 PM
To: microsoft/ApplicationInsights-JS <reply<EMAIL_ADDRESS>microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Author <author<EMAIL_ADDRESS>Subject: RE: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
Hi Nev,
It locks up in version 2.5.2 as well.   2.5.2 throws long run script error.   For 2.5.3,  the browser just hangs on loading page and doesn’t respond.
I am running IE11 with forced compatibility to IE7.  Runtime environment is 64 bit, windows 10.
Do you have an example of how custom property can be set with the new version?  I am trying to make sure I have the syntax correct.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev <notifications<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 1:33 PM
To: microsoft/ApplicationInsights-JS <ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy <t.sorial<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Hi Tim,
I'll try and answer your question, if I miss one just ping me again on it, but first a couple of questions from me.

Was it downloading v 2.5.3 and still locking up with that version (as opposed to 2.5.2)
What is the runtime environment XP, 32 or 64 and assuming native IE 7 (not IE 11 running in emulation mode -- as I can no longer repro in this mode)? I want to spend a little bit of time trying to repro to find the issue if I can as we don't have the infrastructure to create hotfixes from older builds and the changes introduced in 2.5 will be further extended so I don't want to compound any issues.

Now to answer the questions
Page Views

Assuming you are talking about local SPA (updating the url with '#' arguments) then there is no automatic solution as IE 7/8 doesn't support the onhashchange event. Your only option here is to add manual event firing (perhaps with just track) when you are manually changing the page view (in your controller / route manager -- depending on your JS framework).

Custom Properties

As I'm not familiar with the locations in v1, I'm just looking at the current code and looking at the ITelemetryItem interface the answer looks like - yes, custom properties look like they are now on the data field (https://github.com/microsoft/ApplicationInsights-JS/blob/master/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ITelemetryItem.ts)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604569181, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUOOL5OEN5T6HSPDJBDRJOGTFANCNFSM4J4QWRFQ.

It locks up in version 2.5.2 as well.   2.5.2 throws long run script error.
For 2.5.3,  the browser just hangs on loading page and doesn’t respond.
I am running IE11 with forced compatibility to IE7.  Runtime environment is 64 bit, windows 10.

This is the same environment I was using and while 2.5.2 gave the long run script error (which is how I found and fixed it), I'm not seeing the same issue with 2.5.3 (i.e. it's working for me)
I'm wondering whether this is related to the JSON poly fill you are using, can you provide a link to it (I don't remember which one I'm using), I've uploaded my simple test page to github
IE7-1142.20200326.zip

Do you think this will help with hashchange event issue?
https://stackoverflow.com/questions/6833650/binding-hashchange-event-in-ie7-issue

Yes, but you will need to add you own code to the section that does the click and change your code to click this (or these) links. As App Insights won't be able to hook all of your clicks and it won't automatically hook to this link.

Do you have an example of how custom property can be set with the new version?  I am trying to make sure I have the syntax correct.

Also, currently none of our pages use # argument.  Is this something that is used by app insights that requires support for onhashchangeevent?

So your app is a post back (each page refresh comes from the server)?
If so then you don't need the hashchangeevent (hashchangeevent is a standard practice for a SPA (Single Page Application) to effectively render local page changes in javascript and support browser back / fwd navigation.
Based on a post back (or Server Side rendered page) model then the standard page view event should work it is for my sample in my previous post (although in IE7 mode the XDomainRequest fails because the web page is file:// while the telemetry is https://, if hosted on a https:// link it would work).

This is what I am using for JSON polyfil.   https://github.com/douglascrockford/JSON-js
Also, when you get a chance please provide sample code to set telemetry custom property.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 3:39 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
It locks up in version 2.5.2 as well. 2.5.2 throws long run script error.
For 2.5.3, the browser just hangs on loading page and doesn’t respond.
I am running IE11 with forced compatibility to IE7. Runtime environment is 64 bit, windows 10.

This is the same environment I was using and while 2.5.2 gave the long run script error (which is how I found and fixed it), I'm not seeing the same issue with 2.5.3 (i.e. it's working for me)
I'm wondering whether this is related to the JSON poly fill you are using, can you provide a link to it (I don't remember which one I'm using), I've uploaded my simple test page to github
IE7-1142.20200326.ziphttps://github.com/microsoft/ApplicationInsights-JS/files/4389544/IE7-1142.20200326.zip

Do you think this will help with hashchange event issue?
https://stackoverflow.com/questions/6833650/binding-hashchange-event-in-ie7-issue

Yes, but you will need to add you own code to the section that does the click and change your code to click this (or these) links. As App Insights won't be able to hook all of your clicks and it won't automatically hook to this link.

Do you have an example of how custom property can be set with the new version? I am trying to make sure I have the syntax correct.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604643264, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUPIJOMCQLFBIWOAYNTRJOVM3ANCNFSM4J4QWRFQ.

I updated my sample for that (sorry forgot to mention in my response).

There are some typo's in the uploaded sample change telemetryItem to data for this section in the telemetryInitializer
if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {
  data.name = "123Emily/Setup/Rule/Conditional Reporting & Alert";
  envelope.tags['ai.operation.name'] = data.name;
}

And using this polyfill https://github.com/douglascrockford/JSON-js with my sample is working (no IE7 lockups) when running in IE7 emulation and v2.5.3. So the lockup doesn't appear to be App Insights related... I'm still spinning up a couple of XP Vm's (just having issues getting them online as XP for some strange reason doesn't have the Hyper-V network drivers :-) )

But, how come  no lockups occur with  version 2.4.4?  For polyfill, I am using following minified version:
Json.js
if (typeof JSON !== "object") { JSON = {} } (function () { "use strict"; var rx_one = /^[],:{}\s]$/; var rx_two = /\(?:["\/bfnrt]|u[0-9a-fA-F]{4})/g; var rx_three = /"[^"\\n\r]"|true|false|null|-?\d+(?:.\d*)?(?:[eE][+-]?\d+)?/g; var rx_four = /(?:^|:|,)(?:\s*[)+/g; var rx_escapable = /[\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; var rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; function f(n) { return n < 10 ? "0" + n : n } function this_value() { return this.valueOf() } if (typeof Date.prototype.toJSON !== "function") { Date.prototype.toJSON = function () { return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null }; Boolean.prototype.toJSON = this_value; Number.prototype.toJSON = this_value; String.prototype.toJSON = this_value } var gap; var indent; var meta; var rep; function quote(string) { rx_escapable.lastIndex = 0; return rx_escapable.test(string) ? '"' + string.replace(rx_escapable, function (a) { var c = meta[a]; return typeof c === "string" ? c : "\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + string + '"' } function str(key, holder) { var i; var k; var v; var length; var mind = gap; var partial; var value = holder[key]; if (value && typeof value === "object" && typeof value.toJSON === "function") { value = value.toJSON(key) } if (typeof rep === "function") { value = rep.call(holder, key, value) } switch (typeof value) { case "string": return quote(value); case "number": return isFinite(value) ? String(value) : "null"; case "boolean": case "null": return String(value); case "object": if (!value) { return "null" } gap += indent; partial = []; if (Object.prototype.toString.apply(value) === "[object Array]") { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || "null" } v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]"; gap = mind; return v } if (rep && typeof rep === "object") { length = rep.length; for (i = 0; i < length; i += 1) { if (typeof rep[i] === "string") { k = rep[i]; v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } else { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ": " : ":") + v) } } } } v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}"; gap = mind; return v } } if (typeof JSON.stringify !== "function") { meta = { "\b": "\b", "\t": "\t", "\n": "\n", "\f": "\f", "\r": "\r", '"': '\"', "\": "\\" }; JSON.stringify = function (value, replacer, space) { var i; gap = ""; indent = ""; if (typeof space === "number") { for (i = 0; i < space; i += 1) { indent += " " } } else if (typeof space === "string") { indent = space } rep = replacer; if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) { throw new Error("JSON.stringify") } return str("", { "": value }) } } if (typeof JSON.parse !== "function") { JSON.parse = function (text, reviver) { var j; function walk(holder, key) { var k; var v; var value = holder[key]; if (value && typeof value === "object") { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v } else { delete value[k] } } } } return reviver.call(holder, key, value) } text = String(text); rx_dangerous.lastIndex = 0; if (rx_dangerous.test(text)) { text = text.replace(rx_dangerous, function (a) { return "\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) } if (rx_one.test(text.replace(rx_two, "@").replace(rx_three, "]").replace(rx_four, ""))) { j = eval("(" + text + ")"); return typeof reviver === "function" ? walk({ "": j }, "") : j } throw new SyntaxError("JSON.parse") } } })();
cycle.js
if (typeof JSON.decycle !== "function") { JSON.decycle = function decycle(object, replacer) { "use strict"; var objects = new WeakMap; return function derez(value, path) { var old_path; var nu; if (replacer !== undefined) { value = replacer(value) } if (typeof value === "object" && value !== null && !(value instanceof Boolean) && !(value instanceof Date) && !(value instanceof Number) && !(value instanceof RegExp) && !(value instanceof String)) { old_path = objects.get(value); if (old_path !== undefined) { return { $ref: old_path } } objects.set(value, path); if (Array.isArray(value)) { nu = []; value.forEach(function (element, i) { nu[i] = derez(element, path + "[" + i + "]") }) } else { nu = {}; Object.keys(value).forEach(function (name) { nu[name] = derez(value[name], path + "[" + JSON.stringify(name) + "]") }) } return nu } return value }(object, "$") } } if (typeof JSON.retrocycle !== "function") { JSON.retrocycle = function retrocycle($) { "use strict"; var px = /^$(?:[(?:\d+|"(?:[^\"\u0000-\u001f]|\(?:[\"/bfnrt]|u[0-9a-zA-Z]{4}))")])$/; (function rez(value) { if (value && typeof value === "object") { if (Array.isArray(value)) { value.forEach(function (element, i) { if (typeof element === "object" && element !== null) { var path = element.$ref; if (typeof path === "string" && px.test(path)) { value[i] = eval(path) } else { rez(element) } } }) } else { Object.keys(value).forEach(function (name) { var item = value[name]; if (typeof item === "object" && item !== null) { var path = item.$ref; if (typeof path === "string" && px.test(path)) { value[name] = eval(path) } else { rez(item) } } }) } } })($); return $ } }
Regarding custom properties: If I were to want property called section added it would be done this way: data.section = “test”;
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 3:53 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
There are some typo's in the uploaded sample change telemetryItem to data for this section in the telemetryInitializer
if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {
data.name = "123Emily/Setup/Rule/Conditional Reporting & Alert";
envelope.tags['ai.operation.name'] = data.name;
}
And using this polyfill https://github.com/douglascrockford/JSON-js with my sample is working (no IE7 lockups) when running in IE7 emulation and v2.5.3. So the lockup doesn't appear to be App Insights related... I'm still spinning up a couple of XP Vm's (just having issues getting them online as XP for some strange reason doesn't have the Hyper-V network drivers :-) )
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604650227, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUMLRHMW4AOFCBZ66CTRJOXBFANCNFSM4J4QWRFQ.

I only used the json.js as the cycle.js contains several JS references that are not supported in IE7, specifically Object.keys() and value.forEach() where value is an array.
As to why it doesn't lockup with 2.4.4 -- I don't have any answer to that as I can't repro any lockup with 2.5.3. Does my example still lockup on your computer?
For the data.section = "test" yes this should work, but if you want an object you will need to create the object first. So something like
data.section = "test";
data.props = {};
data.props.a = 1;
data.props.b = "b";
etc.

Thanks Nev. I will try removing cycle.js and see if it helps.  I will give you an update tomorrow.  If I continue to have issues, are you open to having a Skype session?
Thanks,
Tim
Sent from my iPhone
On Mar 26, 2020, at 5:21 PM, Nev <notifications<EMAIL_ADDRESS>wrote:
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
I only used the json.js as the cycle.js contains several JS references that are not supported in IE7, specifically Object.keys() and value.forEach() where value is an array.
As to why it doesn't lockup with 2.4.4 -- I don't have any answer to that as I can't repro any lockup with 2.5.3. Does my example still lockup on your computer?
For the data.section = "test" yes this should work, but if you want an object you will need to create the object first. So something like
data.section = "test";
data.props = {};
data.props.a = 1;
data.props.b = "b";
etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604693239, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUKC3G3PSTHBVPWPN63RJPBNJANCNFSM4J4QWRFQ.

Yep, if this is continuing that is probably the easiest path forward. Skype for business or teams is probably easier, I should be able setup a teams invite if you don't have an installation.

I am still having issues.  Are you available today or Monday?  I use Teams so we can use that if you prefer.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 8:05 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
Yep, if this is continuing that is probably the easiest path forward. Skype for business or teams is probably easier, I should be able setup a teams invite if you don't have an installation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604747785, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUOWKD3OMAZEVH2VAM3RJPUSRANCNFSM4J4QWRFQ.

I couldn’t find good example to set telemetryitem name.  If I set data.name, it is adds name as custom property.
Thanks,
Tim Sorial
Sr. Software Engineer
From: Nev<EMAIL_ADDRESS>Sent: Thursday, March 26, 2020 3:53 PM
To: microsoft/ApplicationInsights-JS<EMAIL_ADDRESS>Cc: Sorial, Timothy<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [microsoft/ApplicationInsights-JS] [BUG]AppInsights not working in IE7 (#1142)
This message was sent from outside the company. Please use caution when opening attachments or clicking any links in the email.
There are some typo's in the uploaded sample change telemetryItem to data for this section in the telemetryInitializer
if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {
data.name = "123Emily/Setup/Rule/Conditional Reporting & Alert";
envelope.tags['ai.operation.name'] = data.name;
}
And using this polyfill https://github.com/douglascrockford/JSON-js with my sample is working (no IE7 lockups) when running in IE7 emulation and v2.5.3. So the lockup doesn't appear to be App Insights related... I'm still spinning up a couple of XP Vm's (just having issues getting them online as XP for some strange reason doesn't have the Hyper-V network drivers :-) )
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-JS/issues/1142#issuecomment-604650227, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOCLWUMLRHMW4AOFCBZ66CTRJOXBFANCNFSM4J4QWRFQ.

Hi Tim,
I'm not sure exactly which "name" field (as there are multiple), but based on the telemetry initializer code you have I dug into the v2 code and tests and I believe the following is the solution / change. There are a bunch of other options as well where it can pick it up from the document.title or the baseData.target.
if (envelope.name == Microsoft.ApplicationInsights.Telemetry.PageView.envelopeType) {
  envelope.baseData.name = "123Emily/Setup/Rule/Conditional Reporting & Alert";
  envelope.tags['ai.operation.name'] = data.name;
}

I tried looking you up on teams (using the email in this thread) but it looks like either thats not you teams id or your org has disabled external linking (setting in the admin portal of Office 365), so I'll send you an email with my details and we can then figure out a time.
Cheers
Nev

Hi Nev,
i read complete thread about appinsights in IE7 but i could not find any code which is compatible with IE7.
Are you able to find the solution for this issue?

I'm still investigating / trying to repro the issue that Tim is seeing on version 2.5.3 vs 2.4.4. In the short term Tim is using v 2.4.4 at least until I can repro / track down the issue.
For IE7 to work you will need to use a JSON Polyfill and the current v2 should work, one of the things that I did find while on a Teams call with him was that while with my Simple Sample https://github.com/microsoft/ApplicationInsights-JS/files/4389544/IE7-1142.20200326.zip I was using the F12 Dev console with the Emulate IE7 while Tim's app requires the returning the meta tag forcing mode=IE7, which does seem to behave differently.
In terms of the "could not find any code that is compatible with IE7" v2 should be as part of packaging into NPM and uploading to the CDN the rollup-es3 tools are using to rewrite and validate that we don't use non-IE8 (ES3) compatible javascript.


Unexpected error thrown in a working gurnt file

Recently one of my colleague clone the working branch and tried to run it.. but unexpectedly when grunt is loading this error throws
$ grunt serve
Loading "connect_proxy.js" tasks...ERROR

TypeError: Cannot read property 'prototype' of undefined

Running "serve" task
Warning: Task "configureProxies" not found. Use --force to continue.
Aborted due to warnings.
but at that time my clone was working fine and I did not have any changes to the grunt, to understand the status I removed my  node_modules folder and  run the command
npm install   within the project folder and after that I'm seeing the same issue
Is this a bug ? I'm having latest node installed

I used yo to create a angular project yesteday and it worked and still work.
I tried today and i've the same problem as this issue.
So it could be that something got updated over the night and breaks the compatibility.

I noticed that the one which works has<EMAIL_ADDRESS>while the other<EMAIL_ADDRESS>can be this?

Same issue here, same clues about eventemitter

@esseti  Indeed that is the issue... thanks man issue fixed :+1: ,  hopefully this will fixed soon

@imalhasaranga I would leave this open until it is actually fixed.
The real solution for this project would be to update the http-proxy dependency to the latest version which has eventemitter pinned.

@ruiaraujo I will definitely agree with you, just check this out: https://github.com/nodejitsu/node-http-proxy/blob/v1.1.6/package.json#L20

@imalhasaranga please reopen issue, workaround found, but not the real solution.

Sorry guys..

I have written a PR to fix the issue.
In the meanwhile, just use the fork with patch applied since it may take a while until it is merged.
Just place this line on your package.json
"grunt-connect-proxy": "git://github.com/ruiaraujo/grunt-connect-proxy#patch-1",

@ruiaraujo Thanks!

@ruiaraujo After skimming, I think this repo is probably dead...  Anyone willing to fork/rename/push to npm?

For the interested: the issue is that EventEmitter3 exports itself like so:
module.exports = EventEmitter;

And it is required in http-proxy as:
EE3     = require('eventemitter3').EventEmitter,

There exists no 'EventEmitter' key as EventEmitter it is the 'export' itself so that line should be:
EE3     = require('eventemitter3'),

@MrHus is right. And for the even more interested, this seems to be the reason behind why things broke yesterday:

node-http-proxy declared its dependency (until version 1.7.2) to EventEmitter3 with an asterisk instead a semantic version pattern s. commit
Everything worked without any problems until yesterday when EventEmitter3 pushed to version 1.0.0 with the breaking changes mentioned by @MrHus s. commit
node-http-proxy fixed their package.json to pattern 0.x.x with version 1.7.2
Therefore the fix for grunt-connect-proxy would be to push the dependency for http-proxy from ~1.1.4 to ~1.7.2

sorry i haven't a lot of time to work on this repo. if anyone wants admin access, let me know and i'll assign it

@drewzboto could you update the version to 0.1.12 and update the sources on npm as well?

we have a couple of nice PR easy to merge and then we can release.
unless someone else has time to release now.

@matthieubulte I think we should tag 0.2.0 and release it ASAP since it is breaking people's builds.

@ruiaraujo :+1:

@ruiaraujo I added you as a npm collaborator incase you wanted to push immediately.

Sounds like @matthieubulte prefers to wait until #76 is merged though before bumping the version

@drewzboto Thanks. I will check that PR since I have a setup where it happens a lot.

@ruiaraujo Many thanks for that fix.

@ruiaraujo thanks :+1: :beers:

@fidel-karsto I will send you the address for the beer. Augustiner bitte! ;)

@ruiaraujo excellent choice! ;)

@ruiaraujo Thanks :+1:. Great job!

@esseti +1, your solution works. Is this already fixed in newer releases? It is strange that one PC(running fedora 16) among 4 had this problem.

@esseti thatnks, it worked. :)

@esseti thanks for the solution!

it should have been fixed.


LSTM policy

Great work on the implementation!
Very comprehensible and straightforward implementation.
It seems you're performing two forward steps: 1) to choose an action (main.py, line 113), 2) to evaluate the actions (main.py, line 146).
Why not save the values, log_probs and entropy in while selecting actions (as you did in a3c)?
Are there computational benefits to performing these for all processes at once?

In a3c code all computations are performed on CPU. But here I have a GPU option. At some point I compared these 2 strategies and it was faster to compute forward pass for each step and then concatenate, do extra forward pass and then a backward pass on this "large batch".

Interesting. It makes sense, though the current implementation makes it more difficult to implement a recurrent policy.
Though I guess whatever way to "batchify" a recurrent policy won't be pleasant in this case (considering that you need to reset the hidden vectors for different envs at different time steps).

I agree. It's more difficult to implement a recurrent policy. But it's just marginally more difficult.
I was going to add a recurrent policy in the second half of November anyway. But I can provide you all necessary pointers so you can do it yourself.

No need for recurrent at the moment.
I was thinking after n steps to split the matrix in two where the game ends, then use the padded sequence and run them both.
What's your plan?

The plan was no reshape them here but send to the model unreshaped. So the FF model reshapes them to batchify and an RNN policy will just unroll it.
https://github.com/ikostrikov/pytorch-a2c-ppo-acktr/blob/master/main.py#L146
And then we will also need to "duplicate" RNN states. But it should be relatively simple. We just need to store temporary states in first loop and overwrite in the second.

Though how do you plan to zero the hidden vector of terminal states?
As I see it you can either:

Run the RNN step by step in the "num_steps" loop, zero the hiddens only for processes that reached a terminal state (in this option there's no need for the additional forward afterwards).
Split the mini-batch in two where terminal and use padded sequences. As in: Forward first part, zero needed hiddens, forward second part.

I tend towards the first option for clarity and since I don't think you'll have the speed gains you saw earlier with the recurrent policy.

I was going to implement it in the following way.

save recurrent states before the first loop;
unroll to get rewards in a standard way;
in the second forward loop retrieve the states saved in 1) and unroll again without reshaping the inputs

This way it will be just easier to reuse the same code for PPO because we can just sample rollouts for different processes in 3)

I'm going to add an LSTM policy this week. Do you know a good task to test it? In most papers they use FF policies only.

Papers on VisDoom and DeepMind Lab usually use LSTMs, though I haven't tried it myself.

Thanks! I will try these games.
At the moment, when I add LSTMs it doesn't even work on the same games.

Did you implement an LSTM module for masking the terminal states?
Or some did you do something else?
On Nov 10, 2017 2:06 AM, "Ilya Kostrikov"<EMAIL_ADDRESS>wrote:
Thanks! I will try these games.
At the moment, when I add LSTMs it doesn't even work on the same games.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/ikostrikov/pytorch-a2c-ppo-acktr/issues/15#issuecomment-343332798,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOH6zJjUMB4c5quGI3Hrn3NFnFFLmi4qks5s05N6gaJpZM4QKVYQ
.

Yes, I can push it to a new branch.

Cool. I'll give it a look when it's up.

It's in the lstm branch:
https://github.com/ikostrikov/pytorch-a2c-ppo-acktr/tree/lstm
You can run it with
python main.py --env-name "PongNoFrameskip-v4" --recurrent-policy

After fixing the initialization, the recurrent policy seems to work for a2c (working on ppo as well).
See the LSTM branch.

Very nice!
What was the problem with the orthogonal initialization? I can't see a diff to the Pytorch version.
Was it the rows < cols case?

Yes, it was rows < cols case. It was fixed in September but it's still not in the version installed with conda.

Good thing I sent a pull request :-)

any timeline on merging lstm branch into master branch?

OpenAI recently released their LSTM PPO. I'm going to derive my code from their implementation now, it it will probably take a week.

A recurrent policy is in the main branch now.

@ikostrikov
I've got a question on how LSTM can be applied to a PPO policy.
While letting agents collect data, how do you treat hx and cx outside of the model?
My assumption was that you simply treat hx and cx as experiences and store them along with their relative state, rewards, logits, for each step of a worker collecting data for updating the policy afterwards.
This is my experience buffer:
        rewards = np.zeros((self.n_workers, self.worker_steps), dtype=np.float32)
        actions = np.zeros((self.n_workers, self.worker_steps), dtype=np.int32)
        dones = np.zeros((self.n_workers, self.worker_steps), dtype=np.bool)
        vis_obs = np.zeros((self.n_workers, self.worker_steps) + Game.vis_obs_shape, dtype=np.float32)
        vec_obs = np.zeros((self.n_workers, self.worker_steps,) + Game.vec_obs_shape, dtype=np.float32)
        hx = torch.zeros((self.n_workers, self.worker_steps, 512), dtype=torch.float32, device=self.device)
        cx = torch.zeros((self.n_workers, self.worker_steps, 512), dtype=torch.float32, device=self.device)
        neg_log_pis = np.zeros((self.n_workers, self.worker_steps), dtype=np.float32)
        values = np.zeros((self.n_workers, self.worker_steps), dtype=np.float32)


Request#validate method incorrectly marked as static

Larastan Version: v0.7.15
--level used: 8
Pull request with failing test: https://gitlab.com/rijnijssel/sdxam/-/merge_requests/79

Description
Larastan (I think) marks the validate function on the Request object as static, making it impossible to use:
$request->validate([
    'name' => 'User Name',
]);

without generating errors.
Even thought on the Request class, this docblock is found:
/**
 * @method array validate(array $rules, ...$params)
 * @method array validateWithBag(string $errorBag, array $rules, ...$params)
 * @method bool hasValidSignature(bool $absolute = true)
 */

Laravel code where the issue was found
protected function validateLogin(Request $request)
{
    $request->validate([
        $this->username() => ['required', 'string'],
        'password'        => ['required', 'string'],
    ]);
}

Yes, it gives an error on the line of $request->validate(). See this MR: https://gitlab.com/rijnijssel/sdxam/-/pipelines/399430651/test_report
Dynamic call to static method Illuminate\\Http\\Request::validate().

Only on PHP 8, not on PHP 7.4.

It is mysterious. After disabling all @Xmethod static array validate I still get the error in your codebase.
BTW Pipelines are not public.

Oops, I will make pipelines public for you!

The phpstan-strict-rules emits it through DynamicCallOnStaticMethodsRule.

Ah, weird. Wouldn't a stub be a solution to this perhaps?

I hope not!
Please consider opening an issue in phpstan-strict-rules
https://github.com/phpstan/phpstan-strict-rules/issues/new

Opened https://github.com/phpstan/phpstan-strict-rules/issues/140


training code

Hello, I have read your article and I am very interested in it. So when will the training code be released? Thanks

https://github.com/htzheng/CM-GAN-Inpainting/issues/11#issuecomment-1912948699

我也想要


Update ALERTS docs for 2.0 staleness changes.

Signed-off-by: Brian Brazil<EMAIL_ADDRESS>

:+1:


libssh: 0.8.7 -> 0.8.8

Fixes CVE-2019-14889.
Release notes: https://www.libssh.org/2019/12/10/libssh-0-9-3-and-libssh-0-8-8-security-release/
Motivation for this change
#77264
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Oh, ported to both stable versions as well.