vscode-remote-workspace
                                
                                
                                
                                    vscode-remote-workspace copied to clipboard
                            
                            
                            
                        (CredentialsError) Missing credentials in config
I'm attempting to connect to one of my s3 buckets and I keep getting this in my debug log and I don't exactly know what it means:
Stack Trace
fs.s3.s3filesystem.forconnection() - [15/Oct/2018:22:02:10 +0000]
(CredentialsError) Missing credentials in config
	at vscode_helpers.createLogger (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\out\extension.js:131:64)
	at ActionLogger.<anonymous> (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:244:25)
	at Generator.next (<anonymous>)
	at C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:23:71
	at new Promise (<anonymous>)
	at __awaiter (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:19:12)
	at ActionLogger.onLog (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:226:16)
	at ActionLogger.<anonymous> (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:109:95)
	at Generator.next (<anonymous>)
	at C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:23:71
	at new Promise (<anonymous>)
	at __awaiter (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:19:12)
	at ActionLogger.log (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:102:16)
	at ActionLogger.logSync (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:123:14)
	at ActionLogger.trace (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\node_modules\vscode-helpers\lib\logging\index.js:146:21)
	at S3FileSystem.<anonymous> (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\out\fs\s3.js:133:22)
	at Generator.throw (<anonymous>)
	at rejected (C:\Users\ryan\.vscode-insiders\extensions\mkloubert.vscode-remote-workspace-0.34.0\out\fs\s3.js:21:65)
	at <anonymous>"
My credential_type is file and this (with keys removed) is what the file looks like:
{
    "accessKeyId": "___accessKeyId-HERE___",
    "secretAccessKey": "___secretAccessKey-HERE___",
    "sessionToken": "optional"
}
Does this mean that Remote Workspace can't find my JSON credential file, or it found the file but can't read the credentials?
Here's a little more information.
When I use shared (SharedIniFileCredentials), it works just fine. So the issue could be that Remote Workspace isn't finding my credentials JSON file. It can find my params file just fine, so that makes things a little more confusing.
Would it be possible to throw an error into the debug log if I give it a path to a file that doesn't exist?
I'm on Windows 10 if that helps.
@ryanjkelly
Since version 0.36.4, you should be able to use file credential type as described in the README.
On the other hand I have implemented an info logging that tells you the full path, which will be used for the credential file.
Thanks for the update @mkloubert!
I am seeing the logging I would expect if I pointed to a non-existent params file:
Workspace Settings (params file)
{
    "uri": "s3://file@ryansappstest?params=rw-params_fake.json",
    "name": "non-existent-params-file"
}
RW Log (params file)
TRACE fs.s3.s3filesystem.forconnection() - [22/Oct/2018:17:09:21 +0000] "(Error) ENOENT: no such file or directory, open 'C:\Users\ryan\rw-params_fake.json'
..but if I provide a non-existent credentials file, I will still get:
(CredentialsError) Missing credentials in config
Workspace Settings (non-existent credentials file)
{
    "uri": "s3://file@ryansappstest/?file=aws_fake.json",
    "name": "non-existent-credentials-file"
}
RW Log (non-existent credentials file)
TRACE fs.s3.s3filesystem.forconnection() - [22/Oct/2018:17:09:21 +0000] "(CredentialsError) Missing credentials in config
Then, if I point to a known existing credentials file and turn on debug mode, I get this:
Workspace Settings (existing credentials file)
{
    "uri": "s3://file@ryansappstest/?file=aws.json&debug=1",
    "name": "existing-credentials-file"
}
RW Log (existing credentials file)
[AWS s3 undefined 0s 0 retries]
listObjectsV2({
  Bucket: 'ryansappstest',
  ContinuationToken: undefined,
  Prefix: ''
})
TRACE fs.s3.s3filesystem.forconnection() - [22/Oct/2018:17:24:20 +0000] "(CredentialsError) Missing credentials in config
Also, I'm on version 0.36.5 of Remote Workspace and this is what my INFO logging looks like:
INFO s3 - [22/Oct/2018:17:33:50 +0000] "["
INFO s3 - [22/Oct/2018:17:33:50 +0000] "A"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "W"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "S"
INFO s3 - [22/Oct/2018:17:33:50 +0000] " "
INFO s3 - [22/Oct/2018:17:33:50 +0000] "s"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "3"
INFO s3 - [22/Oct/2018:17:33:50 +0000] " "
INFO s3 - [22/Oct/2018:17:33:50 +0000] "u"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "n"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "d"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "e"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "f"
INFO s3 - [22/Oct/2018:17:33:50 +0000] "i"
INFO s3 - [22/Oct/2018:17:33:51 +0000] "n"
INFO s3 - [22/Oct/2018:17:33:51 +0000] "e"
INFO s3 - [22/Oct/2018:17:33:51 +0000] "d"
I think that RW might not be finding my credentials file or can't read it, but I can't be sure, since the only debug message I keep getting is "Missing credentials in config".
Could the undefined in "AWS s3 undefined 0s 0 retries" have something to do with it?
Let me know if you need anymore information. Thanks!