woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
267 stars 133 forks source link

`An error occured` when trying to log in #10707

Open wzieba opened 5 months ago

wzieba commented 5 months ago

Describe the bug When trying to log in, I get An error occured toast message on production in version 17.1. My suspicious is maybe out of date WooCommerce version (I use

To Reproduce Steps to reproduce the behavior:

  1. Go to Log in
  2. Type blog address
  3. Tap continue
  4. Tap random mail (I want to login by username&password)
  5. Type valid username & password
  6. See the An error occured error

Screenshots

https://github.com/woocommerce/woocommerce-android/assets/5845095/cbcfd962-ab12-40d9-9755-b1c6bd7b6437

Expected behavior I am able to login or the error message clarifies the problem.

Isolating the problem (mark completed items with an [x]):

Mobile Environment Please include:

Android stacktrace (from recent trunk):

``` 024-02-07 15:56:04.907 16142-16349 Volley com.woocommerce.android.dev E [504] NetworkUtility.shouldRetryException: Unexpected response code 400 for https://wordpress.com/wp-login.php?action=login-endpoint 2024-02-07 15:56:04.908 16142-16142 WordPress-API com.woocommerce.android.dev E Authentication error 2024-02-07 15:56:04.911 16142-16142 WordPress-API com.woocommerce.android.dev E No value for error_description org.json.JSONException: No value for error_description at org.json.JSONObject.get(JSONObject.java:398) at org.json.JSONObject.getString(JSONObject.java:559) at org.wordpress.android.fluxc.network.rest.wpcom.auth.Authenticator.volleyErrorToErrorMessage(Authenticator.java:371) at org.wordpress.android.fluxc.store.AccountStore.handleAuthError(AccountStore.java:1375) at org.wordpress.android.fluxc.store.AccountStore.$r8$lambda$9CqiUl1UxTWg-HPqHwpDiUNqr84(Unknown Source:0) at org.wordpress.android.fluxc.store.AccountStore$$ExternalSyntheticLambda3.onErrorResponse(Unknown Source:2) at com.android.volley.Request.deliverError(Request.java:648) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:104) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 2024-02-07 15:56:04.915 16142-16142 WordPress-API com.woocommerce.android.dev E Login with username/pass onAuthenticationChanged has error: GENERIC_ERROR - null ```

WordPress Environment

``` ` ### WordPress Environment ### WordPress address (URL): https://wziebatests.mystagingwebsite.com Site address (URL): https://wziebatests.mystagingwebsite.com WC Version: 8.5.2 REST API Version: ✔ 8.5.2 WC Blocks Version: ✔ 11.8.0-dev Action Scheduler Version: ✔ 3.7.1 Log Directory Writable: ✔ WP Version: 6.4.3 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: ✔ ### Server Environment ### Server Info: nginx PHP Version: 8.1.27 PHP Post Max Size: 2 GB PHP Time Limit: 1200 PHP Max Input Vars: 6144 cURL Version: 8.4.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 10.4.31-MariaDB-log Max Upload Size: 2 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 7.6.0 WC Database Prefix: wp_ Total Database Size: 58.34MB Database Data Size: 28.73MB Database Index Size: 29.61MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.08MB + Index: 0.13MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.38MB + Index: 0.14MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 3.52MB + Index: 5.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB fakenames: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.05MB + Index: 0.16MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_aiowps_debug_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_failed_logins: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_aiowps_global_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_login_activity: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_aiowps_login_lockdown: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_aiowps_permanent_block: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 1.52MB + Index: 0.59MB + Engine InnoDB wp_jetpack_sync_queue: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 0.38MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 11.52MB + Index: 16.03MB + Engine InnoDB wp_posts: Data: 2.52MB + Index: 2.23MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 1.52MB + Index: 1.94MB + Engine InnoDB wp_users: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.11MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.09MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.09MB + Index: 0.06MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_order_composite_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 1.52MB + Index: 0.70MB + Engine InnoDB wp_wc_order_stats: Data: 0.19MB + Index: 0.17MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points: Data: 0.08MB + Index: 0.09MB + Engine InnoDB wp_wc_points_rewards_user_points_log: Data: 0.09MB + Index: 0.08MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 1.52MB + Index: 0.88MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_gc_activity: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_gc_cards: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_gc_cardsmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 42 global_product_addon: 1 page: 7 post: 4 product: 120 product_variation: 5516 revision: 5 shop_coupon: 1 shop_order: 1336 shop_order_refund: 3 shop_subscription: 3 wp_global_styles: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (10) ### Jetpack: by Automattic – 13.1.1 WooCommerce Smooth Generator: by Automattic – 1.0.4 WooCommerce Composite Products: by WooCommerce – 8.7.6 (update to version 8.10.5 is available) WooCommerce Gift Cards: by WooCommerce – 1.15.3 (update to version 1.16.9 is available) WooCommerce Min/Max Quantities: by WooCommerce – 4.0.7 (update to version 4.1.4 is available) WooCommerce Payments: by Automattic – 5.6.4 (update to version 7.1.0 is available) WooCommerce Product Bundles: by WooCommerce – 6.18.5 (update to version 6.22.6 is available) WooCommerce Shipping & Tax: by WooCommerce – 2.4.2 WooCommerce Subscriptions: by WooCommerce – 4.5.1 (update to version 5.9.1 is available) WooCommerce: by Automattic – 8.5.2 ### Inactive Plugins (12) ### Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.1 All In One WP Security: by All In One WP Security & Firewall Team – 5.1.0 Content Visibility User Role: by Richard Tape – 0.1.3 Order Simulator for WooCommerce: by 75nineteen Media LLC – 1.0.2 Pressable Maintenance Mode: by Pressable – 1.0.3 WCS staging: by mb – 1.0 WooCommerce Payments Dev Tools: by Automattic – WooCommerce Points and Rewards: by WooCommerce – 1.7.15 (update to version 1.7.48 is available) WooCommerce Product Add-ons: by WooCommerce – 4.1.0 (update to version 6.6.0 is available) WooCommerce Stripe Gateway: by WooCommerce – 6.9.3 WP Console: by Edi Amin – 2.3.1 WPC Product Quantity for WooCommerce: by WPClever – 4.0.5 ### Dropin Plugins (2) ### advanced-cache.php: advanced-cache.php object-cache.php: Memcached ### Settings ### API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: bundle (bundle) composite (composite) 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 Woo.com: ✔ Enforce Approved Product Download Directories: – HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – ### WC Pages ### Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Twenty Twenty Version: 2.5 Author URL: https://wordpress.org/ 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: – ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://wziebatests.mystagingwebsite.com Subscription Statuses: wc-on-hold: 1 wc-cancelled: 2 WooCommerce Account Connected: ✔ Yes Active Product Key: ❌ No Report Cache Enabled: ✔ Yes Cache Update Failures: ✔ 0 failure ### Store Setup ### Country / State: United States (US) — California ### Payment Gateway Support ### Direct bank transfer: products Check payments: products Cash on delivery: products PayPal Standard: subscriptions gateway_scheduled_payments subscription_payment_method_change_customer subscription_cancellation subscription_suspension subscription_reactivation products refunds PayPal Reference Transactions Enabled: ❌ No ### Composite Products ### Database Version: 8.7.6 Loopback Test: ✔ Template Overrides: – ### Gift Cards ### Database Version: 1.15.3 Loopback Test: – Task Queueing Test: ✔ ### Product Bundles ### Database Version: 6.18.5 Loopback Test: – Template Overrides: – ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler 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 product-variation-management product-virtual-downloadable product-external-affiliate product-grouped remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: customize-store minified-js new-product-management-experience product-linked settings async-product-editor-category-field Daily Cron: ✔ Next scheduled: 2024-02-08 12:38:26 +00:00 Options: ✔ Notes: 195 Onboarding: completed ### WooCommerce Payments ### Version: 5.6.4 Connected to WPCOM: Yes Blog ID: 188815699 Account ID: - ### Action Scheduler ### Complete: 51 Oldest: 2024-01-08 08:23:24 +0000 Newest: 2024-02-07 15:10:09 +0000 Failed: 4 Oldest: 2022-11-17 17:47:29 +0000 Newest: 2023-03-30 10:47:47 +0000 Pending: 1 Oldest: 2024-02-07 21:04:43 +0000 Newest: 2024-02-07 21:04:43 +0000 ### Status report information ### Generated at: 2024-02-07 15:10:15 +00:00 ```
BandaraBuy commented 2 months ago

I have same issue need a fix for this

BandaraBuy commented 2 months ago

@wzieba how did you get fix this issue?

metalliclimited commented 1 month ago

same issue, still trying to solve it

ChrisPVille commented 1 month ago

Yeah, same issue here. I'm using 2FA without a wordpress.com account, so I was taken down the alternate app authorization route. The first and all subsequent logins fail with the extremely descriptive "an error occured". On android 14 and app version 18.7

BandaraBuy commented 1 month ago

I got fix this issue after install jetpack plugin