This is a migrated thread and some comments may be shown as answers.

(mono)In MAC call FiddlerApplication.Startup(8889, FiddlerCoreStartupFlags.Default) throw EntryPointNotFoundException

7 Answers 71 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
拳儿
Top achievements
Rank 1
拳儿 asked on 11 Sep 2014, 05:02 PM
the Exception info:


{System.TypeInitializationException: An exception was thrown by the type initializer for Fiddler.Proxy ---> System.EntryPointNotFoundException: GetTickCount64
  at (wrapper managed-to-native) Fiddler.Utilities:GetTickCount64 ()
  at Fiddler.Utilities.GetTickCount () [0x00000] in <filename unknown>:0 
  at Fiddler.PeriodicWorker+taskItem..ctor (Fiddler.SimpleEventHandler oTask, UInt32 iPeriod) [0x00000] in <filename unknown>:0 
  at Fiddler.PeriodicWorker.assignWork (Fiddler.SimpleEventHandler workFunction, UInt32 iMS) [0x00000] in <filename unknown>:0 
  at Fiddler.PipePool..ctor () [0x00000] in <filename unknown>:0 
  at Fiddler.Proxy..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Fiddler.FiddlerApplication.Startup (Int32 iListenPort, FiddlerCoreStartupFlags oFlags) [0x00000] in <filename unknown>:0 
Data: Count=0
HResult: -2146233087
HelpLink: (null)
InnerException: {System.EntryPointNotFoundException: GetTickCount64
  at (wrapper managed-to-native) Fiddler.Utilities:GetTickCount64 ()
  at Fiddler.Utilities.GetTickCount () [0x00000] in <filename unknown>:0 
  at Fiddler.PeriodicWorker+taskItem..ctor (Fiddler.SimpleEventHandler oTask, UInt32 iPeriod) [0x00000] in <filename unknown>:0 
  at Fiddler.PeriodicWorker.assignWork (Fiddler.SimpleEventHandler workFunction, UInt32 iMS) [0x00000] in <filename unknown>:0 
  at Fiddler.PipePool..ctor () [0x00000] in <filename unknown>:0 
  at Fiddler.Proxy..cctor () [0x00000] in <filename unknown>:0 }
Message: "An exception was thrown by the type initializer for Fiddler.Proxy"
Source: "FiddlerCore4"
StackTrace: "  at Fiddler.FiddlerApplication.Startup (Int32 iListenPort, FiddlerCoreStartupFlags oFlags) [0x00000] in <filename unknown>:0 \n  at
TargetSite: {Void Startup(Int32, Fiddler.FiddlerCoreStartupFlags)}
TypeName: "Fiddler.Proxy"
Static members: 
Non-public members: 

7 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 11 Sep 2014, 05:25 PM
Thanks for the report!

What build number of FiddlerCore are you using? Did you try to use the Windows version of FiddlerCore instead of the Mono-specific version?

The current code uses if !MONO blocks around all of the GetTickCount64 code so that it is never called on Mono.


Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
拳儿
Top achievements
Rank 1
answered on 12 Sep 2014, 01:01 AM
it's work in windows, but throw EntryPointNotFoundException in mac, version is fiddlercore 4.4.8.4, I added a compilation symbols "MONO", still throw 
0
拳儿
Top achievements
Rank 1
answered on 12 Sep 2014, 01:10 AM
This is the version of the problem,I change to FiddlerCoreMono 4.4.5.3 it's work.
4.4.8.4 it's from Xamarin Studio NUGET, There may be a problem
0
拳儿
Top achievements
Rank 1
answered on 12 Sep 2014, 01:35 AM
A new problem, I want change ReplyWithTunnel at HTTPS session, so this code:

if (oSession.HTTPMethodIs("CONNECT"))
{
oSession.oFlags["X-ReplyWithTunnel"] = "https://www.xxxxxx.xxx";//change ReplyWithTunnel
}
else if (oSession.isHTTPS)
{
.....
}

in mac safari it's not work, the safari return "can not connect proxy server", but this code work in windows



0
Eric Lawrence
Telerik team
answered on 12 Sep 2014, 04:46 PM
Interesting... I'm not sure why Xamarin Studio is pulling Windows-only packages, but I know very little about NuGet.

In terms of your question, more information is needed. Without you attempting to modify traffic, is your code able to see HTTPS protected traffic? If not, then the most likely explanation is that your code is not properly generating the required interception certificates. You should attach the event handlers shown in the \demo\program.cs application to watch for any error messages:

Fiddler.FiddlerApplication.OnNotification += delegate(object sender, NotificationEventArgs oNEA) { Console.WriteLine("** NotifyUser: " + oNEA.NotifyString); };
Fiddler.FiddlerApplication.Log.OnLogString += delegate(object sender, LogEventArgs oLEA) { Console.WriteLine("** LogString: " + oLEA.LogString); };



Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
拳儿
Top achievements
Rank 1
answered on 14 Sep 2014, 04:33 AM
I load references from http://ericlawrence.com/dl/monofiddlercore_2453.zip,
BCMakeCert.dll 2.0.3.0
CertMaker.dll 2.4.5.0
FiddlerCore.dll 4.4.5.3

create cert code:

if (!Fiddler.CertMaker.createRootCert())
throw new InvalidOperationException("createRootCert failed");
if (!Fiddler.CertMaker.trustRootCert())
throw new InvalidOperationException("trustRootCert failed");

console:

** LogString: fiddler.network.availability.change> Network Available: True
** LogString: NetworkAddressChanged.
** LogString: Fiddler ICertificateProvider v2.4.5.0 loaded.
fiddler.certmaker.bc.Debug: False
Thread finished:  #111
** LogString: Fiddler.BCCertMaker> Failed to create certificate for localhost: Improperly protected user's key pairs in '/Users/xxx/.config/.mono/keypairs'.
  at Mono.Security.Cryptography.KeyPairPersistence.get_UserPath () [0x000f2] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/Mono.Security/Mono.Security.Cryptography/KeyPairPersistence.cs:237 
  at Mono.Security.Cryptography.KeyPairPersistence.get_Filename () [0x0007b] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/Mono.Security/Mono.Security.Cryptography/KeyPairPersistence.cs:141 
  at Mono.Security.Cryptography.KeyPairPersistence.Load () [0x00000] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/Mono.Security/Mono.Security.Cryptography/KeyPairPersistence.cs:167 
  at System.Security.Cryptography.RSACryptoServiceProvider.Common (System.Security.Cryptography.CspParameters p) [0x0000c] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:113 
  at System.Security.Cryptography.RSACryptoServiceProvider..ctor (Int32 dwKeySize, System.Security.Cryptography.CspParameters parameters) [0x00023] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:85 
  at System.Security.Cryptography.RSACryptoServiceProvider..ctor (System.Security.Cryptography.CspParameters parameters) [0x00000] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:68 
  at CertMaker.BCCertMaker.ConvertBCPrivateKeyToDotNet (Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters bcPVK, System.String sKeyName) [0x00000] in <filename unknown>:0 
  at CertMaker.BCCertMaker.CreateCertificateFromCA (System.String sCN, Org.BouncyCastle.X509.X509Certificate caCert, Org.BouncyCastle.Crypto.AsymmetricKeyParameter caKey) [0x00000] in <filename unknown>:0 
  at CertMaker.BCCertMaker.MakeNewCert (System.String sHostname) [0x00000] in <filename unknown>:0 



in windows it's work,in mac it's not work, how create cert and trust?

0
Eric Lawrence
Telerik team
answered on 15 Sep 2014, 09:26 PM
Hi,

Unfortunately, the exception shown here is coming from Mono; I cannot reproduce this problem on any of my machines, so I'm afraid you'll either need to research or talk to the Mono team about how to address the problem.

Improperly protected user's key pairs in '/Users/xxx/.config/.mono/keypairs'.
  at Mono.Security.Cryptography.KeyPairPersistence.get_UserPath () [0x000f2] in /Volumes/build-root-ramdisk/mono-3.8.0/mcs/class/Mono.Security/Mono.Security.Cryptography/KeyPairPersistence.cs:237
 

My assumption is that this error message is trying to say that the access control list on the "keypairs" file isn't secure (e.g. allowing other users to read it, perhaps). But I have never encountered this problem and don't know how to fix it.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
FiddlerCore
Asked by
拳儿
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
拳儿
Top achievements
Rank 1
Share this question
or