klaviyo / magento2-klaviyo

37 stars 51 forks source link

Help with the method getKlSmsConsent #127

Closed maxacarvalho closed 3 years ago

maxacarvalho commented 3 years ago

Hello,

I recently upgrade the Klaviyo extension version that I'm using on my Magento 2 store. I installed the latest version, 3.0.5. After sometime, I noticed that no orders were coming anymore. After some investigation I found some exceptions on the logs, they point to a method called getKlSmsConsent, every time I try to place an order the exception is fired and the checkout cannot proceed, it happens once I select the shipping method and click to proceed.

I can see that it refers to the Consent at Checkout feature, which's not even enabled on my store.

Below you can find a sample of the exception, for now, I'm disabling the extension, this is urgent.
One thing to notice, my store uses a React application on the frontend, so all the communication happens via the Magento GraphQL API, maybe that can help.

Exception Sample:

[2021-06-26 18:41:27] .ERROR: Call to undefined method Magento\Checkout\Api\Data\ShippingInformationExtension::getKlSmsConsent() {"exception":"[object] (GraphQL\\Error\\Error(code: 0): Call to undefined method Magento\\Checkout\\Api\\Data\\ShippingInformationExtension::getKlSmsConsent() at vendor/webonyx/graphql-php/src/Error/Error.php:174, Error(code: 0): Call to undefined method Magento\\Checkout\\Api\\Data\\ShippingInformationExtension::getKlSmsConsent() at vendor/klaviyo/magento2-extension/Model/Checkout/ShippingInformationManagement.php:29)"} []
klaviyojad commented 3 years ago

@maxacarvalho we are aware of this problem and currently investigating it. Some customers have been able to install this branch version https://github.com/lsimeonov/magento2-klaviyo/tree/fix/extend-extension-attributes and it fixed their issues. Is it possible for you to test in your system to check if it resolves this issue? Again we are hoping that we could merge it into master branch and include in the next release

maxacarvalho commented 3 years ago

@klaviyojad I am unable to test it right now. I disabled the extension but even after that the issue persists, now I get another exception after I click t actually place the order.

[2021-06-26 19:02:21] .ERROR: Missing required argument $name of Klaviyo\Reclaim\Logger\Logger. {"exception":"[object] (GraphQL\\Error\\Error(code: 0): Missing required argument $name of Klaviyo\\Reclaim\\Logger\\Logger. at vendor/webonyx/graphql-php/src/Error/Error.php:174, BadMethodCallException(code: 0): Missing required argument $name of Klaviyo\\Reclaim\\Logger\\Logger. at vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:261)"} []
klaviyojad commented 3 years ago

@maxacarvalho for the Klaviyo Plugin Settings under Stores > Configuration > Klaviyo > General do you have Enable Klaviyo Logger set to true? make sure the path {magento-root-directory}/var/log/klaviyo.log exists

maxacarvalho commented 3 years ago

@klaviyojad I had to revert the changes.
The store is not selling since yesterday because of the issue with the extension.
The exception points to a missing required parameter, not a log file. By the way, yes, the log file exists, besides, Magento logger will create the file if it does not exists.

klaviyojad commented 3 years ago

@maxacarvalho I am sorry this took place. We don't typically solve problems here on github. If you don't mind filing a support ticket as described here we could better assist you and there is better tracking.

maxacarvalho commented 3 years ago

@klaviyojad any update about this issue?

klaviyojad commented 3 years ago

@maxacarvalho I was just chatting with your colleague and have you CC-ed in a support ticket. As we work to solve this problem, I was suggesting that you revert to Klaviyo Extension Version 2.0.0 until we solve this problem. Could we please keep this dialogue inside the support ticket? Again github is not the place for customer inquiries.

VivekShingala commented 1 year ago

Hi @klaviyojad

Was this issue resolved? I am getting the same error on my 2.4.3-p2 store's checkout page on production. Started getting it 2 days back.