Skip to content

iOS Keychain PlatformException -25299 on API Key Save #241

Description

@ramishroshan

What happened?

Environment:
OS: iOS
Application: OpenStrap Edge
Provider URL: https://generativelanguage.googleapis.com/v1beta
Steps to Reproduce:

  1. Navigate to Provider settings.
  2. Input Base URL and API key.
  3. Tap Save.
    Expected Behavior:
    The application saves the API key to the keychain. If a previous key exists, it overwrites or clears the existing entry before saving.
    Actual Behavior:
    The application fails to handle the existing keychain entry, blocking the save operation and returning the following exception in the UI:
    Could not save your key to the keychain: PlatformException(Unexpected security result code, Code: -25299, Message: The specified item already exists in the keychain., -25299, null)
    Technical Context:
    The error maps to iOS errSecDuplicateItem. The application's keychain write method lacks a preceding delete or update operation to clear orphaned or existing keys before attempting a new insertion.

Steps to reproduce

No response

App version

0.9.26

Platform

iOS (TestFlight)

Phone model and OS version

14 pro max iOS 27

Which band?

WHOOP 4.0

Screenshots

Image

Quick checks

  • The official WHOOP app is not also connected to this band
  • I've searched existing issues for this

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