Sp-dev-docs: Intermittent load error in IE/Edge of sample web part

Created on 5 Jan 2018  Â·  11Comments  Â·  Source: SharePoint/sp-dev-docs

Category

  • [x] Bug

Observed Behavior

When loading the sample https://github.com/SharePoint/sp-dev-fx-webparts (release or debug branch) in IE/Edge you get random errors like:

[SPLoaderError.loadComponentError]:

***Failed to load component "42ad2740-3c60-49cf-971a-c44e33511b93" (SearchWebPart).

Original error: ***Failed to load entry point from component "42ad2740-3c60-49cf-971a-c44e33511b93" (SearchWebPart).

Original error: Error loading https://component-id.invalid/42ad2740-3c60-49cf-971a-c44e33511b93_0.0.1
    Unable to get property 'operation' of undefined or null reference

The sample itself seems straight forward and the issue does never show in Chrome.

I have tested with both drop 1.3 and 1.4

Related PR/comment: https://github.com/SharePoint/sp-dev-fx-webparts/pull/39

Steps to Reproduce

  • gulp serve
  • add the web part in local or SP hosted workbench
  • test in IE/Edge and keep refreshing the page - and it will fail randomly.

Most helpful comment

Awesome! That did the trick as well - you better push it soon :)

All 11 comments

Seems in Chrome it tried to load the web part three times and succeed on the last load. In IE it then intermittently fail on the third load attempt. Question is why it has to retry loading the .js multiple times.

@wobba You're right, I've checked in my environment with the latest version (1.4.0) and I'm able to reproduce this issue. Works fine with Firefox and Chrome but not in IE 11/Edge. When it fails, if I remove and add the WebPart again, then it works. Very strange...

@FranckyC I get the same error with the 1.3 release code, before my PR.

tir. 9. jan. 2018 kl. 03:19 skrev Franck Cornu notifications@github.com:

@wobba https://github.com/wobba You're right, I've checked in my
environment with the latest version (1.4.0) and I'm able to reproduce this
issue. Works fine with Firefox and Chrome but not in IE 11/Edge. When it
fails, if I remove and add the WebPart again, then it works. Very strange...

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SharePoint/sp-dev-docs/issues/1204#issuecomment-356159129,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADHoP0XKzoiq-yFwQjlKRrpDB4sT3seks5tIsy6gaJpZM4RUSbt
.

@VesaJuvonen @FranckyC I have found the culprit. If I remove the reference to import { Placeholder, IPlaceholderProps } from "@pnp/spfx-controls-react/lib/Placeholder"; in the web part it loads just fine.

Adding @estruyf as well to this, as he might have a clue. Not sure what in the placeholder which causes retry loading - could it be the app insights part?

@estruyf Commented out the app insights part in the constructor and it loads just fine - so definitely something there which has to be looked into.

@wobba we overwrite the operation property to track less information, because we are only interested in which controls are used, not where. This issue was already submitted and got fixed in the latest beta. Was waiting for test results, so if you want, can you try out the latest beta? You can install it via: npm install @pnp/spfx-controls-react@next --save

Awesome! That did the trick as well - you better push it soon :)

Thanks for the confirmation. I will release it later today!

And deployed to production at a customer :)

tir. 9. jan. 2018 kl. 09:40 skrev Elio Struyf notifications@github.com:

Thanks for the confirmation. I will release it later today!

—
You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
https://github.com/SharePoint/sp-dev-docs/issues/1204#issuecomment-356216395,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADHoEfVi1JXKzjWTsWg3LKYiXO5T9YLks5tIyXggaJpZM4RUSbt
.

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings