Sp-dev-docs: Gulp serve after file changes not getting reflected

Created on 28 Feb 2020  路  6Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [x] Bug

Describe the bug

Not able to make file changes and test it in workbench

Steps to reproduce

1) Edit SCSS file of a react component
2) gulp serve as usual in sharepoint environment , using ?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js appended to the page in SharePoint. (workbench.aspx works fine if we load up the webpart in there)

Also tried this ? debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js as suggested when we do a serve.

Expected behavior

Can see the changes in styles right away in the SharePoint page

Developer environment

  • OS: Windows 10
  • Framework: Node 10.15.3
  • Browser(s): Chrome, Edge Chromium
  • Tooling: VS Code, SPFx v1.10.0 (REACT component)

Just saw that the changes have no impact since today, was working fine before
Any help would be appreciated.

spfx-extensions spfx-general to-be-reviewed bug-suspected

Most helpful comment

@rabwill There is an intermediate dirty fix to this.

When you add for development the following line of code:

// 鈿狅笍 REMOVE THIS LINE WHEN SHIPPING 鈿狅笍
sessionStorage.clear();

Then everything is back to normal and the web part loads as it always has been.

鈿狅笍 THIS IS JUST A WORKAROUND - Do not try this at home 鈿狅笍

All 6 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

SCSS is unrelated to this. The issue is that when you debug with the query string you will be asked the first time:

Screenshot 2020-02-28 at 11 14 51

Then you accept and the first load everything is loading normally
Screenshot_2020-02-28_at_11_20_12
.

After you change something in your files the compilation kicks in as is should.

Screenshot 2020-02-28 at 11 24 02

On the second load the popup does not show up anymore and only the manifest is loaded but not anything else.

The workaround is to open every time a new browser tab. This issue happens in Firefox too

Also, other people had the same issue too: https://twitter.com/jimmywim/status/1233328640580112384?s=20

Yes @StfBauer noticed this in any changes as well and have updated the issue title. Previously the changes were reloaded in the same tab. Updated the browsers too, issue seen in edge as well

@rabwill There is an intermediate dirty fix to this.

When you add for development the following line of code:

// 鈿狅笍 REMOVE THIS LINE WHEN SHIPPING 鈿狅笍
sessionStorage.clear();

Then everything is back to normal and the web part loads as it always has been.

鈿狅笍 THIS IS JUST A WORKAROUND - Do not try this at home 鈿狅笍

This is happening also on SPFx 1.9.1, clearing the sessionStorage works, thx @StfBauer.
It seems that something broke in SPO and not in SPFx.

This is working now today . I am getting the prompts and changes reflected
Browser : MS edge (chromium)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrick-rodgers picture patrick-rodgers  路  3Comments

acksoft picture acksoft  路  3Comments

christianbueschi picture christianbueschi  路  3Comments

mikeparkie picture mikeparkie  路  3Comments

jonthenerd picture jonthenerd  路  3Comments