Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using EnC triggers "Object reference not set to an instance of an object." in sample web app #48170

Open
LyalinDotCom opened this issue Sep 29, 2020 · 0 comments
Assignees
Milestone

Comments

@LyalinDotCom
Copy link

Version Used:
16.9.0 Preview 1.0 [30528.6.main]

Steps to Reproduce:

  1. clone https://github.com/dotnet-architecture/eShopOnWeb or open my repro zip file (submitted directly to the dev via teams)
  2. Open GetOrderDetailsHandler.cs and put a breakpoint on line 22 inside of "Handle" method (should be: "var customerOrders = await _orderRepository.ListAsync(new CustomerOrdersWithItemsSpecification(request.UserName));")
  3. run the app in debug (F5)
  4. Reach the code in step Update links in README.md with ported wiki content #2 to trigger breakpoint however you like or use the app navigation by using web app to: add an item to basket, checkout, login using demouser (listed in the page with username/password), click login, click pay now, click on username on top and go to order history then click detail
  5. once you hit the breakpoint change line 23 (example below)
            //var order = customerOrders.FirstOrDefault(o => o.Id == request.OrderId);
            var order = customerOrders.First(o => o.Id == request.OrderId);
  1. hit F5

Expected Behavior:

  • App should resume running as the change is valid

Actual Behavior:

  • web app crashes with object reference not set to an instance of an object exception

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Web
StackTrace:
at Microsoft.eShopWeb.Web.Features.OrderDetails.GetOrderDetailsHandler.d__2.MoveNext() in C:\Source\eShopOnWeb\src\Web\Features\OrderDetails\GetOrderDetailsHandler.cs:line 22

@jinujoseph jinujoseph added this to the 16.9 milestone Sep 30, 2020
@tmat tmat modified the milestones: 16.9, 16.10 Jan 29, 2021
@jinujoseph jinujoseph modified the milestones: 16.10, Backlog Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants