Closed necccc closed 3 years ago
I was hitting something similar (using version 1.7.0
). I'm not using ~/.bluemix/cos_credentials
like the docs say, I'm instead loading credentials and configuration via a config.js file in my app and the values come from environment variables. I was getting the same error until I actually had the credentials set in the environment.
Reading the docs on https://ibm.github.io/ibm-cos-sdk-js/AWS/Credentials.html it says:
Note that this class typically does not need to be constructed manually, as the AWS.Config and AWS.Service classes both accept simple options hashes with the three keys. These structures will be converted into Credentials objects automatically.
So I guess part of the bug is it fails to find the credentials so the Credentials
object doesn't get created and then eventually there is a null TypeError. Why it's not finding ~/.bluemix/cos_credentials
like the docs say to use, I don't know, but if it doesn't find credentials it should also avoid a TypeError and give a better error message.
We are looking into this issue. It is being tracked as a defect internally.
I have the same problem, but it runs on my local , but not in Openshift on cloud (same issue as above). it's not even json, it's a standard js object
ps if it might help :: i changed accessKeyId to apiKeyId and it worked just those 3 i needed
apiKeyId endpoint serviceInstanceId
Since we are tracking this issue internally, we plan to close this issue in one week.
Following the instructions in the docs, I've created a
~/.bluemix/cos_credentials
file, and saved my service credential there from what the COS generated:If I try to run a simple query, it results in a JS error