aws-samples / amazon-bedrock-client-for-mac

A sleek and powerful macOS client for Amazon Bedrock, bringing AI models to your desktop
MIT No Attribution
142 stars 19 forks source link

Amazon Bedrock quit unexpectedly #39

Open csheaff opened 1 month ago

csheaff commented 1 month ago

Description Latest release will not open. Getting "Amazon Bedrock quit unexpectedly. Click Reopen...". Clicking Reopen produces the same error. Tried rebooting.

Environment:

Screenshots image

Additional context Recently upgraded from Monterey to Sonoma.

didhd commented 1 month ago

@csheaff Could you rename the ~/Amazon Bedrock Client directory into another name and restart the app?

didhd commented 1 month ago

@csheaff Could you give me the debug logs? It is located in the ~/Amazon Bedrock Client/logs

csheaff commented 1 month ago

Thanks for the response. Renaming did not work.

❯ tail log-2024-07-08.log 
2024-07-08T18:51:21-0700 error Backend : [Amazon_Bedrock] Failed to create credentials resolver: crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH")). Using default credentials.
Amazon_Bedrock/BedrockClient.swift:192: Fatal error: 'try!' expression unexpectedly raised an error: AwsCommonRuntimeKit.CommonRunTimeError.crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH"))
2024-07-08T18:51:32-0700 error Backend : [Amazon_Bedrock] Failed to create credentials resolver: crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH")). Using default credentials.
Amazon_Bedrock/BedrockClient.swift:192: Fatal error: 'try!' expression unexpectedly raised an error: AwsCommonRuntimeKit.CommonRunTimeError.crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH"))
2024-07-08T18:53:02-0700 error Backend : [Amazon_Bedrock] Failed to create credentials resolver: crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH")). Using default credentials.
Amazon_Bedrock/BedrockClient.swift:192: Fatal error: 'try!' expression unexpectedly raised an error: AwsCommonRuntimeKit.CommonRunTimeError.crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH"))
2024-07-08T18:54:39-0700 error Backend : [Amazon_Bedrock] Failed to create credentials resolver: crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH")). Using default credentials.
Amazon_Bedrock/BedrockClient.swift:192: Fatal error: 'try!' expression unexpectedly raised an error: AwsCommonRuntimeKit.CommonRunTimeError.crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH"))
2024-07-08T18:54:41-0700 error Backend : [Amazon_Bedrock] Failed to create credentials resolver: crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH")). Using default credentials.
Amazon_Bedrock/BedrockClient.swift:192: Fatal error: 'try!' expression unexpectedly raised an error: AwsCommonRuntimeKit.CommonRunTimeError.crtError(AwsCommonRuntimeKit.CRTError(code: 44, message: "Invalid file path.", name: "AWS_ERROR_FILE_INVALID_PATH"))
didhd commented 1 month ago

Thank you for sharing the log. It seems there might be an issue with the ~/.aws/credentials file, or the file might be missing. Could you please check if this is preventing commands like aws s3 ls from working properly?

csheaff commented 1 month ago

I see. I use SSO, so no credentials file. Incompatible?

In previous versions I was exporting my credentials in terminal then opening the app from the command line, which worked (though no longer).

didhd commented 1 month ago

This app supports SSO. There is a bug where if ~/.aws/credentials is missing while ~/.aws/config is set, the app crashes. We will fix this in the next version. Until then, please create a ~/.aws/credentials file and add the following line:

[default]

This will prevent the app from crashing.

didhd commented 1 month ago

After that, you can use the SSO profile in the settings.

csheaff commented 1 month ago

It opens now but I get another error:

image

didhd commented 1 month ago

You should be able to use SSO profile in the settings window.

image
csheaff commented 1 month ago

got it! thank you!

didhd commented 1 month ago

I apologize for the inconvenience, but the bug has not been fixed yet, so I will reopen the issue.