Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hanging when calling initialize #636

Closed
JakeCoxon opened this issue Apr 3, 2023 · 5 comments
Closed

Hanging when calling initialize #636

JakeCoxon opened this issue Apr 3, 2023 · 5 comments
Assignees

Comments

@JakeCoxon
Copy link

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

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

PETOSS-293

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

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

@sangeet-joy-tw sangeet-joy-tw self-assigned this Feb 12, 2024
@sangeet-joy-tw
Copy link
Contributor

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?

@STEVEOO6
Copy link

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)?

@sangeet-joy-tw
Copy link
Contributor

Hey @STEVEOO6 @JakeCoxon

We have upgraded the openid-client to its latest version in our new xero-node v7.0.0.

Could you please be on the latest xero-node version and let us know incase of any issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants