Skip to content

Amplify.Auth.signIn() using String(format:) with mismatched type specifiers. #4073

@kevinleadoutlabs

Description

@kevinleadoutlabs

Describe the bug

I'm getting these errors right after signIn executes (see below)
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]

Somewhere it seems like you're passing Doubles into Int64 (%lli format is expected) - just a guess.

Steps To Reproduce

let signInResult = try await Amplify.Auth.signIn(
                    username: username,
                    password: password
                )

Expected behavior

no errors...

Amplify Framework Version

2.51.1

Amplify Categories

Auth

Dependency manager

Swift PM

Swift version

6.2

CLI version

N/A

Xcode version

26.0.1

Relevant log output

String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]
String(format:locale:arguments:): Provided argument types ["Swift.Double"] (with inferred specifiers ["%lf"]) do not match the format string's specifiers [Error Domain=NSCocoaErrorDomain Code=2048 "Format '%lli' does not match expected '%lf'" UserInfo={NSDebugDescription=Format '%lli' does not match expected '%lf'}]

Is this a regression?

No

Regression additional context

No response

Platforms

No response

OS Version

26.0.1

Device

iPhone 7 Simulator

Specific to simulators

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions