Home Dashboard Directory Help
Search

VS 2013 Browser Link generated script causes jQuery reference to be broken when using RequireJS by tecktalk


Status: 

Closed
 as Fixed Help for as Fixed


8
0
Sign in
to vote
Type: Bug
ID: 793612
Opened: 7/11/2013 11:13:35 PM
Access Restriction: Public
1
Workaround(s)
view
4
User(s) can reproduce this bug

Description



From (http://stackoverflow.com/questions/17390158/how-can-i-disable-vwd-js-artery-in-vs-net-2013):

I've upgraded to VS.NET 2013, and now, every time I start to debug an ASP.NET MVC4 app in IIS, some how __vwd/js/artery is created, this script is interfering with my RequireJS setup and it crashes the jQuery reference.

Does anyone know how can i get rid of this script?

__vwd/js/artery

window.vwdTempJQuery = window.jQuery = window.$;
window.jQuery = window.$ = null;
window.vwdTempJSON = window.JSON;

*! jQuery v1.8.2 jquery.com | jquery.org/license */

.....

// Restore original jQuery references.
window.jQuery = window.$ = window.vwdTempJQuery;
window.vwdTempJQuery = null;
// Restore original JSON.
if (window.JSON !== window.vwdTempJSON)
    window.JSON = window.vwdTempJSON;

....


Maybe the following screenshot may also be useful. All the JS errors are caused by the broken reference to jQuery but the HTTP request may have useful information.

http://i.imgur.com/h3CLAKS.png

The file is also attached
Details
Sign in to post a comment.
Posted by Microsoft on 11/14/2013 at 9:53 AM
@Vlad Iliescu:

To turn off browser link, you can try the following appsettings in your web.config file:
<appsettings>
<add key="vs:EnableBrowserLink" value="false"></add>
</appsettings>

Can you please send us a sample project that is breaking your JQuery reference? This will help us with our investigation.

I used the sample project sent by Sebastian here (github.com/stefanprodan/RequireJSDotNet) and was not able to reproduce the issue with latest VS 2013 RTM.


Thank you for your feedback!

Reshmi
Posted by Vlad Iliescu on 11/14/2013 at 12:29 AM
I'm using VS 12.0.21005.1 REL and I still encounter issues with BrowserLink (mainly with it breaking jQuery). If you're not going to fix this, can you at least add an option to disable BrowserLink forever somewhere in the options?
Posted by Stefan Prodan Dev on 10/9/2013 at 1:00 AM
Hello, I've tested on Visual Studio 2013 RC and it hasn't been fix, @Microsoft please test on this project http//github.com/stefanprodan/RequireJSDotNet
Posted by Microsoft on 8/13/2013 at 1:49 PM
@Sebastiaan: This issue should be fixed in the upcoming release.

Do you have repro steps/Sample app that uses RequireJS that is broken because of BrowserLink? This will help us identify and fix the issue in the next release. Thanks!
Posted by Sebastiaan Janssen on 7/15/2013 at 4:52 AM
I have a very similar issue, also solved by disabling Artery / Browser link.

I'm installing Umbraco CMS and on the step where I need to create a password for the admin user, clicking the "Next" button gives me a javascript error:
Uncaught ReferenceError: WebForm_PostBackOptions is not defined

WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl09$ctl12", "", true, "", "", false, true)

See this forum thread as well: http://our.umbraco.org/forum/getting-started/installing-umbraco/43248-Nuget-Install-Uncaught-ReferenceError-WebForm_PostBackOptions-is-not-defined-

I created the exact same project in VS2012 and followed the same steps without error. I compared the folders and they were nearly identical which led me to believe it must be a VS problem. After finding this post I tried disabling Browser Link and that helps with the install issue.

Steps:
- File > New Project
- Select .NET Framework 4
- Search for "Web" and choose "ASP.NET Empty Web Application" (other web applications have the same problem)
- Right click the new project > Manage NuGet Packages
- Find UmbracoCMS and install it, accepting everything (also say okay to overwriting the web.config)
- When it's done, hit F5, accept the change to web.config to put it in Debug mode
- Accept License
- At database step choose SQLCE
- Then you get to the user step, enter a password and try to click "Create User".

This last step will then show the Javascript error. Again, if Browser Link is disabled in VS2013 then this step works fine.
Posted by Microsoft on 7/11/2013 at 11:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Sebastiaan Janssen on 7/15/2013 at 4:44 AM
The workaround is to disable Artery, by removing the check next to "Enable Browser Link" in the "Browser link" dropdown menu. See StackOverflow post for a screenshot.
File Name Submitted By Submitted On File Size  
vsbug.PNG 7/11/2013 69 KB