Pending Review
Last Updated: 20 Feb 2019 10:42 by ADMIN
Eric
Created on: 29 Jan 2019 21:40
Type: Bug Report
0
Microsoft.JScript.JScriptException: Type mismatch thrown when Fiddler opens in response to double-clicking a A

This only occurs when double-clicking a SAZ file from Explorer when Fiddler isn't open.

v5.0.20182.28034 for .NET 4.6.1

---------------------------
Script Failure
---------------------------
Failed to load script.
 Microsoft.JScript.JScriptException: Type mismatch

   at Microsoft.JScript.Convert.CoerceT(Object value, Type t, Boolean explicitOK)

   at Fiddler.ScriptNamespace._Startup.Startup()

   at Microsoft.JScript.Vsa.BaseVsaEngine.Run()
Microsoft.JScript.JScriptException: Type mismatch

   at Microsoft.JScript.Convert.CoerceT(Object value, Type t, Boolean explicitOK)

   at Fiddler.ScriptNamespace._Startup.Startup()

   at Microsoft.JScript.Vsa.BaseVsaEngine.Run()   at Microsoft.JScript.Vsa.BaseVsaEngine.Run()

   at Fiddler.FiddlerScript._LoadScript(String sScriptFilename, Boolean bPlaySounds) in C:\JenkinsHome\jobs\FiddlerReleaseBuild\workspace\Fiddler2\Common\Application\Scripting\Scripting.cs:line 315

   at Fiddler.ScriptBase.LoadRulesScript(Boolean bPlaySounds) in C:\JenkinsHome\jobs\FiddlerReleaseBuild\workspace\Fiddler2\Common\Application\Scripting\ScriptBase.cs:line 198
---------------------------
OK   
---------------------------

 

This reproduces even when the FiddlerScript is basically empty, like so:

import Fiddler;

class Handlers
{

}

 

 

Sadly, because Fiddler's code has been obfuscated, it's difficult to see what caused this regression.

3 comments
ADMIN
Simeon
Posted on: 20 Feb 2019 10:42
Hi Eric,

I have reproduced the script failure.

My first thought was that the Microsoft JScript cannot handle correctly the 8.3 path to Fiddler  which is passed to the script engine as a reference item. I changed the code to extend the path but the exception persisted. For now it seems there is an internal bug with the Microsoft JScript.

Regards,
Simeon
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Eric
Posted on: 05 Feb 2019 20:36

The SAZ file isn't important to the repro.

The trigger for this issue turns out to be pretty weird. In the registry, the Fiddler.ArchiveZip\Shell\Open\command the command path was the 8.3 "Short Filename" version of my profile path ("C:\users\ERICLA~1.001\..." ). If I replace this with the unshortened version ("C:\users\ERICLAW.000.001\...") the problem goes away.

It's not clear why the short filename was written to the registry during install, or why the underlying JScript.NET engine is unhappy when the short path is used.

Interestingly, you can also reproduce the problem just using Win+R and the short filename: 

    C:\users\ericla~1.001\AppData\Local\Programs\Fiddler\Fiddler.exe

Fiddler launches, but the script execution fails.   

 

 

Attached Files:
ADMIN
Simeon
Posted on: 04 Feb 2019 12:10
Hi Eric,

I could not reproduce the script failure. Could you, please, provide the saz file, your fiddler prefs and the CustomRules.js file just in case. I would also like to know if you observe the same behavior with the C# script.

Regards,
Simeon
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items