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
Fatal error when connecting to DynamoDB. #95
Comments
@ADGrant can you share your code to initialize DynamoDB? Are you setting the |
@jonnymacs see the code below. I am setting the end point. connection = DynamoDB(accessKeyId: "", secretAccessKey: "*", region: .useast1, endpoint: "dynamodb.us-east-1.amazonaws.com") let userAttr = DynamoDB.AttributeValue(s: user.name) |
@ADGrant ok that's what I suspected. Try initializing without the
If you must set an endpoint (and this is true for any of the services) it must include the protocol. ex: Meanwhile, there's an argument that force unwrap here is not a good idea. So I will add a guard around this code in a future release to surface a more helpful error. |
Thanks, I will try that. I agree that force unwrap is not a good idea here (or in most places, particularly on server side code). One thing that would be helpful would be some simple examples using these APIs. |
Works now. Thank you for the prompt assistance. |
@ADGrant you're welcome. And good suggestion on examples. We'll work on this. PRs are always welcome too 😃 |
Closing as I don’t think there is anything to add here |
Get Fatal error: Unexpectedly found nil while unwrapping an Optional val
#7 0x00000001018a2f4c in Signers.V4.signedHeaders(url:headers:method:date:bodyData:) at .build/checkouts/aws-sdk-swift-core.git--8673986503349919441/Sources/AWSSDKSwiftCore/Signers/V4.swift:96
#8 0x000000010181e60d in AWSClient.nioRequestWithSignedHeader(:) at .build/checkouts/aws-sdk-swift-core.git--8673986503349919441/Sources/AWSSDKSwiftCore/AWSClient.swift:217
#9 0x000000010181de57 in AWSClient.createNIORequestWithSignedHeader(:) at .build/checkouts/aws-sdk-swift-core.git--8673986503349919441/Sources/AWSSDKSwiftCore/AWSClient.swift:190
#10 0x0000000101819737 in AWSClient.createNioRequest(:) at .build/checkouts/aws-sdk-swift-core.git--8673986503349919441/Sources/AWSSDKSwiftCore/AWSClient.swift:243
#11 0x000000010181d70f in AWSClient.send<A, B>(operation:path:httpMethod:input:) at .build/checkouts/aws-sdk-swift-core.git--8673986503349919441/Sources/AWSSDKSwiftCore/AWSClient.swift:171
#12 0x0000000101094273 in DynamoDB.getItem(:) at .build/checkouts/aws-sdk-swift.git--2129101693774578373/Sources/AWSSDKSwift/Services/DynamoDB/DynamoDB_API.swift:91
code in signedHeaders(url: URL, headers: [String: String], method: String, date: Date = Date(), bodyData: Data) -> [String: String]
The text was updated successfully, but these errors were encountered: