KoenZomers / KeePassOneDriveSync

Allows syncing of KeePass databases stored on OneDrive Personal, OneDrive for Business or SharePoint
Eclipse Public License 1.0
379 stars 43 forks source link

getting unhandled exception error #1

Closed lazeravik closed 9 years ago

lazeravik commented 9 years ago

here is the error that it gives me

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at KoenZomersKeePassOneDriveSync.KeePass.<SyncDatabase>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at KoenZomersKeePassOneDriveSync.KoenZomersKeePassOneDriveSyncExt.<OnKeePassDatabaseOpened>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
KeePass
    Assembly Version: 2.29.0.17893
    Win32 Version: 2.29.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/KeePass%20Password%20Safe%202/KeePass.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34250 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
GoogleSyncPlugin
    Assembly Version: 2.1.0.0
    Win32 Version: 2.1.0.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/iCHgjzqXqoMmE24I35cA/GoogleSyncPlugin.dll
----------------------------------------
KoenZomersKeePassOneDriveSync
    Assembly Version: 1.3.2.0
    Win32 Version: 1.3.2.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/KoenZomersKeePassOneDriveSync.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.8.18111
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/Newtonsoft.Json.DLL
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
CredentialManagement
    Assembly Version: 1.0.2.0
    Win32 Version: 1.0.2
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/CredentialManagement.DLL
----------------------------------------
KeePassFaviconDownloader
    Assembly Version: 2.0.9.28178
    Win32 Version: 1.9.0.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/foPmpj0SdEQDFPLfrNGf/KeePassFaviconDownloader.dll
----------------------------------------
KeePassHttp
    Assembly Version: 2.21.0.0
    Win32 Version: 1.8.4.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/FQ64wXMOUc6WxirldwLc/KeePassHttp.dll
----------------------------------------
KeePassRPC
    Assembly Version: 2.0.15.33212
    Win32 Version: 1.4.4.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/KeePassRPC.dll
----------------------------------------
Jayrock
    Assembly Version: 0.9.12915.0
    Win32 Version: 0.9.11214.1056
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/Jayrock.DLL
----------------------------------------
Fleck2
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/Fleck2.DLL
----------------------------------------
KeePassRPC.Mono.Security
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/KeePassRPC.Mono.Security.DLL
----------------------------------------
System.Security
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34248 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
----------------------------------------
KoenZomers.OneDrive.Api
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/KoenZomers.OneDrive.Api.DLL
----------------------------------------
System.Net.Http
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

it happens whenever i try to sync with onedrive.

KoenZomers commented 9 years ago

Hi Avik,

That typically means it can't find the location you've entered on OneDrive. What are the local path and remote paths you're using?

I'll add some better error handling for this as this is the #1 question I get :)

Kind regards,

Koen

Sent from my Windows Phone


From: Avik Bmailto:notifications@github.com Sent: ‎23-‎7-‎2015 08:14 To: KoenZomers/KeePassOneDriveSyncmailto:KeePassOneDriveSync@noreply.github.com Subject: [KeePassOneDriveSync] getting unhandled exception error (#1)

here is the error that it gives me

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

\ Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at KoenZomersKeePassOneDriveSync.KeePass.d0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at KoenZomersKeePassOneDriveSync.KoenZomersKeePassOneDriveSyncExt.d4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__4(Object state)

\ Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

KeePass Assembly Version: 2.29.0.17893 Win32 Version: 2.29.0.0

CodeBase: file:///C:/Program%20Files%20(x86)/KeePass%20Password%20Safe%202/KeePass.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34250 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34239 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

GoogleSyncPlugin Assembly Version: 2.1.0.0 Win32 Version: 2.1.0.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/iCHgjzqXqoMmE24I35cA/GoogleSyncPlugin.dll

KoenZomersKeePassOneDriveSync Assembly Version: 1.3.2.0 Win32 Version: 1.3.2.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/KoenZomersKeePassOneDriveSync.dll

Newtonsoft.Json Assembly Version: 6.0.0.0 Win32 Version: 6.0.8.18111

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/Newtonsoft.Json.DLL

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34230 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

System.Xml.Linq Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

CredentialManagement Assembly Version: 1.0.2.0 Win32 Version: 1.0.2

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/CredentialManagement.DLL

KeePassFaviconDownloader Assembly Version: 2.0.9.28178 Win32 Version: 1.9.0.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/foPmpj0SdEQDFPLfrNGf/KeePassFaviconDownloader.dll

KeePassHttp Assembly Version: 2.21.0.0 Win32 Version: 1.8.4.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/FQ64wXMOUc6WxirldwLc/KeePassHttp.dll

KeePassRPC Assembly Version: 2.0.15.33212 Win32 Version: 1.4.4.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/KeePassRPC.dll

Jayrock Assembly Version: 0.9.12915.0 Win32 Version: 0.9.11214.1056

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/Jayrock.DLL

Fleck2 Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/Fleck2.DLL

KeePassRPC.Mono.Security Assembly Version: 2.0.0.0 Win32 Version: 2.0.0.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/TWKSG8BXPoub4DdXZP4s/KeePassRPC.Mono.Security.DLL

System.Security Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34248 built by: FX452RTMGDR

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll

KoenZomers.OneDrive.Api Assembly Version: 1.1.0.0 Win32 Version: 1.1.0.0

CodeBase: file:///C:/Users/Avik/AppData/Local/KeePass/PluginCache/7Io0HUI29wePgLKbHr6L/KoenZomers.OneDrive.Api.DLL

System.Net.Http Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll

\ JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

it happens whenever i try to sync with onedrive.

— Reply to this email directly or view it on GitHubhttps://github.com/KoenZomers/KeePassOneDriveSync/issues/1.

lazeravik commented 9 years ago

i don't know about local path or remote path! but if you mean the path where my onedrive is located, then it is on E:\Onedrive i did change it from C:\ to E:\, don't know anything about remote path.

KoenZomers commented 9 years ago

With remote path I mean where on your OneDrive do you want to store your KeePass database? Is it in the root or in a subfolder on your OneDrive?

From: Avik B [mailto:notifications@github.com] Sent: Friday, July 24, 2015 12:03 PM To: KoenZomers/KeePassOneDriveSync KeePassOneDriveSync@noreply.github.com Cc: Koen Zomers mail@koenzomers.nl Subject: Re: [KeePassOneDriveSync] getting unhandled exception error (#1)

i don't know about local path or remote path! but if you mean the path where my onedrive is located, then it is on E:\Onedrive i did change it from C:\ to E:\, don't know anything about remote path.

— Reply to this email directly or view it on GitHubhttps://github.com/KoenZomers/KeePassOneDriveSync/issues/1#issuecomment-124461278.

lazeravik commented 9 years ago

well i would like to store it in a sub folder, called Documents.

KoenZomers commented 9 years ago

Try storing it in the root instead. So just type Database.kdbx in the field where it asks you where to store it on OneDrive. Documents is a special type of folder. While it may look localized in your own language, underneath it could be named differently. Please share if that does work, then I can easier pinpoint the problem. Haven’t had time yet to add additional logging into the plugin to make it clearer what goes wrong.

From: Avik B [mailto:notifications@github.com] Sent: zondag 26 juli 2015 13:16 To: KoenZomers/KeePassOneDriveSync KeePassOneDriveSync@noreply.github.com Cc: Koen Zomers mail@koenzomers.nl Subject: Re: [KeePassOneDriveSync] getting unhandled exception error (#1)

well i would like to store it in a sub folder, called Documents.

— Reply to this email directly or view it on GitHubhttps://github.com/KoenZomers/KeePassOneDriveSync/issues/1#issuecomment-124972644.

lazeravik commented 9 years ago

okay so i get it to work, well it syncs even if it is in a sub directory, but still sometime i get the error, it works fine even if i ignore the error. I think the main problem was my internet connection, most of the time i get the error during internet connectivity problem, but it works great.

though i have one question like, when is the sync triggered??!! i mean, currently it automatically sync after some random time, or maybe after i save an entry!! but it would be helpful to know the sync time.

KoenZomers commented 9 years ago

Glad to see it works for you now. The sync occurs only when:

  1. Opening a KeePass database
  2. Saving your KeePass database
  3. Manually initiating a sync via Tools -> OneDriveSync Options -> right click on the database you currently have open -> Sync Now
  4. Manually initiating a sync via Tools -> OneDriveSync Options -> double click on the database you currently have open -> Sync Now

From: Avik B [mailto:notifications@github.com] Sent: Monday, August 3, 2015 11:00 PM To: KoenZomers/KeePassOneDriveSync KeePassOneDriveSync@noreply.github.com Cc: Koen Zomers mail@koenzomers.nl Subject: Re: [KeePassOneDriveSync] getting unhandled exception error (#1)

okay so i get it to work, well it syncs even if it is in a sub directory, but still sometime i get the error, it works fine even if i ignore the error. I think the main problem was my internet connection, most of the time i get the error during internet connectivity problem, but it works great.

though i have one question like, when is the sync triggered??!! i mean, currently it automatically sync after some random time, or maybe after i save an entry!! but it would be helpful to know the sync time.

— Reply to this email directly or view it on GitHubhttps://github.com/KoenZomers/KeePassOneDriveSync/issues/1#issuecomment-127405155.

lazeravik commented 9 years ago

thanks, this plugin is great.