sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Workbench.aspx documentation not easy to find

Open Hikmer opened this issue 10 years ago • 16 comments

You left out the important part of setting up the workbench.aspx file of your new breakthroughs. I had to dig around to find out how to do this and the videos completely gloss this step over. Please add ALL steps to do this very complex way of doing coding...the old timer .NET guys will thank you later.

Hikmer avatar Oct 04 '16 20:10 Hikmer

There is zero reference to how to do this on a critical page, it just assumes you know how to setup the workbench

http://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/connect-to-sharepoint

Hikmer avatar Oct 04 '16 20:10 Hikmer

The steps are found here but I must have missed it OR didnt realize the significance of the setup

http://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant

Hikmer avatar Oct 04 '16 20:10 Hikmer

Finally, the unsafe option doesn't work for me. It just loops and then doesn't do anything else. I don't know where to find all these magical settings in Chrome.

Do you really plan to have developers fumble through this? I can't say that spending all day trying to figure this stuff out is very productive. None of this works as I expected.

Hikmer avatar Oct 04 '16 21:10 Hikmer

Hi Hikmer, it is unclear tome if you are still blocked or at this point it is just a documentation cleanup issue? If you are blocked, some more details of the steps you followed and what errors you see on the workbench page or the debugger console of chrome would be helpful.

manishgarg1 avatar Oct 06 '16 14:10 manishgarg1

I figured it out,  in Chrome enable chrome://flags/#allow-insecure-localhost This is not straight forward in any way shape or form.

Hikmer avatar Oct 06 '16 14:10 Hikmer

First, thanks Hikmer's comment, I got workbench.aspx shown in my chrome. I am still struggling to make workbench.aspx working on my O365 dev site in IE. It always shows "Error loading debug manifest script. (Error) Ensure loading unsafe script is allowed." Anyway, after I see workbench showing in the Chrome and added my web part, I see a spinning wheal "Loading testwp1" and the red error message below showing "Unable to load web part script resources due to: Error: Error: Unable to load script https://SP1:4321/dist/testwp-1.bundle.js Error loading https://spoppe-a.akamaihd.net/files/d9c1bae1-96eb-4eb4-b580-7dbbc8291ee5." Anyone know how to make that working. I am working on the Drop 4 spfxerror

frankchen76 avatar Oct 10 '16 22:10 frankchen76

I am getting the same problem today as well, super frustrating. I opened a ticket with support and they pretty much told me to call a third party vendor. Very disappointing, I will contact my TAM and see who can help. Microsoft needs to train their folks in support about these new features or we wont use them! workbench

Hikmer avatar Oct 17 '16 18:10 Hikmer

So, a few comments. 1st, thank you for your feedback and comments. They all help us make the framework better, and we incorporate them into future drops.

2nd, support isn't going to help you much at this point, as this is a developer only preview. As mentioned in the Questions section of the Getting Started page "If you have any questions, post them on SharePoint StackExchange. Tag your questions and comments with #spfx, #spfx-webparts, and #spfx-tooling. You can also post issues, questions, or feedback on the docs or the SharePoint Framework in our GitHub repo"

3rd, we've tried to make this better in drop 5. You can run gulp trust-dev-cert and this should make the whole thing much smoother. To uninstall you can run gulp untrust-dev-cert. The drop notes have this currently, and we'll push the update to the original wiki articles as well. We're also working on updates in the tooling that will detect this state and make it more obvious (in drop 5 we mention it in the gulp console, but it is easy to miss it)..

patmill avatar Oct 17 '16 18:10 patmill

My lack of following instructions on the Drop apparently was the issue. I am not used to these tools which makes it very difficult to understand how and when they need to be updated.

https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-Drop-5

Hikmer avatar Oct 17 '16 19:10 Hikmer

@Hikmer - lots of people are new to this, so we want to make it smoother and less error prone. You're helping us achieve that. :)

patmill avatar Oct 17 '16 20:10 patmill

There were couple things we need to know in drop 4 version,

  • the drop 4 was using the "gulp-connect" certificate for their https://localhost and https://[machine name] url.
  • Since gulp-connect was used, the IE complained the certificate name didn't match when drop4 redirect to https://[machinname] url.

So, I tried the following solution which make workbench.aspx working under my IE:

  • install the gulp-connect certificate to your Trust Root Certificate location.
  • uncheck the "warn about certificate address mismatch" option under IE options->Advanced->settings.

If you need to run that under Chrome, since there is no option to ignore the mismatch certificate, you will have to start chrome with command line like the following: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --ignore-certificate-errors

I just tried the drop 5, you don't need to make change for IE. As long as you install "gulp-connect" to your Trust Root Certificate, your IE and Chrome should be able to display workbench.aspx correctly for your tenant.

frankchen76 avatar Oct 25 '16 06:10 frankchen76

Downloading the workbench file is very confusing. I followed https://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant instructions. At first try, I right clicked the workbench.aspx link on the page and downloaded it. As it turns out this is not the file we need. I think saying go/navigate to the https://github.com/SharePoint/sp-dev-docs/blob/master/workbench.aspx would be a lot more straight-forward.

After figuring out that I need to navigate to the page and right click on the destination page, I tried that. I was not able to find a way to download the file itself. Wherever I tried, I only could download the html page itself, not the code file. I had to log in to git hub, open the documentation in the desktop application, locate and download the file from there. Could you make the instructions easier to follow? A screenshot of the git hub page with the correct location to click would help.

szaboe23 avatar Nov 10 '16 20:11 szaboe23

thanks @szaboe23. You are right I was also downloading the wrong aspx file. What I did was to copy the code in GitHub (example below) and paste it into Visual Studio Code and saved this file as workbench.aspx. Now it works !

<%@ Page Language="C#" %> <%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <wssawc:SPClientSideAppLoader AppId="8be81a5c-af38-4bb2-af97-afa3b64dfbed" runat="server"/>

Original code must be downloaded here to get hte lastest version : https://github.com/SharePoint/sp-dev-docs/blob/master/workbench.aspx

cedricneo avatar Nov 16 '16 14:11 cedricneo

I updated the backing aspx code recently to not require the library to be modified / field added. That should help. Additionally, there is a change that should start rolling across the service soon that will remove the need for a developer to create the page in the first place.

Thanks for the continued feedback.

patmill avatar Nov 17 '16 17:11 patmill

Tutorials have been updated to drop 6 level with additional instructions and steps to get started. Those cover needed steps for the cert setup etc. Workbench is now automatically also available from the SharePoint Online, so there's no need to manually copy anything anymore.

Thx everyone for your input. I'll close this for now since all items should be already addressed. Feel free to let us know if you have still any issues with the drop 6 setup.

VesaJuvonen avatar Dec 22 '16 06:12 VesaJuvonen

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

msft-github-bot avatar Jan 30 '20 06:01 msft-github-bot