All of a sudden single execution is running multiple times.
Making Multiple Entries in MySQL Database, Multiple push in Gotify.
n8n version: 0.93.0
Gotify:
My Workflow:
jan
November 17, 2020, 11:28pm
2
Did you check in WooCommerce if there are for some reason multiple Webhook-Triggers? Because that is the only thing I can think of right now.
Possibly a bug in WooCommerce.
I have created an issue, Letβs see how it goes.
opened 05:27AM - 18 Nov 20 UTC
closed 08:16AM - 18 Nov 20 UTC
**Prerequisites (mark completed items with an [x]):**
- [x] I have have carried⦠out troubleshooting steps and I believe I have found a bug.
- [x] I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
**Describe the bug**
order.created webhook fired multiple times
**Expected behavior**
Fire only once when the order is created.
**Actual behavior**
All of sudden, Webhook fires multiple times like 10 - 15 times when the single order has been made.
**Steps to reproduce the bug (We need to be able to reproduce the bug in order to fix it.)**
Steps to reproduce the bug:
1. Setup webhook
2. Set order created webhook and place an order.
3. Monitor your automation provider logs
4. See error
**Screenshots**
This is the screenshot of my automation provider.
![image](https://user-images.githubusercontent.com/8493007/99487292-f7d42300-298b-11eb-8509-8da2351fb0d9.png)
**Isolating the problem (mark completed items with an [x]):**
- [x] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
- [] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
- [x] I can reproduce this bug consistently using the steps above.
**WordPress Environment**
We use the [WooCommerce System Status Report](https://docs.woocommerce.com/document/understanding-the-woocommerce-system-status-report/) to help us evaluate the issue.
Without this report we won't be able to fully evaluate this issue.
<details>
```
`
### WordPress Environment ###
WordPress address (URL):
Site address (URL):
WC Version: 4.7.0
REST API Version: β 4.7.0
WC Blocks Version: β 3.6.0
Action Scheduler Version: β 3.1.6
WC Admin Version: β 1.6.3
Log Directory Writable: β
WP Version: 5.5.3
WP Multisite: β
WP Memory Limit: 256 MB
WP Debug Mode: β
WP Cron: β
Language: en_US
External object cache: β
### Server Environment ###
Server Info: Apache/2.4.25 (Debian)
PHP Version: 7.4.12
PHP Post Max Size: 100 MB
PHP Time Limit: 600
PHP Max Input Vars: 2500
cURL Version: 7.52.1
OpenSSL/1.0.2u
SUHOSIN Installed: β
MySQL Version: 5.7.31-log
Max Upload Size: 100 MB
Default Timezone is UTC: β
fsockopen/cURL: β
SoapClient: β
DOMDocument: β
GZip: β
Multibyte String: β
Remote Post: β
Remote Get: β
### Database ###
WC Database Version: 4.7.0
WC Database Prefix: wp_
Total Database Size: 6.09MB
Database Data Size: 4.57MB
Database Index Size: 1.52MB
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.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.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
wp_actionscheduler_actions: Data: 0.05MB + Index: 0.11MB + 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_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 2.03MB + Index: 0.09MB + Engine InnoDB
wp_postmeta: Data: 1.52MB + Index: 0.11MB + Engine InnoDB
wp_posts: Data: 0.09MB + Index: 0.06MB + Engine InnoDB
wp_snippets: Data: 0.05MB + Index: 0.00MB + 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.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + 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
### Post Type Counts ###
attachment: 4
customize_changeset: 1
elementor_library: 3
gp_elements: 2
page: 7
post: 1
product: 2
revision: 87
shop_coupon: 4
shop_order: 7
### Security ###
Secure connection (HTTPS): β
Hide errors from visitors: β
### Active Plugins (11) ###
Personalizery: by MC Naveen β 1.0
Code Snippets: by Code Snippets Pro β 2.14.0
Elementor Pro: by Elementor.com β 2.9.5
Elementor: by Elementor.com β 2.9.9
Facebook for WooCommerce: by Facebook β 2.1.4 β Installed version not tested with active version of WooCommerce 4.7.0
GP Premium: by Tom Usborne β 1.11.2
Google Ads & Marketing by Kliken: by Kliken β 1.0.6 β Installed version not tested with active version of WooCommerce 4.7.0
Instamojo for WooCommerce: by instamojo β 1.0.7 β Installed version not tested with active version of WooCommerce 4.7.0
Checkout Manager for WooCommerce: by QuadLayers β 5.3.1 β Installed version not tested with active version of WooCommerce 4.7.0
WOOCS - WooCommerce Currency Switcher: by realmag777 β 1.3.3.2 β Installed version not tested with active version of WooCommerce 4.7.0
WooCommerce: by Automattic β 4.7.0
### Inactive Plugins (0) ###
### Settings ###
API Enabled: β
Force SSL: β
Currency: INR (βΉ)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
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: β
### WC Pages ###
Shop base: #7 - /store/
Cart: #8 - /cart/
Checkout: #9 - /checkout/
My account: #10 - /my-account/
Terms and conditions: β Page not set
### Theme ###
Name: GeneratePress
Version: 3.0.2
Author URL: https://tomusborne.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: β
### Action Scheduler ###
Complete: 76
Oldest: 2020-11-09 16:39:38 +0000
Newest: 2020-11-17 20:54:08 +0000
`
```
</details>
Will update this post too.
jan
November 18, 2020, 7:23am
4
Great thanks. But did you check if multiple webhook URLs are set in WooCommerce?
Because if there is only one webhook URL registered but it gets called multiple times it would be a WooCommerce bug. If there are multiple webhook URLs registered it would be an n8n bug.
@jan Iβm confused man.
Iβm using WooCommerce Trigger Node which uses Consumer Key, Consumer Secret, and URL.
But I never created a webhook inside WooCommerce Store.
So n8n will create a webhook inside WooCommerce with the credentials provided?
Why Iβm asking this because. I noticed the word βn8nβ inside the webhook tab of WooCommerce. (I removed everything, Yes. Multiple webhook)
jan
November 18, 2020, 7:50am
6
Yes exactly. That is how almost all the third-party Trigger-Nodes work. n8n takes automatically care of creating and deleting webhooks in the application if a workflow gets activated or deactivated.
Ah ok, so there were multiple ones. If you now deleted all of them and deactivate and reactivate your workflow it should create a new one. But only one. And then it should again just trigger just once.
What is the possible cause of multiple webhook being created and not getting deleted?
And what are the minimum server requirements you prefer for n8n?
Asking this because, This will affect and create any problem like this?
Update:
n8n is actually creating multiple webhook (duplicate)
1 Like
jan
November 18, 2020, 8:08am
9
Honestly not 100% sure. That should theoretically not happen.
Server specs should not matter here.
There is actually just one duplicate, not two. Only the last two ones have the same webhook-URL. So I guess the first one is for another workflow. n8n creates a webhook for each Trigger-Node you create in n8n.
We have to investigate why this is happening.
1 Like
@jan Issue Solved
Here is my mistake.
I set the Workflow to active state which created a new webhook
Then I executed the workflow which created one more webhook
This is the main cause of the issue. Itβs not related to WooCommerce nor n8n.
Thanks for your time. Everything works great.
1 Like
jan
November 18, 2020, 8:51am
11
Thanks a lot for this additional information! Is really helpful.
But would still be an n8n bug as it should no matter what accumulate multiple webhooks. I already created an internal ticket and we will look into it.
1 Like
@mcnaveen do you have a Woocommerce sandbox that I can use for testing? Fixed the issue but have not been able to test it.
1 Like
Sorry for the delay bro. Will send you in Private Message.
Update: Sent bro. @RicardoE105 Please check inbox
jan
November 20, 2020, 4:19pm
14
We just released [email protected] which should fix the bug.
1 Like
OMG, It was a surprise. Have this Watermelon