Sylius / PayPalPlugin

Official integration with PayPal Commerce Platform
37 stars 56 forks source link

Error: Unexpected token < in JSON at position 0 [] [] #181

Closed deansoffer closed 3 years ago

deansoffer commented 3 years ago

When i try to make quick checkout with paypal button (on product page), i get the following error:

Date Parse Error paypal ERROR Error: Unexpected token < in JSON at position 0 [] []

any ideas why ? 10X

Zales0123 commented 3 years ago

Hello Dean! Can you provide a little bit more information about the setup of your application? This error seems quite generic. Maybe you could debug a little bit over the application? Or provide some stack trace?

theriseofendymion commented 3 years ago

Same behavior here. This happens during checkout after validating payment in PayPal popup. This error is logged in var/paypal.log from plugin. The order in PayPal's sandbox results payed.

theriseofendymion commented 3 years ago

My error depends on wkhtml that was missing, unfortunately this error was not logged in production. That resolved for me.

Zales0123 commented 3 years ago

Good you found an issue 👍 It would be perfect if you know where exactly is this exception thrown? I wonder, why the wkhtmltopdf fixed it, as I don't remember we use it anywhere in the plugin 😄 @deansoffer is it the same for you?

deansoffer commented 3 years ago

@theriseofendymion solution makes sens, wkhtml is not installed on my docker image (becuase it's not playing well with alpine distro). for now i'm using the default paypal express payway. cheers!

Zales0123 commented 3 years ago

As it's an issue not strictly connected to this plugin (we don't use wkhtmltopdf in it) I allow myself to close it. Thank you, for the discussion :) 🖖