Square will not stay connected
-
I am using the WooCommerce Square plugin, but I keep getting a message that says “Thanks for installing WooCommerce Square! To get started, connect with Square>>”
I have gone in multiple times and connected my Square account. I have deleted and reinstalled the plugin.
According to the debug log, it connected at 09-04-2019 @ 21:23:30 and then disconnected at 09-04-2019 @ 21:43:31 due to “invalid authorization”.
What do I need to do to keep Square connected?
The page I need help with: [log in to see the link]
-
Hi All,
Invalid authorization, if you are not updating from Ver. 1 to Ver. 2x is usually an account setting mismatch from Square to WooCommerce. Be sure that your Business Location information under WooCommerce > Settings > Square is matching the information under your Square account settings in Square, and check your billing settings as well.
Also, if possible please turn on logging with the
Enable Logging
option in Square. Set it toSave to Log
and do a connection/sync. From there go to WooCommerce > Status > Logs and pull the Square log, then if there is an error there post it here ??They did not match so I changed them. I’ve reconnected Square, made a test payment, and now am letting it set to see if it stays connected. I’ll let you know what happens!
@smhcis can you tell me which locations didn’t match? I have one location in Square (mobile) and have set that as the location in WC. Is there another setting?
@amyr123 , my Square account did have ANY address set. But that didn’t fix my problem. It is still disconnecting.
Here is what I found in my logs:
09-17-2019 @ 18:12:41 - Request Request method: uri: listLocationsWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.51387s 09-17-2019 @ 18:12:41 - Response Response code: 200 message: headers: Array ( [0] => HTTP/1.1 200 OK [Content-Type] => application/json [Square-Version] => 2019-08-14 [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:12:41 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 713 ) body: { "locations": [ { "id": "*****", "name": "*******", "address": { "address_line_1": "*****", "address_line_2": "*****", "locality": "*****", "administrative_district_level_1": "**", "postal_code": "*****", "country": "US" }, "timezone": "America\/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2015-08-10T14:32:03Z", "merchant_id": "*****", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+*****", "business_name": "*****", "type": "PHYSICAL", "business_hours": {}, "business_email": "*****", "coordinates": { "latitude": *****, "longitude": -***** } } ] } 09-17-2019 @ 18:13:00 - Request Request method: uri: listLocationsWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.40829s 09-17-2019 @ 18:13:00 - Response Response code: 200 message: headers: Array ( [0] => HTTP/1.1 200 OK [Content-Type] => application/json [Square-Version] => 2019-08-14 [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:13:00 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 713 ) body: { "locations": [ { "id": "*****", "name": "*****", "address": { "address_line_1": "*****", "address_line_2": "*****", "locality": "*****", "administrative_district_level_1": "**", "postal_code": "*****", "country": "US" }, "timezone": "America\/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2015-08-10T14:32:03Z", "merchant_id": "*****", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+*****", "business_name": "*****", "type": "PHYSICAL", "business_hours": {}, "business_email": "*****", "coordinates": { "latitude": *****, "longitude": -***** } } ] } 09-17-2019 @ 18:20:21 - Request Request method: uri: listLocationsWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.44161s 09-17-2019 @ 18:20:21 - Response Response code: 200 message: headers: Array ( [0] => HTTP/1.1 200 OK [Content-Type] => application/json [Square-Version] => 2019-08-14 [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:20:21 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 713 ) body: { "locations": [ { "id": "*****", "name": "*****", "address": { "address_line_1": "*****", "address_line_2": "*****", "locality": "*****", "administrative_district_level_1": "**", "postal_code": "*****", "country": "US" }, "timezone": "America\/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2015-08-10T14:32:03Z", "merchant_id": "*****", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+*****", "business_name": "*****", "type": "PHYSICAL", "business_hours": {}, "business_email": "*****", "coordinates": { "latitude": *****, "longitude": -***** } } ] } 09-17-2019 @ 18:20:24 - Request Request method: uri: listLocationsWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.34718s 09-17-2019 @ 18:20:24 - Response Response code: 200 message: headers: Array ( [0] => HTTP/1.1 200 OK [Content-Type] => application/json [Square-Version] => 2019-08-14 [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:20:24 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 713 ) body: { "locations": [ { "id": "*****", "name": "*****", "address": { "address_line_1": "*****", "address_line_2": "*****", "locality": "*****", "administrative_district_level_1": "**", "postal_code": "*****", "country": "US" }, "timezone": "America\/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2015-08-10T14:32:03Z", "merchant_id": "*****", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+*****", "business_name": "*****", "type": "PHYSICAL", "business_hours": {}, "business_email": "*****", "coordinates": { "latitude": *****, "longitude": -***** } } ] } 09-17-2019 @ 18:23:14 - Request Request method: uri: listLocationsWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.41045s 09-17-2019 @ 18:23:14 - Response Response code: 200 message: headers: Array ( [0] => HTTP/1.1 200 OK [Content-Type] => application/json [Square-Version] => 2019-08-14 [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:23:13 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 713 ) body: { "locations": [ { "id": "*****", "name": "*****", "address": { "address_line_1": "*****", "address_line_2": "*****", "locality": "*****", "administrative_district_level_1": "**", "postal_code": "*****", "country": "US" }, "timezone": "America\/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2015-08-10T14:32:03Z", "merchant_id": "*****", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+*****", "business_name": "*****", "type": "PHYSICAL", "business_hours": {}, "business_email": "*****", "coordinates": { "latitude": *****, "longitude": -***** } } ] } 09-17-2019 @ 18:23:16 - Request Request method: uri: listLocationsWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.32557s 09-17-2019 @ 18:23:16 - Response Response code: 200 message: headers: Array ( [0] => HTTP/1.1 200 OK [Content-Type] => application/json [Square-Version] => 2019-08-14 [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:23:16 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 713 ) body: { "locations": [ { "id": "*****", "name": "*****", "address": { "address_line_1": "*****", "address_line_2": "*****", "locality": "*****", "administrative_district_level_1": "**", "postal_code": "*****", "country": "US" }, "timezone": "America\/Los_Angeles", "capabilities": [ "CREDIT_CARD_PROCESSING" ], "status": "ACTIVE", "created_at": "2015-08-10T14:32:03Z", "merchant_id": "*****", "country": "US", "language_code": "en-US", "currency": "USD", "phone_number": "+*****", "business_name": "*****", "type": "PHYSICAL", "business_hours": {}, "business_email": "*****", "coordinates": { "latitude": *****, "longitude": -***** } } ] } 09-17-2019 @ 18:49:14 - Disconnected due to invalid authorization 09-17-2019 @ 18:49:14 - Request Request method: uri: listCustomersWithHttpInfo user-agent: WooCommerce-Square/2.0.4 (WooCommerce/3.7.0; WordPress/5.2.3) headers: Array ( ) body: duration: 0.38345s 09-17-2019 @ 18:49:14 - Response Response code: 401 message: headers: Array ( [0] => HTTP/1.1 401 Unauthorized [Content-Type] => application/json [Vary] => Origin, Accept-Encoding [X-Content-Type-Options] => nosniff [X-Download-Options] => noopen [X-Frame-Options] => SAMEORIGIN [X-Permitted-Cross-Domain-Policies] => none [X-Xss-Protection] => 1; mode=block [Date] => Tue, 17 Sep 2019 18:49:14 GMT [keep-alive] => timeout=60 [Strict-Transport-Security] => max-age=631152000 [content-length] => 601 ) body: Array ( [errors] => Array ( [0] => stdClass Object ( [category] => AUTHENTICATION_ERROR [code] => UNAUTHORIZED [detail] => Your request did not include an <code>Authorization</code> http header with an access token. The header value is expected to be of the format "Bearer TOKEN" (without quotation marks), where TOKEN is to be replaced with your access token (e.g. "Bearer ABC123def456GHI789jkl0"). For more information, see https://docs.connect.squareup.com/api/connect/v2/#requestandresponseheaders. If you are seeing this error message while using one of our officially supported client libraries, please report this to [email protected]. ) ) )
After battling this for awhile, our connection has held for about a week now. Fingers crossed.
Hi both,
Thank you for your patience!
@bozzmedia, I’m glad to hear your site has stayed connected so far, keeping my fingers crossed it remains this way ??
@smhcis I can see the following error in the logs you’ve sent:
[category] => AUTHENTICATION_ERROR [code] => UNAUTHORIZED [detail] => Your request did not include an <code>Authorization</code> http header with an access token. The header value is expected to be of the format "Bearer TOKEN" (without quotation marks), where TOKEN is to be replaced with your access token (e.g. "Bearer ABC123def456GHI789jkl0"). For more information, see https://docs.connect.squareup.com/api/connect/v2/#requestandresponseheaders. If you are seeing this error message while using one of our officially supported client libraries, please report this to [email protected].
We've seen another case of the same error earlier this week, but we're unable to reproduce it so far on a clean site.
Can you please submit a support ticket at https://woocommerce.com/my-account/create-a-ticket/ and set up an admin account for [email protected] on the site? We'd like to see if we can find some patterns here.
Thanks a lot in advance!
2 weeks later and we are back to
Heads up! There may be a problem with your connection to Square. In order to continue accepting payments, please disconnect and re-connect your site.
I’m going to ignore this since reconnecting is not the smoothest operation. Hoping the developers find a fix for this pesky issue. Thanks!
Hi @bozzmedia,
Sorry to hear you’re still having troubles! Can you also submit a support ticket at https://woocommerce.com/my-account/create-a-ticket/ and add an admin account so we can check site logs, settings and connection history?
Please also include the system status report in your message.
Thank you!
I’ve already done this previously, I’ll reply to the last thread in my support ticket. Thanks
Hi, I thought my issue was resolved after I disconnected and then reconnected but today the issue reappeared. This time I turned on logging and did a disconnect/reconnect and this is what was in the log…
2019-11-04T20:47:01+00:00 CRITICAL Uncaught Error: Class ‘ActionScheduler_Compatibility’ not found in /home/mncofcom/mimoni.com.au/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_QueueRunner.php:53
Stack trace:
#0 /home/mncofcom/mimoni.com.au/wp-includes/class-wp-hook.php(286): ActionScheduler_QueueRunner->run()
#1 /home/mncofcom/mimoni.com.au/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
#2 /home/mncofcom/mimoni.com.au/wp-includes/plugin.php(531): WP_Hook->do_action(Array)
#3 /home/mncofcom/mimoni.com.au/wp-cron.php(133): do_action_ref_array(‘action_schedule…’, Array)
#4 {main}
thrown in /home/mncofcom/mimoni.com.au/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_QueueRunner.php on line 53Not sure what to do re this error, have not seen anyone else post something similar
Any help appreciated ??
I’m having this issue. Stays connected about a month, but then requires re-connect. Help is appreciated.
1) Business Names match.
2) I do have this fatal error, though the site disconnected today and this error is from Oct 31:
2019-10-31T20:32:41+00:00 CRITICAL Uncaught Error: Call to a member function getCursor() on null in /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/includes/Sync/Interval_Polling.php:156
Stack trace:
#0 /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/includes/Sync/Stepped_Job.php(114): WooCommerce\Square\Sync\Interval_Polling->update_product_data()
#1 /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/includes/Sync/Stepped_Job.php(55): WooCommerce\Square\Sync\Stepped_Job->do_next_step()
#2 /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/includes/Handlers/Background_Job.php(172): WooCommerce\Square\Sync\Stepped_Job->run()
#3 /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/includes/Handlers/Background_Job.php(123): WooCommerce\Square\Handlers\Background_Job->process_job(Object(WooCommerce\Square\Sync\Interval_Polling))
#4 /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/vendor/s in /home2/mypocke8/public_html/crawlspace/wp-content/plugins/woocommerce-square/includes/Sync/Interval_Polling.php on line 156- This reply was modified 5 years ago by Daniel Proczko.
I’ve been (frustratingly) dealing with this for several months. It appears they can’t fix the problem.
FWIW, in my support thread the devs seem to believe the latest version resolves this issue. What I have found is square IS still connected despite the notifications. I have gone through disconnecting and reconnecting so many times that I can’t bare to do it again without absolute certainty.
Same issue. The Square account info and the information in the WooCommerce settings match. Latest versions of all plugins and WordPress… Just ignoring the message for now as it looks as though it IS connected. I created my own fork of the plugin that I plan on mainting for myself to try and fix this and to add other features, like scheduling products to be published on a future date from when they are synced from Square in order to give foot traffic of the physical store priority over the online store since this isn’t possible with the hooks they make available to devs/theme builders.
It happened to me more than one time and many payments were unsuccessful! ??
How can at least ‘trigger’ it, so I can send an email to me when it will happen and re-connect my square account (business location) manually???
Is it possible checking logs or are there any triggers??
- The topic ‘Square will not stay connected’ is closed to new replies.