Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe JS error when address with no shipping options is selected #9593

Open
asumaran opened this issue Oct 18, 2024 · 9 comments
Open

Stripe JS error when address with no shipping options is selected #9593

asumaran opened this issue Oct 18, 2024 · 9 comments
Labels
focus: checkout payments priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@asumaran
Copy link
Contributor

Describe the bug

An error is displayed in the browser console after an address without defined shipping options is selected from the payment sheet.

To Reproduce

To reproduce the error, you need to have shipping options defined for a country, for example, the USA.
And you need to have an address from another country in your Google Pay or Apple Pay account, for example, Peru.

  1. Add a product that requires shipping to the cart.
  2. Go to the cart page.
  3. Click the Google Pay or Apple Pay button.
  4. Select the address that doesn’t have shipping options, in this case, an address from Peru.
  5. Close the payment sheet and refresh the page.
  6. Click the Google Pay or Apple Pay button.

Actual behavior

Notice that the payment sheet doesn’t appear, and the following error is displayed in the browser console:

v3/?ver=3.0:1 Uncaught (in promise) IntegrationError: When `shippingAddressRequired` is true, you must specify `shippingRates`.
    at H (v3/?ver=3.0:1:40043)
    at v3/?ver=3.0:1:361350
    at v3/?ver=3.0:1:354353

Screenshots

Image

Expected behavior

The payment sheet should appear again and the order should be processed without issues.

@asumaran
Copy link
Contributor Author

Originally reported here.

Notice that the issue goes away if we go to the checkout page and change the shipping address to an address from country with shipping options defined.

@pierorocca pierorocca added the priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. label Oct 31, 2024
@leccyril
Copy link

hi,

i had exactly same issue with stripeplugin then with boxtal or packlink plugin delivery, i have delivery options and delivery adress is set.... so i could just not use apple pay nor google any quick fix ?

@asumaran
Copy link
Contributor Author

@leccyril do you have a link where we can have a look?

@leccyril
Copy link

https://blackedition-gold.com/

for adresse choose France country
then zipcode like 57700
city Hayange

as you can see shipping method is present, even pickup on shop is available

Image
Image

@asumaran
Copy link
Contributor Author

@leccyril in your case the product seems to require shipping but you set your product as virtual? Even your checkout page is not asking for a shipping address only a billing address.

Otherwise If you product doesn't require a shipping address try setting up the product as virtual.

@asumaran
Copy link
Contributor Author

@leccyril I see that your product requires shipping. Do you have set up shipping options for France? Try setting up a global shipping option to discard a problem with shipping options.

@leccyril
Copy link

leccyril commented Nov 21, 2024

No it is classic product (perfume) not virtual , not downloadable, by default delivery adress same as invoicing

Image
Image

We only check if delivery address is different than invoicing

And yes shipping option is here

Image

you can see 3 different type with one pickup in shop

thank you for your help

here the global shipping set for europa

Image

with 3 expedition mode
Image

@ethanclevenger91
Copy link

Also encountering this error. To reproduce:

  1. Visit https://rosehillsourdough.com/product/the-breadmat/ in Safari
  2. Add either variant of the mat to your cart
  3. Visit checkout
  4. Do not fill in the checkout form.
  5. Use the "Apple Pay" button at the top of the page
  6. Encounter a loading animation that doesn't go away
  7. See same Stripe error noted by original reporter in console

System status report:

System Status Report
### WordPress Environment ###

WordPress address (URL): [Redacted]
Site address (URL): [Redacted]
WC Version: 9.4.2
Legacy REST API Package Version: ✔ 1.0.4
Action Scheduler Version: ✔ 3.8.2
Log Directory Writable: ✔
WP Version: ❌ 6.7 - There is a newer version of WordPress available (6.7.1)
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en
External object cache: –

### Server Environment ###

Server Info: nginx/1.25.5
PHP Version: 8.2.25
PHP Post Max Size: 128 MB
PHP Time Limit: 300
PHP Max Input Vars: 10000
cURL Version: 7.68.0
OpenSSL/1.1.1f

SUHOSIN Installed: –
MySQL Version: 10.11.8-MariaDB-ubu2004
Max Upload Size: 128 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

### Database ###

[REDACTED]

### Post Type Counts ###

attachment: 217
custom_css: 1
customize_changeset: 1
ebook: 1
ebook_order: 144
feedback: 79
nav_menu_item: 7
page: 31
post: 236
ppdgorder: 26
product: 50
product_variation: 27
revision: 176
shop_coupon: 191
shop_order: 21681
shop_order_refund: 178
wcs_ruleset: 9
wp_global_styles: 1
wp_navigation: 1
wpautoterms_page: 2
wpcode: 2

### Security ###

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

### Active Plugins (30) ###

Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.3
WP Offload Media: by Delicious Brains – 3.2.9
WP AutoTerms: by WP AutoTerms – 2.5.1
Conditional Shipping for WooCommerce: by Lauri Karisola / WP Trio – 3.3.0
CookieYes | GDPR Cookie Consent: by CookieYes – 3.2.7
Site Kit by Google: by Google – 1.139.0
Jetpack VaultPress Backup: by Automattic - Jetpack Backup team – 2.9
Jetpack: by Automattic – 13.9.1
Limit Login Attempts Reloaded: by Limit Login Attempts Reloaded – 2.26.16
Mailchimp for WooCommerce: by Mailchimp – 4.4.1
Mailgun: by Mailgun – 2.1.1
Redirection: by John Godley – 5.5.0
Rosehill Sourdough Core: by Sterner Stuff –
Stream: by XWP – 4.0.2
Two Factor: by Plugin Contributors – 0.9.1
Advanced Order Export For WooCommerce: by AlgolPlus – 3.5.6
WooCommerce Advanced Notifications: by WooCommerce – 1.4.8
WooCommerce Gift Cards: by Woo – 2.1.0
WooCommerce Legacy REST API: by WooCommerce – 1.0.4
WooPayments: by WooCommerce – 8.5.0
WooCommerce PayPal Payments: by WooCommerce – 2.9.4
WooCommerce Product Bundles: by Woo – 8.1.2
WooCommerce Shipping & Tax: by WooCommerce – 2.8.3
WooCommerce Shipment Tracking: by WooCommerce – 2.5.2
WooCommerce - ShipStation Integration: by WooCommerce – 4.4.5
WooCommerce URL Coupons: by SkyVerge – 2.16.0
WooCommerce: by Automattic – 9.4.2
WP Migrate: by WP Engine – 2.7.0
WP Rocket: by WP Media – 3.17.2.1
YouTube WordPress Plugin by Embed Plus: by Embed Plus YouTube Plugin Team – 14.2.1.2

### Inactive Plugins (4) ###

Address Autocomplete for WooCommerce: by Addify – 1.0.3
TinyPNG - JPEG, PNG & WebP image compression: by TinyPNG – 3.4.4
Wordfence Security: by Wordfence – 7.11.7
Zero Spam for WordPress: by Highfivery LLC – 5.5.7

### Dropin Plugins () ###

advanced-cache.php: advanced-cache.php

### Must Use Plugins (1) ###

Bedrock Autoloader: by Roots – 1.0.3

### Settings ###

Legacy API Enabled: ✔
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 0
Taxonomies: Product Types: bundle (bundle)
external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: ✔
Enforce Approved Product Download Directories: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –

### Logging ###

Enabled: ✔
Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
Retention period: 30 days
Level threshold: –
Log directory size: 29 MB

### WC Pages ###

Shop base: #463 - /shop/
Cart: #464 - /cart/ -  Contains the woocommerce/cart block
Checkout: #465 - /checkout/ -  Contains the woocommerce/checkout block
My account: #466 - /my-account/
Terms and conditions: #4132 - /wpautoterms/terms-and-conditions/

### Theme ###

Name: Storefront
Version: 4.6.0
Author URL: https://woocommerce.com/
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔

### Templates ###

Overrides: –

### WooPayments ###

Version: 8.5.0
Connected to WPCOM: Yes
WPCOM Blog ID: 173279375
Account ID: acct_1Ke2Fk2EobDiPCLR
Payment Gateway: Enabled
Test Mode: Disabled
Enabled APMs: card,sepa_debit,ideal,bancontact,eps,p24
WooPay: Disabled
WooPay Incompatible Extensions: No
Apple Pay / Google Pay: Enabled (product,cart,checkout)
Fraud Protection Level: basic
Multi-currency: Enabled
Auth and Capture: Enabled
Documents: Disabled
Logging: Enabled

### Gift Cards ###

Database Version: 2.1.0
Loopback Test: ✔
Task Queueing Test: ✔

### Product Bundles ###

Database Version: 8.1.2
Loopback Test: ✔
Template Overrides: –

### WooCommerce PayPal Payments ###

Onboarded: ✔
Shop country code: US
WooCommerce currency supported: ✔
Advanced Card Processing available in country: ✔
Pay Later messaging available in country: ✔
Webhook status: ✔
PayPal Vault enabled: –
ACDC Vault enabled: –
Logging enabled: –
Reference Transactions: –
Used PayPal Checkout plugin: ✔
Subscriptions Mode: Disabled
PayPal Shipping Callback: –
Apple Pay: –
Google Pay: –
Fastlane: –

### Admin ###

Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customize-store
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
pattern-toolkit-full-composability
product-custom-fields
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
printful
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
launch-your-store

Disabled Features: product-data-views
experimental-blocks
minified-js
product-pre-publish-modal
settings
async-product-editor-category-field
product-editor-template-system
blueprint
reactify-classic-payments-settings
use-wp-horizon

Daily Cron: ✔ Next scheduled: 2024-11-26 18:45:15 -08:00
Options: ✔
Notes: 199
Onboarding: completed

### Action Scheduler ###

Canceled: 325
Oldest: 2024-10-25 13:22:09 -0700
Newest: 2024-11-25 10:33:10 -0800

Complete: 10,806
Oldest: 2024-10-25 13:19:54 -0700
Newest: 2024-11-25 12:13:45 -0800

Failed: 2,246
Oldest: 2022-08-18 07:46:11 -0700
Newest: 2024-10-08 12:39:12 -0700

Pending: 1
Oldest: 2024-11-25 18:58:43 -0800
Newest: 2024-11-25 18:58:43 -0800


### Status report information ###

Generated at: 2024-11-25 12:16:25 -08:00

@asumaran
Copy link
Contributor Author

Similar issue: #9939 this time caused by the option "Hide shipping costs until an address is entered" in WooCommerce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: checkout payments priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

5 participants