Skip to content

Array to String conversion error on checkout page when changin country - how to debug #12612

@fwolfst

Description

@fwolfst

Preconditions

  1. Magento 2.2.1
  2. php and mysql updated from ubuntu 16.04 repositories

Steps to reproduce

  1. I guess it is difficult to reproduce and configuration dependent. I'd be happy for hints how to debug this.
    The payment methods are set available for all allowed countries. There are shipping tablerates for the respictive countries too.
  2. Add one or more product(s) to cart
  3. Go to (onepage) checkout page
  4. Change the country

Expected result

  1. Shipping method and tax values and payment providers should change according to country selection.

Actual result

  1. Sometimes client sees a short red error message above the checkout page about Array to string conversion. In that case following is seen in var/log/exception.log:
    [2017-12-08 03:48:23] main.CRITICAL: Report ID: webapi-5a2a0b8746dca; Message: Notice: Array to string conversion in /var/www/XXX/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 {"exception":"[object] (Exception(code: 0): Report ID: webapi-5a2a0b8746dca; Message: Notice: Array to string conversion in /var/www/XXX/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 at /var/www/XXX/vendor/magento/framework/Webapi/ErrorProcessor.php:205, Exception(code: 0): Notice: Array to string conversion in /var/www/XXX/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 at /var/www/XXX/vendor/magento/framework/App/ErrorHandler.php:61)"} []
    The corresponding (shipping, tax, payment) values do not always change.
    Sometimes the error is not shown in frontend, then the log message differs slightly. In between configuration changes or separete tests I flush caches and clear the browser session (FF, Ctrl+F5).

[2017-12-07 23:57:04] main.CRITICAL: Notice: Array to string conversion in /var/www/XXX/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 {"exception":"[object] (Exception(code: 0): Notice: Array to string conversion in /var/www/XXX/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 2999 at /var/www/XXX/vendor/magento/framework/App/ErrorHandler.php:61)"} []
I am sorry not to be able to be more precise here but any help on getting a more detailed stacktrace or more information on where the error actually comes from would be greatly appreciated.
I hacked the corresponding Mysql.php file and printed the "array" contents into a file. It showed up an empty list ("()" afair).

Metadata

Metadata

Assignees

Labels

Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions