question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error TimeoutOverflowWarning: xxxxx does not fit into a 32-bit signed integer when using ManagedIdentityCredential for ServiceBusClient

See original GitHub issue
  • Package Name: @azure/service-bus
  • Package Version: 7.7.3
  • Operating system: Azure Function Windows
  • nodejs
    • version: ~16
  • browser
    • name/version: -
  • typescript
    • version: -
  • Is the bug related to documentation in

Describe the bug Using ManagedIdentityCredential to create ServiceBusClient, when receiving messages, keep getting:

(node:21960) TimeoutOverflowWarning: 1669616210777 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.

Possible cause: The expiry time of Managed Identity token is 24h by default. It is used in calculation at source code: this._tokenTimeout = tokenObject.expiresOnTimestamp - Date.now() - 2 * 60 * 1000; Then I’m not pretty sure where but it is probably used to ‘setTimeout’ for refreshing token and issue comes.

To Reproduce Steps to reproduce the behavior:

  1. create node js code
const credential = new ManagedIdentityCredential('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx');
const sbClient = new ServiceBusClient('xxxxx.servicebus.windows.net', credential);
const receiver = sbClient.createReceiver(TOPIC_NAME, SUBSCRIPTION_NAME);
const messages = await receiver.receiveMessages(5);
  1. deploy to azure function so that managed identity credential can work

Expected behavior Should be working fine without errors/warnings.

Screenshots image

Additional context please consider to handle the case that token expiry time is longer than 24h

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
cloudxpccommented, Dec 6, 2022

Hi, thanks for the fix! tried with @azure/identity 3.1.2 and issue seems gone.

1reaction
nwf-msrcommented, Dec 6, 2022

Thanks! Testing with 3.1.2 and the warnings seem to be gone and the CPU seems to no longer be spinning. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

does not fit into a 32-bit signed integer" - General
Hello, My syslog is being filled with variations of the following error messages (this is just a short excerpt): (node:1215) TimeoutOverflowWarning: ...
Read more >
Azure Service Bus managed identity in Visual Studio ...
At the moment I'm just trying this locally. When I debug my code I get the following error. System.UnauthorizedAccessException: Put token failed ...
Read more >
azure-sdk-for-js
Error TimeoutOverflowWarning : xxxxx does not fit into a 32-bit signed integer when using ManagedIdentityCredential for ServiceBusClient. jrpedrianes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found