xero-node icon indicating copy to clipboard operation
xero-node copied to clipboard

Hanging when calling initialize

Open JakeCoxon opened this issue 1 year ago • 3 comments

SDK you're using (please complete the following information):

  • Version 4.32.0

Describe the bug await xero.initialize() hangs and never recovers. I tracked it down to the call to got inside openid-client. I can verify this by manually calling the following code using the same version [email protected] that xero-node uses

const openId = await got({
  method: 'GET',
  responseType: 'json',
  url: 'https://identity.xero.com/.well-known/openid-configuration',
});

I can see that the request returns status 200 but reading the response from the stream hangs. Fetching the URL using node-fetch returns the expected response.

got seems to have problems when reading from cache. Presumably this is in combination with something on my machine since I assume many people would be reporting this bug otherwise.

Anyway [email protected] doesn't use got and I can verify that that works fine for me

await Issuer.discover('https://identity.xero.com');

So upgrading to [email protected] should solve this issue

JakeCoxon avatar Apr 03 '23 08:04 JakeCoxon

PETOSS-293

github-actions[bot] avatar Apr 03 '23 08:04 github-actions[bot]

Thanks for raising an issue, a ticket has been created to track your request

github-actions[bot] avatar Apr 03 '23 08:04 github-actions[bot]

Hey @JakeCoxon i have tried calling await xero.initialize() and it is printing the response and not hanging on my end.

i have on the latest version of xero node @5.0.1.

could you please be on the latest xero-node version and let us know if the xero.initialize() call is still failing?

sangeet-joy-tw avatar Feb 13 '24 13:02 sangeet-joy-tw

I have the same hanging issue, but am attempting to run via bun.

It looks like there's an issue with the version of openid-client being used in xero-node.

Are there any plans on the roadmap to upgrade openid-client in xero-node to the latest (currently 5.6.5)?

STEVEOO6 avatar Apr 25 '24 13:04 STEVEOO6