zapier / zapier-platform

The SDK for you to build an integration on Zapier
https://platform.zapier.com
Other
344 stars 188 forks source link

[Bug]: {{curlies}} sometimes not resolved #859

Open the-csaba opened 1 month ago

the-csaba commented 1 month ago

Bug Description

Stumbled upon the following error during customer support:

Unhandled error: TypeError: Only absolute URLs are supported
What happened:
  Starting OPTIONS request to {{bundle.authData.domain}}/::redacted::
  Only absolute URLs are supported
TypeError: Only absolute URLs are supported
    at getNodeRequestOptions (/var/task/node_modules/node-fetch/lib/index.js:1327:9)
    at /var/task/node_modules/node-fetch/lib/index.js:1440:19
    at new Promise (<anonymous>)
    at fetch (/var/task/node_modules/node-fetch/lib/index.js:1437:9)
    at newFetch (/var/task/node_modules/zapier-platform-core/src/tools/fetch.js:58:27)
    at request (/var/task/node_modules/zapier-platform-core/src/tools/request-client.js:26:10)
    at Object.<anonymous> (/var/task/node_modules/zapier-platform-core/src/middleware.js:90:22)
    at bound (node:domain:433:15)
    at Object.runBound (node:domain:444:12)
    at Object.tryCatcher (/var/task/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/var/task/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/var/task/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/var/task/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/var/task/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/var/task/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/var/task/node_modules/bluebird/js/release/async.js:102:5)
    at Async.drainQueues (/var/task/node_modules/bluebird/js/release/async.js:15:14)
    at process.processImmediate (node:internal/timers:476:21)
    at process.topLevelDomainCallback (node:domain:161:15)
    at process.callbackTrampoline (node:internal/async_hooks:126:24)

Reproduction Steps

The error logged in production. It is not consistent, but I can see it multiple times, for example:

All of these happened with the latest production version, which is 2.9.3.

Zapier Platform version

15.11.1

Node.js version

N/A

Your Operating System

N/A

npm/yarn version

N/A

App ID

67372

More Details

This the WooCommerce integration.

Looks like #362 came back and haunt us again