Solved

500 internal server error on oauth with magento2

  • 8 July 2021
  • 7 replies
  • 609 views

Badge +2

The klaviyo extension is installed and configured correctly and integration is added accordingly as well. When we go for activation , we are facing the following:

We are getting 500 internal server error while trying to perform integration oauth with magento2 CE on a local machine setup.

The oauth page does not close and gives this error. If i press on close window and cancel then it gives me the message of  :

Integration 'klaviyo Auth' has been sent for activation.

and under my integrations tab in klaviyo i do not see it activated.

 

What am i doing wrong here ?  any idea

 

icon

Best answer by Dov 9 July 2021, 16:33

View original

7 replies

Userlevel 7
Badge +61

Hi @dev_lj,

Thanks for sharing your question with the Klaviyo Community.

As a general first step it is a good idea to first try re-creating the OAuth Integration from Magento 2.

You can achieve this by going to Stores > Configuration > Klaviyo like below and create a new entry:
?name=inline-1073289648.png

Then try activating the new entry and deleting the existing one.

However, in your case it appears that the instance of Magento you were testing was only accessible via the local network on your local computer and so Klaviyo had no way to reach the server. In order to avoid the error, you would need to make this instance public facing or use a cloud server.

Badge +2

Hi @dov.derin ,

I figured out this local setup to be the case of integration issue . 

Thanks for the reply , i believe this will work on cloud for me.

Badge +1

Hi @dev_lj,

Thanks for sharing your question with the Klaviyo Community.

As a general first step it is a good idea to first try re-creating the OAuth Integration from Magento 2.

You can achieve this by going to Stores > Configuration > Klaviyo like below and create a new entry:
?name=inline-1073289648.png

Then try activating the new entry and deleting the existing one.

However, in your case it appears that the instance of Magento you were testing was only accessible via the local network on your local computer and so Klaviyo had no way to reach the server. In order to avoid the error, you would need to make this instance public facing or use a cloud server.

Hi dov.derin My server is public but still getting this error, please check for me
 

 

Userlevel 7
Badge +61

Hi @songhieu,

Thanks for sharing this information.

Can you confirm if you are on Magento 2 versions 2.3.0 to 2.3.3? There have been reported issues of folks enabling oauth with these M2 versions. You can try upgrading your Magento Extension to version 2.3.4 or higher to resolve since this error is only occurring on 2.3.0 to 2.3.3, you shouldn't have a problem initiating OAuth in our more recent 2.3.4+ versions. 

 

Badge +1

Hi @songhieu,

Thanks for sharing this information.

Can you confirm if you are on Magento 2 versions 2.3.0 to 2.3.3? There have been reported issues of folks enabling oauth with these M2 versions. You can try upgrading your Magento Extension to version 2.3.4 or higher to resolve since this error is only occurring on 2.3.0 to 2.3.3, you shouldn't have a problem initiating OAuth in our more recent 2.3.4+ versions. 

 

my magento version 2.4.2.

Userlevel 7
Badge +60

Hey @songhieu,

Being on Magento version 2.4.2, when clicking on the Activate button, do you immediately  receive a pop up notification with an error dialog stating “Something went wrong. Please try again later” as below: 

If so, then this is a known issue pertaining to this Magento version as detailed in the Cannot Activate OAuth Magento 2.4.2 #122 Github. You can also find the solution to this from the following Magento post: Unable to activate integration with Oauth 1.0

I hope this helps!

David

Badge +1

Hey @songhieu,

Being on Magento version 2.4.2, when clicking on the Activate button, do you immediately  receive a pop up notification with an error dialog stating “Something went wrong. Please try again later” as below: 

If so, then this is a known issue pertaining to this Magento version as detailed in the Cannot Activate OAuth Magento 2.4.2 #122 Github. You can also find the solution to this from the following Magento post: Unable to activate integration with Oauth 1.0

I hope this helps!

David

I fixed this error but when I redirected to klaviyo and clicked on "Intergrate magento" I got a 500 error from klaviyo's server.

Reply