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
COS-interacting script never exits #28
Comments
This only happens with IAM auth. With hmac, the promise finishes correctly. I'm looking into the cause of this. |
I am seeing this too... |
Looks like it's the preemptive IAM token refresh code: https://github.com/IBM/ibm-cos-sdk-js/blob/master/lib/iam/token_manager.js#L381 |
We're looking into some fixes. For now it looks like the workaround is to call e.g.: // es5
doCreateBucket()
.then((res) => console.log('Response: ' + util.inspect(res)))
.catch((err) => console.log('An exception occurred: ' + util.inspect(err)))
.then(() => process.exit(0)); or // es6
try {
const res = await doCreateBucket();
console.log(`Response: ${res}`);
} catch (err) {
console.log(`An exception occurred: ${err}`);
}
console.log('done');
process.exit(0); |
Same story here... |
This is resolved in release 1.3.1. |
Hello,
I run the following code and the script never finishes (does not return back to shell):
Console output:
So... What's wrong with it?
The text was updated successfully, but these errors were encountered: