question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors for IE users in Japan

See original GitHub issue
  • SystemJS Version:
  • Which library are you using?
    • system.js
    • s.js
    • system-node.cjs
  • Which extras are you using?
    • AMD extra
    • Named Exports
    • Named Register
    • Transform
    • Use Default
    • Global
    • Dynamic Import Maps
  • Are you using any custom hooks?

Question

I’ve not been able to reproduce myself but we’ve noticed from our new relic browser monitoring that lots of errors are being thrown for IE users, and weirdly it’s almost only happening to users in Japan

All of these errors are being thrown from the same place:

Screenshot 2021-03-12 at 18 54 43

And the stack trace is pointing to this return statement in the systemjs library:

Screenshot 2021-03-12 at 18 56 18

For context: we’re importing systemjs into our application like so:

import 'systemjs/dist/system';
import 'systemjs/dist/extras/named-register';

and we’re using window.System.import to asynchronously load javascript

I’ve tried using a VM with windows + IE and changing the language to Japanese but still no luck reproducing.

I just wanted to reach out here in case anyone else has run into anything similar before or if you might have any ideas for what’s going on?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:10
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
guybedfordcommented, Mar 18, 2021

@billy-reilly as Joel suggests, it sounds like there might be some weird global object difference here.

Can you try replacing that line with the following code:

    return !Obejct.hasOwnProperty.call(global, p)

and let us know if you are still seeing the errors then? If so we can PR this in, but I’d want to be sure it’s the right approach first as well.

0reactions
guybedfordcommented, Jun 14, 2021

@billy-reilly there is actually a further debugging step that can be taken here, and that is to improve the diagnostic to include the property being checked and to add this property to an opt-out list:

function shouldSkipProperty (p) {
  var hasProperty;
  try {
    hasProperty = global.hasOwnProperty(p);
  }
  catch (e) {
    throw new Error('Error checking property ' + p);
  }
  return !hasProperty || !isNaN(p) && p < global.length || isIE11 && global[p] && typeof window !== 'undefined' && global[p].parent === window;
}

It would be nice to know that it is working on all versions of IE11 so I’ll leave this open in case someone else wants to try. For now SystemJS will be maintaining IE11 support, but will drop it in due course as well I’m sure at which point we could close this too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why some Japan firms can't quit Internet Explorer
Why some Japan firms can't quit Internet Explorer ... 61.11% of users in Japan were using Google Chrome on desktop computers as of...
Read more >
End of Internet Explorer era spells trouble for Japan businesses
Japan may be the country most affected by the move, as a survey in March found that 49% of companies in the Asian...
Read more >
Japan panics as Internet Explorer ends - Taipei Times
Remarks containing abusive and obscene language, personal attacks of any kind or promotion will be removed and the user banned. Final decision ...
Read more >
Japan's big 'problem' with the death of Internet Explorer
Japan's big 'problem' with the death of Internet Explorer ... A report by Nikkei reveals that a survey conducted by IT resource provider...
Read more >
Report reveals half of Japan's businesses had yet to ditch ...
IT provider Keyman's Net conducted a survey of Japanese companies earlier this year and found that many were forced to use Internet Explorer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found