I have spent 15 hours so far if not what appears to be an entire lifetime....
I have an old 3.9 installation which I was able to bring up to 4.30 and get it running perfectly.
But trying to upgrade to 4.40 always always always fails with this message: Setup failed: Sequence contains more than one element
I have tried everything. From top to bottom I have even did this:
Created a new install of 4.30 with brand new empty database with NO sample products. Then I ran the application and UNINSTALLED and DELETED all the plugins (empty collection of 'InstalledPlugins' in the plugins.json file...
Then in the 4.40 I also emptied the collection of 'InstalledPlugins' in the plugins.json file and ran the install -> pointed to my newly created 4.30 database and got the exact same result: Setup failed: Sequence contains more than one element
I have tried every thing in between trying to upgrade to my own 4.30 database with my products in it, then same thing without plugins....
Every possibilities have been explored, I even tried commenting out some migrations... and have always resulted in the same result: Setup failed: Sequence contains more than one element
I have made at least 25 different attempts with different parameters..
I am able to do a brand new install of 4.40 with its own brans new database...
but it cannot be upgraded...
where does that message come from anyway?
also I want to add that when trying to just copy over the dataSettings.json file from ANY of my 4.30 experiments to ANY of my other 4.40 experiments: this ALWAYS results in the app issuing "too many redirects" and then we get to a browser based standard error page stating the error and suggesting to "clear my cookies" which did NOT work....
Do you have any custom tables, or added any custom fields to existing tables?
Please post the entire error message here.
Hi New York. Thanks for the reply.
As I had mentioned in my post: I did try a brand new install of 4.3 which created its own empty database, and this database..... even this one I am not able to upgrade to 4.40.
If I run the setup and point to the 4.30 database I get this error message: Setup failed: Sequence contains more than one element
If I simply copy over the dataSetings.json from the 4.30 project to the 4.40 project: It gets caught in a loop of redirects.
The error message I get is: Setup failed: Sequence contains more than one element
it appears to be redirecting to the non secured http version of the site...
here is the request:
GET https://localhost:44369/ HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
sec-ch-ua: "Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99"
Accept-Encoding: gzip, deflate, br
and the response
HTTP/1.1 301 Moved Permanently
Set-Cookie: .Nop.Customer=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/
Set-Cookie: .Nop.Customer=c5d53ab8-3ea9-4bb2-97ca-c744baf8f35a; expires=Sun, 13 Nov 2022 03:21:47 GMT; path=/; secure; httponly
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Security-Policy: default-src 'self'; connect-src *; font-src * data:; frame-src *; img-src * data:; media-src *; object-src *; script-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline';
Permissions-Policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=*, usb=()
Date: Sat, 13 Nov 2021 03:21:47 GMT
Regarding Sequence contains more than one element,
It means that "The problem is that you are using SingleOrDefault. This method will only succeed when the collections contains exactly 0 or 1 element. I believe you are looking for FirstOrDefault which will succeed no matter how many elements are in the collection."
In nopCommerce v4.40, it is being used at Nop.Data.Mapping.FluentMigratorMetadataReader
Where the GetAttribute method is trying to use your provided column name map at MappingBuilder via NameCompatibilityManager. It's expecting to have one mapping for one column definition but getting more than one.
In short the meaning of it is, You provided more than one map for same column at least one of your mapping entity builder class.
For example: Providing Map for CustomerId twice
And for, SSL redirection, Check your store URL & when you are in visual studio check Web Server Setting too.
I have resolved the issue. I am have successfully upgraded my existing store to 4.40.4