Comments (16)
Hi @gsmachado,
thanks for trying out DokanCloudFS, and sorry for the warnings - I'll get around to reducing them some time later.
The ReflectionTypeLoadException
is almost certainly caused by a missing .dll. Unfortunately you'll have to attach a debugger and look at the exception's LoaderExceptions
property at the time when it is thrown to find out which assembly is missing - just as the exception itself is telling you.
Did you successfully retrieve the CloudFS NuGet package and all its dependencies in your VS project?
from dokancloudfs.
@viciousviper
I'm seeing the same issue. As advised above Trying to install CloudFS from Nuget I am seeing errors saying that it could not Microsoft.IdentityModel.Clients.ActiveDirectory
After installing the above, now I get an error saying could not find a dependent version of SwiftClient(>=2.0.0)
I do see SwiftClient (2.0.0) in the references and not sure why it would think its not installed.
I've ignored the error and proceeded with the build and execution I get the same error saying Unable to load one or more of the requested types.
Sorry the error message is in Japanese.
PS C:\Users\user\desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\dokancloudfs.mounter\bin\debug> .\IgorSoft.DokanCloudFS.Mounter.exe mount
ハンドルされていない例外: System.Reflection.ReflectionTypeLoadException: 要求された型のうち 1 つまたは複数を読み込めませんでした。詳細については、LoaderExceptions プロパティを取得し
てください。
場所 System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
場所 System.Reflection.RuntimeAssembly.get_DefinedTypes()
場所 System.Composition.Hosting.ContainerConfiguration.<WithAssemblies>b__0(Assembly a)
場所 System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
場所 System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable`1 types, AttributedModelProvider attributeContext)
場所 System.Composition.Hosting.ContainerConfiguration.CreateContainer()
場所 IgorSoft.DokanCloudFS.CompositionInitializer.InitializeHost(IEnumerable`1 assemblies) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloud
FS\CompositionInitializer.cs:行 58
場所 IgorSoft.DokanCloudFS.CompositionInitializer.Initialize(IEnumerable`1 assemblies) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloudFS\C
ompositionInitializer.cs:行 113
場所 IgorSoft.DokanCloudFS.CompositionInitializer.Initialize(IEnumerable`1 assemblies, String path, String searchPattern) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\Doka
nCloudFS-1.0.9-alpha\DokanCloudFS\CompositionInitializer.cs:行 103
場所 IgorSoft.DokanCloudFS.Mounter.Program.InitializeCloudDriveFactory(String libPath) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloudFS.M
ounter\Program.cs:行 105
場所 IgorSoft.DokanCloudFS.Mounter.Program.Mount(String passPhrase, IList`1 userNames) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloudFS.M
ounter\Program.cs:行 120
場所 IgorSoft.DokanCloudFS.Mounter.Program.<>c__DisplayClass4_0.<ParseCommandLine>b__3() 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloudFS
.Mounter\Program.cs:行 83
場所 Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
場所 IgorSoft.DokanCloudFS.Mounter.Program.ParseCommandLine(String[] args) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloudFS.Mounter\Progr
am.cs:行 92
場所 IgorSoft.DokanCloudFS.Mounter.Program.Main(String[] args) 場所 C:\Users\daish\Desktop\DokanCloudFS-1.0.9-alpha\DokanCloudFS-1.0.9-alpha\DokanCloudFS.Mounter\Program.cs:行 68
from dokancloudfs.
Hi @Band-Aid,
thanks for your report. So lets sort this out.
I just cleaned the NuGet package store from my copy of DokanCloudFS and restored all references from within Visual Studio. After fixing several mismatched references - which in my case did not include SwiftClient, go figure 😞 - I was at last able to build and run the Mounter project without any TypeLoadException
.
This state of affairs has been committed as version 1.0.9.1-alpha
for both CloudFS, and DokanCloudFS.
You'd do me a big favour if you could try these versions and report back your results.
Cheers,
vv
from dokancloudfs.
Hi @viciousviper
Thanks for the quick fix!! I'm able to run it without any major problems!
Btw, I ran in to a redirect issue when connecting to Box.com
Where should I redirect the oauth call to?
I'll try to figure it out reading thru the source and update my findings.
from dokancloudfs.
Okay here are my findings.
Redirecting the oauth call to https://localhost I was able to type in my box credentials and initiate the oauth call but the callback seems to be failing.
PS C:\DokanCloudFS-1.0.9.1-alpha\DokanCloudFS.Mounter\bin\Debug> .\IgorSoft.DokanCloudFS.Mounter.exe mount
IgorSoft.CloudFS.Gateways.Box.BoxGateway <- *checking to see if the correct box dlls are being called.
2016-08-31 14:27:09.8327|WARN|IgorSoft.DokanCloudFS.Mounter.Program|Authentication failed for drive 'box@BoxUser|P:' <- *after enterring my box crendials I get an error saying Auth failed
It looks like TryAuthenticate() isn't working.
from dokancloudfs.
Ah, right, that's one of the things I haven't had time to document yet.
If you look into https://github.com/viciousviper/CloudFS/blob/master/CloudFS.Gateways.Box/OAuth/OAuthAuthenticator.cs#L42 you'll see that the Box plugin expects a redirect Uri of "https://localhost/box_login"
.
And thanks for reporting back about your build success. When you say you can run it without any major problems - are you implying that there are any non-major problems?
from dokancloudfs.
@viciousviper sorry had a typo in my last response.
meant to write I've set the redirect to "https://localhost/box_login" but still fails.
As it turns out, this line of code isn't returning the correct results.
https://github.com/viciousviper/CloudFS/blob/master/CloudFS.Gateways.Box/BoxGateway.cs#L96
Taking one step back, I believe something in the following isn't passing the accesstoken properly.
https://github.com/viciousviper/CloudFS/blob/master/CloudFS.Gateways.Box/OAuth/OAuthAuthenticator.cs#L92
I've confirmed that the code is able to get the AuthToken but isn't getting the AccessToken.
Didn't have time to troubleshoot where it's failing...
Hope this helps.
With regards about non-major problem I meant to say, despite the build warnings I was able to successfully run the executable with out any errors
from dokancloudfs.
Okay, I had sometime to sit down and trouble shoot the acessToken issue.
It's failing to get a token at
https://github.com/viciousviper/CloudFS/blob/master/CloudFS.Gateways.Box/OAuth/OAuthAuthenticator.cs#L120
With error:
System.Security.Authentication.AuthenticationException: Please retrieve an authentication code from the following Uri: https://app.box.com/api/oauth2/authorize?response_type=code&client_id=owcpxgjiwbsxs28wibzovtbl8wpoawjm&
redirect_uri=https://localhost/box_login
Also tried http for the redirectURL but no luck
I don't get what the error means. Everything looks fine. Any idea what's going on here...?
from dokancloudfs.
@viciousviper Any thoughts on how to resolve this?
from dokancloudfs.
Hi Band-Aid,
you're right, there was a problem hidden away in the Box gateway's package references.
I have to fiddle with those references to prevent some packages (Google.Apis among others) from pulling in the entire .NETCore enchilada, and apparently Box.V2 was missing System.Interactive.Async.dll which led to interactive authentication failing which in turn led to the error message you quoted above.
The message by itself basically says "There was an Exception during interactive authentication, so go ahead and pass me the ApiKey after you retrieved it from someplace else". Normally this indicates a mismatched password or an internal cloud server error - but since the code does not distinguish between different Exception types it happens for internal DokanCloudFS errors, too.
I've uploaded version 1.0.10 of both CloudFS and DokanCloudFS and successfully checked the Box gateway. I'd be interested to know if this fixes your error, too.
from dokancloudfs.
@viciousviper
Thanks for the update unfortunately it failed again...
System.IO.FileNotFoundException: Could not load file or assembly 'Nito.AsyncEx, Version=2.1.3.0, Culture=neutral, PublicKeyToken=09d695329ca273b7'、Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
ファイル名 'Nito.AsyncEx, Version=2.1.3.0, Culture=neutral, PublicKeyToken=09d695329ca273b7' です。'Nito.AsyncEx, Version=2.1.3.0, Culture=neutral, PublicKeyToken=09d695329ca
273b7'
場所 Box.V2.Services.BoxService..ctor(IRequestHandler handler)
場所 Box.V2.BoxClient..ctor(IBoxConfig boxConfig, OAuthSession authSession, String asUser, Nullable`1 suppressNotifications)
場所 IgorSoft.CloudFS.Gateways.Box.OAuth.OAuthAuthenticator.<LoginAsync>d__8.MoveNext() 場所 C:\Users\daish\Desktop\CloudFS-master\CloudFS.Gateways.Box\OAuth\OAuthAuthenti
cator.cs:行 113
--- Stack Trace ---
場所 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
場所 IgorSoft.CloudFS.Gateways.Box.BoxGateway.<RequireContextAsync>d__11.MoveNext() 場所 C:\Users\daish\Desktop\CloudFS-master\CloudFS.Gateways.Box\BoxGateway.cs:行 90
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
場所 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
場所 IgorSoft.CloudFS.Gateways.Box.BoxGateway.<TryAuthenticateAsync>d__12.MoveNext() 場所 C:\Users\daish\Desktop\CloudFS-master\CloudFS.Gateways.Box\BoxGateway.cs:行 100
After installing the latest build of Nito.AsyncEx (3.0.1) in to the Project, the dependency error resolved but now I'm seeing an authentication error
2016-10-03 10:58:48.8967|WARN|IgorSoft.DokanCloudFS.Mounter.Program|Authentication failed for drive 'box@BoxUser|P:'
I don't think it's loading logOn.Show("Box", account, authenticationUri, redirectUri); Since I don't see the Box Login window.
from dokancloudfs.
There's always one more bug :-(
Thanks for hunting this down. Please try again with Nito.AsyncEx 2.1.3. The 3.0.1 version doen't work because for some unknown reason Nito decided to leave the later version unsigned, and Box explicitely requires a signed reference.
from dokancloudfs.
@viciousviper
just tried compiling with Nito.AsyncEX 2.1.3 but still failed...
2016-10-04 13:10:23.1840|WARN|IgorSoft.DokanCloudFS.Mounter.Program|Authentication failed for drive 'box@BoxUser|P:'
Press any key to unmount drives
It's not prompting for Login Credentials. Sorry haven't had the time to debug where it's failing.
Appreciate your support!
from dokancloudfs.
@Band-Aid
I just uploaded version 1.0.10.1-beta of DokanCloudFS which now definitely includes Nito.AsyncEx 2.1.3 in all NuGet-based build configs.
After clearing all pre-existing build artifacts and rebuilding configs "Debug (NuGet-Signed)" and "Release (NuGet-Signed)" I was able to successfully mount all configured cloud drives including the Box drive.
So for this new version I can officially assign the quality label _Works on my machine (TM)_. 😃
I also changed Exception handling in all gateways in CloudFS version 1.0.10.1-beta to only regard the type AuthenticationException
as indicator of a simple failed authentication attempt and pass through all other Exception types. This should facilitate debugging in case your installation keeps failing.
Please let me know if the new version improves anything for you.
from dokancloudfs.
yay! it's finally mounted! :) thanks for your help!
from dokancloudfs.
Poooh. Glad it finally worked for you. Thanks for your patience.
from dokancloudfs.
Related Issues (20)
- Add Baidu Cloud Support HOT 10
- Openstack swift HOT 2
- nuget packages fail HOT 6
- Protect sensitive credentials and keys using Windows crypto API HOT 2
- Wasted an entire 16 hours trying to use this library HOT 2
- No gateway is registered for schema HOT 5
- build error referencing wrong version HOT 1
- Mounting Google storage bucket or folder HOT 5
- Paste or drop file action [question] HOT 5
- Add Mail.ru Cloud Support HOT 4
- Support for Java. HOT 5
- google drive not working HOT 6
- Yandex causing error HOT 1
- Webdav mount problem HOT 4
- Huge memory consumption during opening big files in Google Drive HOT 1
- Can this be used with directory mounts? HOT 8
- Google Drive ArgumentException: Trying to set a IgorSoft.CloudFS.Interface.RootName
- new content not syncing down from box
- Why true random access is not allowed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokancloudfs.