You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.
With platform 7.6.1 and earlier our OAuth responses worked fine, but after upgrading our app to 8.0.1 or 8.1.0 the OAuth response is not parsed as before, and the connection attempt fails.
This means that no new users can set up zaps.
Existing users (with a refresh token) continue to work fine.
It is only when Connect an Account is opened that the login process runs, and this used to result in a valid access and refresh token.
module.exports={type: 'oauth2',oauth2Config: {// Step 1 of the OAuth flow; specify where to send the user to authenticate with your API.// Zapier generates the state and redirect_uri, you are responsible for providing the rest.// Note: can also be a function that returns a stringauthorizeUrl: {method: 'GET',url: '{{process.env.BASE_URL}}/oauth/authorize',params: {client_id: '{{process.env.CLIENT_ID}}',state: '{{bundle.inputData.state}}',redirect_uri: '{{bundle.inputData.redirect_uri}}',response_type: 'code',response_mode: 'query',scope: 'openid'}},// Step 2 of the OAuth flow; Exchange a code for an access token.// This could also use the request shorthand.getAccessToken: getAccessToken,refreshAccessToken: refreshAccessToken,autoRefresh: true,scope: 'openid'},
results in
Tests that work fine under 7.6.1 fail under 8.1.0 with the following
Unhandled rejection TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
at Function.from (buffer.js:232:9)
at _.reduce (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-logger.js:114:21)
at arrayReduce (D:\Git\Apps\ZapierApp\node_modules\lodash\lodash.js:683:21)
at Function.reduce (D:\Git\Apps\ZapierApp\node_modules\lodash\lodash.js:9683:14)
at makeSensitiveBank (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-logger.js:105:12)
at sendLog (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-logger.js:129:25)
at logErrorAndCallbackOnce (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-lambda-handler.js:173:7)
at loadApp.then.then.catch.err (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-lambda-handler.js:217:11)
at bound (domain.js:395:14)
at runBound (domain.js:408:12)
From previous event:
at Domain.handlerDomain.run (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-lambda-handler.js:213:15)
at Domain.run (domain.js:342:14)
at handler (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-lambda-handler.js:192:19)
at ZapierPromise (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-app-tester.js:27:7)
From previous event:
at event (D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-app-tester.js:26:12)
at D:\Git\Apps\ZapierApp\node_modules\zapier-platform-core\src\tools\create-app-tester.js:70:12
at Context.it (D:\Git\Apps\ZapierApp\test\mock\authentication.js:210:9)
at callFnAsync (D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runnable.js:400:21)
at Test.Runnable.run (D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runnable.js:342:7)
at Runner.runTest (D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runner.js:455:10)
at D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runner.js:573:12
at next (D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runner.js:369:14)
at D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runner.js:379:7
at next (D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runner.js:303:14)
at Immediate.<anonymous> (D:\Git\Apps\ZapierApp\node_modules\mocha\lib\runner.js:347:5)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:120:23)
@xt1 thanks for reporting, I think I see where we added the bug. We'll get that taken care of.
In the meantime, you should be able to re-promote an older version of the app that worked as expected. That way, users won't notice an issue. Thanks for your patience here!
With platform 7.6.1 and earlier our OAuth responses worked fine, but after upgrading our app to 8.0.1 or 8.1.0 the OAuth response is not parsed as before, and the connection attempt fails.
This means that no new users can set up zaps.
Existing users (with a refresh token) continue to work fine.
It is only when
Connect an Account
is opened that the login process runs, and this used to result in a valid access and refresh token.results in
Tests that work fine under 7.6.1 fail under 8.1.0 with the following
Test source:
What would you like to change?
The OAuth handler should continue to handle responses as before (in platform 7.x)
Your Environment
zapier -v
): zapier-platform-cli/8.1.0 zapier-platform-core/8.1.0 node/v10.15.3The text was updated successfully, but these errors were encountered: