Magento2: Error message when upgrading from Magento 2 (2.2.3) to either 2.2.4 and now 2.2.5

Created on 30 Jun 2018  Â·  9Comments  Â·  Source: magento/magento2

Hello,

When I install to latest version of Magento 2 , the website wont load and I am getting the following error message

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Magento_Directory data: current version - 2.0.1, required version - 2.0.2
Magento_Customer data: current version - 2.0.12, required version - 2.0.13
Magento_Catalog data: current version - 2.2.3, required version - 2.2.4
Magento_Quote data: current version - 2.0.6, required version - 2.0.7
Magento_Sales data: current version - 2.0.7, required version - 2.0.9
Magento_Vault data: current version - 2.0.2, required version - 2.0.3
Magento_Newsletter data: current version - 2.0.0, required version - 2.0.1
Amazon_Core data: current version - none, required version - 2.0.4
Amazon_Login data: current version - none, required version - 1.2.0
Amazon_Payment data: current version - none, required version - 1.11.0
Klarna_Core schema: current version - none, required version - 4.1.5
Klarna_Core data: current version - none, required version - 4.1.5
Klarna_Ordermanagement schema: current version - none, required version - 4.1.2
Klarna_Ordermanagement data: current version - none, required version - 4.1.2
Klarna_Kp schema: current version - none, required version - 5.1.3
Klarna_Kp data: current version - none, required version - 5.1.3
Dotdigitalgroup_Email schema: current version - 2.3.8, required version - 2.4.9
Dotdigitalgroup_Email data: current version - 2.3.8, required version - 2.4.9
Temando_Shipping schema: current version - 0.3.1, required version - 1.1.0
Temando_Shipping data: current version - 0.3.1, required version - 1.1.0
Vertex_Tax schema: current version - none, required version - 100.1.0
Vertex_Tax

I then try and run bin/magento setup:upgrade and I am getting the following message

kco_order_id int UNSIGNED NOT NULL auto_increment COMMENT 'Order Id' ,
klarna_checkout_id varchar(255) NULL COMMENT 'Klarna Checkout Id' ,
klarna_reservation_id varchar(255) NULL COMMENT 'Klarna Reservation Id' ,
order_id int UNSIGNED NOT NULL COMMENT 'Order Id' ,
is_acknowledged smallint NOT NULL default '0' COMMENT 'Is Acknowledged' ,
PRIMARY KEY (kco_order_id),
CONSTRAINT MG_KLARNA_KCO_ORDER_ORDER_ID_SALES_ORDER_ENTITY_ID FOREIGN KEY (order_id) REFERENCES mg_sales_order (entity_id) ON DELETE CASCADE
) COMMENT='Klarna Checkout Order' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci

Installing schema... SQLSTATE[HY000]: General error: 1005 Can't create table ssgroupw_mg1.mg_klarna_kco_order (errno: 121 "Duplicate key on write or update"), query was: CREATE TABLE IF NOT EXISTS mg_klarna_kco_order (
-bash: syntax error near unexpected token (' [my@domain DCHS]$kco_order_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Order Id' ,data: current version - none, required version - 100.1.0

Can anyone please help - I am not an expert on this type of thing, so any very informative way of solving is appreciated.

thanks as always

Bundled Extension Clear Description Format is not valid

Most helpful comment

I have the same issue. It's as @sidchs says:

Klarna Payments has been selected as a Core Bundled Extension, CBE for Magento Commerce latest platform release, Magento 2.2.4, and is now distributed with Magento 2 core code. This means that using Klarna Payments on your M2 store has never been easier.

All 9 comments

Hi @sidchs. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

@sidchs do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

@sidchs, thank you for your report. Considering error message you've provided, error produced by some 3d-party extension(Klarna Checkout?) not magento core functionality itself. Please try to reproduce this issue on clean magento instance.

Hello, thx for the info

I believe Klarna is now part of Magento 2 unless I am getting this wrong (see below)

Klarna Payments has been selected as a Core Bundled Extension, CBE for Magento Commerce latest platform release, Magento 2.2.4, and is now distributed with Magento 2 core code. This means that using Klarna Payments on your M2 store has never been easier.

I don’t have 3rd party module using this.

Thanks for the info

From: engcom-backlog-nickolas notifications@github.com
Sent: 02 July 2018 12:31
To: magento/magento2 magento2@noreply.github.com
Cc: sidchs simon1@discountheating.com; Mention mention@noreply.github.com
Subject: Re: [magento/magento2] Error message when upgrading from Magento 2 (2.2.3) to either 2.2.4 and now 2.2.5 (#16469)

@sidchs https://github.com/sidchs , thank you for your report. Considering error message you've provided, error produced by some 3d-party module(Klarna Checkout?) not magento core functionality itself. Please try to reproduce this issue on clean magento instance.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/16469#issuecomment-401774828 , or mute the thread https://github.com/notifications/unsubscribe-auth/AlLgM7d3UvHbHjeUv9lMV2l2VGEMGe_tks5uCgSCgaJpZM4U9-eu . https://github.com/notifications/beacon/AlLgMyErvra-2dUGOQAfxzg-jRWSW8kDks5uCgSCgaJpZM4U9-eu.gif

@sidchs, thank you for reply. Unfortunately, I'm closing this issue, as GitHub is intended only for issues related to magento core modules and components. If you'd like to update it, please reopen the issue.
Also, you may try to contant Klarna Payments directly https://marketplace.magento.com/partner/KlarnaOfficial

Hello,

I think this certainly a Magento issue – it is failing on many points during upgrade – not just Klarna.

Thanks for trying to help – hopefully someone else will know what’s going on !

thx

From: engcom-backlog-nickolas notifications@github.com
Sent: 02 July 2018 13:17
To: magento/magento2 magento2@noreply.github.com
Cc: sidchs simon1@discountheating.com; Mention mention@noreply.github.com
Subject: Re: [magento/magento2] Error message when upgrading from Magento 2 (2.2.3) to either 2.2.4 and now 2.2.5 (#16469)

@sidchs https://github.com/sidchs , thank you for reply. Unfortunately, GitHub is intended only for issues related to magento core modules and components. You may try to contant Klarna Payments directly https://marketplace.magento.com/partner/KlarnaOfficial

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/16469#issuecomment-401784951 , or mute the thread https://github.com/notifications/unsubscribe-auth/AlLgM6OP8ACgaDq-TbjzWWp4Cb8LApdUks5uCg8ogaJpZM4U9-eu . https://github.com/notifications/beacon/AlLgM-7Ifes8327ZeFKYxFPX9LOfcWQGks5uCg8ogaJpZM4U9-eu.gif

I have the same issue. It's as @sidchs says:

Klarna Payments has been selected as a Core Bundled Extension, CBE for Magento Commerce latest platform release, Magento 2.2.4, and is now distributed with Magento 2 core code. This means that using Klarna Payments on your M2 store has never been easier.

I have a problem with Klarna too after composer update from 2.2.3 to 2.2.5.
My error in setup:upgrade ->

Module 'Klarna_Core': Installing schema... SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table 'klarna_kco_order', query was: CREATE TABLE IF NOT EXISTS `klarna_kco_order` ( `kco_order_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Order Id' , `klarna_checkout_id` varchar(255) NULL COMMENT 'Klarna Checkout Id' , `klarna_reservation_id` varchar(255) NULL COMMENT 'Klarna Reservation Id' , `order_id` int UNSIGNED NOT NULL COMMENT 'Order Id' , `is_acknowledged` smallint NOT NULL default '0' COMMENT 'Is Acknowledged' , PRIMARY KEY (`kco_order_id`), CONSTRAINT `KLARNA_KCO_ORDER_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE ) COMMENT='Klarna Checkout Order' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci

I have a problem with Klarna too after composer update from 2.2.3 to 2.2.5.

I'm getting the exact same issue updating from 2.2.3 to 2.2.5.

I was able to correct my upgrade issue by performing the following steps:

I rolled back to v2.2.3 and deleted the two Klarna tables from the database (created from the failed install that generated the initial mysql error):

klarna_payments_quote

I then entered the following commands:

bin/magento maintenance:enable

I had to completely delete the composer directory

rm -rf ~/.config/composer/

composer clear-cache

composer require magento/product-community-edition 2.2.5 --no-update
composer update

I then had to reset file/folder ownership (This seems to be a common issue with Magento upgrades...)
chown -R apache:apache ./
(user:group depends on your set up)

rm -rf var/di var/generation
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex

Had to reset file/folder ownership again (Magento upgrade breaks this EVERY single time)

bin/magento maintenance:disable

bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Had to reset file/folder ownership yet again since deployment also reset the user/group

Everything finally loaded afterwards.

Was this page helpful?
0 / 5 - 0 ratings