4.60.0 "Nullable object must have a value."

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
nopCommerce 4.60.0

I had a strange issue happen, which later resolved itself, but I am posting it here just in case it's relevant.

I don't know how the error resolved itself, so I can't help there. I do have the logs though (below).

Maybe the error got resolved by me testing the settings in trying to get the error to replicate, I suppose. The error happened more than once, as you can see by the amount of log entries at the bottom of this post.

How it began was when I chose the following:

Configuration / Settings
Tax displaying
Allow customers to select tax display type (checked)

I went through the Checkout process where chose the "Show prices tax inclusive" from the top left dropdown menu in the browser.

The error happened only on the "Show prices tax inclusive" and not while using "Show prices tax exclusive".

When I clicked on CONFIRM, a message in red appeared below the "Confirm order" blue area with the text of "Nullable object must have a value."

When I checked the Log, I found the following two errors.

I proceeded to try to replicate the problem, which, at first was related to "Show prices tax inclusive". However, after trying to replicate it in order to definitely peg that as the problem, the error went away.

------------------------------------------------

1) Nullable object must have a value.
2) Error while placing order. Error 1: Nullable object must haveNullable object must have a value. a value..

------------------------------------------------

Log level
Error
Short message
Nullable object must have a value.
Full message
System.InvalidOperationException: Nullable object must have a value.
   at Nop.Services.Orders.OrderProcessingService.PreparePlaceOrderDetailsAsync(ProcessPaymentRequest processPaymentRequest)
   at Nop.Services.Orders.OrderProcessingService.PlaceOrderAsync(ProcessPaymentRequest processPaymentRequest)
IP address
127.0.0.1
Customer
Page URL
http://localhost/checkout/OpcConfirmOrder/
Referrer URL
http://localhost/onepagecheckout
Created on
2/1/2023 7:13:47 AM

------------------------------------------------

Log level
Error
Short message
Error while placing order. Error 1: Nullable object must have a value..
Full message
IP address
127.0.0.1
Customer
[email protected]
Page URL
http://localhost/checkout/OpcConfirmOrder/
Referrer URL
http://localhost/onepagecheckout
Created on
2/1/2023 7:13:47 AM

------------------------------------------------

  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 7:21:16 AM  
  Error  Nullable object must have a value.  02/01/2023 7:21:16 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 7:13:47 AM  
  Error  Nullable object must have a value.  02/01/2023 7:13:47 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 7:06:59 AM  
  Error  Nullable object must have a value.  02/01/2023 7:06:59 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 7:01:39 AM  
  Error  Nullable object must have a value.  02/01/2023 7:01:39 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:57:19 AM  
  Error  Nullable object must have a value.  02/01/2023 6:57:19 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:54:31 AM  
  Error  Nullable object must have a value.  02/01/2023 6:54:31 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:52:36 AM  
  Error  Nullable object must have a value.  02/01/2023 6:52:36 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:50:42 AM  
  Error  Nullable object must have a value.  02/01/2023 6:50:42 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:49:46 AM  
  Error  Nullable object must have a value.  02/01/2023 6:49:46 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:47:10 AM  
  Error  Nullable object must have a value.  02/01/2023 6:47:10 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:44:57 AM  
  Error  Nullable object must have a value.  02/01/2023 6:44:57 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:41:21 AM  
  Error  Nullable object must have a value.  02/01/2023 6:41:21 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:33:18 AM  
  Error  Nullable object must have a value.  02/01/2023 6:33:18 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:33:17 AM  
  Error  Nullable object must have a value.  02/01/2023 6:33:17 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:33:16 AM  
  Error  Nullable object must have a value.  02/01/2023 6:33:16 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:33:12 AM  
  Error  Nullable object must have a value.  02/01/2023 6:33:12 AM  
  Error  Error while placing order. Error 1: Nullable object must have a value..   02/01/2023 6:33:08 AM  
  Error  Nullable object must have a value.  02/01/2023 6:33:08 AM
1 year ago
Also, the email address of "[email protected]" was for a registered user (test account).
1 year ago
Thanks for pointing this bug out. Here is a fix for it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.