Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

API Wallet Sync Fails #18

Closed
DemonRx opened this issue Dec 19, 2017 · 2 comments
Closed

API Wallet Sync Fails #18

DemonRx opened this issue Dec 19, 2017 · 2 comments

Comments

@DemonRx
Copy link
Contributor

DemonRx commented Dec 19, 2017

Requesting sync through swagger fails:

   "hash": "977cffcd66dd8af1aaaf0e2ee6c4b9f1e2d054ab44f97e1740f7180e8ad0001f" \ 
 }' 'http://localhost:37221/api/Wallet/sync'
Request URL
http://localhost:37221/api/Wallet/sync
Response Body
no content
Response Code
500
Response Headers
{
  "date": "Tue, 19 Dec 2017 09:54:45 GMT",
  "content-length": "0",
  "server": "Kestrel",
  "content-type": null
}
Stratis: fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLA6OFCJK5P3", Request id "0HLA6OFCJK5P3:00000006": An unhandled exception was thrown by the application.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Stratis.Bitcoin.Features.Wallet.Controllers.WalletController.Sync(HashModel model) in /home/travis/build/stratisproject/FullNodeUI/StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.Wallet/Controllers/WalletController.cs:line 831
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
@bokobza
Copy link
Contributor

bokobza commented Dec 19, 2017

Interesting, thanks @D3m0nKingx .

dangershony pushed a commit to stratisproject/StratisBitcoinFullNode that referenced this issue Jan 8, 2018
#1018)

* Check whether the hash represents a block that exists in the blockchain before trying to sync.
Fix for stratisproject/StratisCore#18

* added and fix tests

* Changed to explicit type for ChainedBlock
@bokobza
Copy link
Contributor

bokobza commented Jan 8, 2018

@bokobza bokobza closed this as completed Jan 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants