-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot get storage-blob library to work in Angular 7 application using IE 11 #9702
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Unfortunately We have some guide to work around this when bundling: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-blob/README.md#special-bundling-notes-for-ie11. Could you please have a look? Does Angular run a particular bundler behind the scenes? |
Another question: is there a browserslist file where you can enable the support for IE? |
I have previously taken the steps to make my app work in IE 11. I also use the MSAL library which requires steps to make it run in IE 11. I believe the bundler in Angular is webpack. Here is my browserslist: And here are my compiler options to produce ES5: |
I am confused. Angular uses class extensively. |
I suspect that when bundling, Angular does not touch vendor libraries by default. I created a test project that shows how to make storage blob library to work in IE 11 using Webpack + Babel. Not sure yet how easy it would be to customize Angular to integrate this. |
I did some search on the Internet, and |
I was looking at the code in the debugger and I noticed that it appears that I am getting modules from the wrong distribution. I should be getting the version from dist not dist-esm. I had a similar problem early on using the storage-blob library, see #7296. You helped me with that one. // "./node_modules/@azure/core-auth/dist-esm/src/azureKeyCredential.js": "use strict";
/***/ }), |
The problem in #7296 was not dist-esm v.s. dist, but because we didn't have a browser replacement for In this case, |
This information helps a lot. I am wondering if this is similar to the problem that MSAL had at one point. I believe they provided a library compatible with ES5. I don't remember all of the details. I did find this https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/868/files. I will look into the transpiling options. Is it possible for you to provide an ES5/IE11 compatible version of this library like MSAL did? |
I remembered some of the details of the problem with MSAL. It would not work with IE 11 so I had to download the source code and added that code to my project to compile it into ES5. A few months later they updated MSAL and I was able to consume their library without any problems with IE 11. I removed the code and installed the new library using npm. |
We have fixed @azure/core-auth, but we don't own @opentelemetry/api though. The issue is tracked at open-telemetry/opentelemetry-js#902 |
To clarify the fix to @azure/core-auth has not been released yet but will be soon. |
@jeremymeng, Now that the fix to |
We are still blocked by open-telemetry/opentelemetry-js#902. I think it is still useful to have this as a tracking issue. Not sure how it would impact out issue status reporting though. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Removing the Either we wait for OT to fix this and then we update our dependency |
The OpenTelemetry issue was fixed in this PR: open-telemetry/opentelemetry-js#1368 As soon as they publish a release that contains that fix, we can adopt the new version. |
Re-opening as we still need to release the storage packages with updated dependencies |
@ramya-rao-a do we have date for this package release? Really important for our project |
I believe the plan is to have a new release of storage libraries later this month. |
I think we will need to postpone the release to early September. |
@ljian3377 is there a release planned this month still? |
new versions of Storage libraries have just been released which should fix this. Closing. |
Azure Storage Blob client library for JavaScript
12.1.2
Windows 10
browser
typescript
Is the bug related to documentation in
I do not think this is a bug, but I would appreciate some assistance. I am using this package in an Angular 7 application and it works with all browsers except for IE 11; the only IE version that I need to support. I get this error:
Script1002: Syntax error
vendor.js (145800,1)
At that line in vendor.js is this:
class AzureKeyCredential {
I have run into a similar problem in the past and I had to use polyfills to fix it, but this time I have added all the polyfills and I still get the problem. Below is a copy of my polyfills.ts file. I also tried adding all the core-js\es7 polyfills and it did not help. Any assistance would be appreciated.
/**
*/
/***************************************************************************************************
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/**
**/
import 'core-js/es6/array';
import 'core-js/es7/array';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run
npm install --save classlist.js
./** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';
/**
@angular/platform-browser/animations
**/
// import 'web-animations-js'; // Run
npm install --save web-animations-js
./**
*/
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
/*
zone.js
patch for IE/Edge*/
// (window as any).__Zone_enable_cross_context_check = true;
/***************************************************************************************************
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
*/
The text was updated successfully, but these errors were encountered: