Skip to content
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

Invalid keys on mobile when using Obsidian Sync #1350

Open
2 tasks done
PuppetAJ opened this issue Mar 11, 2025 · 4 comments
Open
2 tasks done

Invalid keys on mobile when using Obsidian Sync #1350

PuppetAJ opened this issue Mar 11, 2025 · 4 comments

Comments

@PuppetAJ
Copy link

  • Disable all other plugins besides Copilot (required)
  • Screenshot of note + Copilot chat pane + dev console added (required)

Copilot version: v2.8.7

(Bug report without the above will be closed)

Describe how to reproduce

  1. Have a vault using Obsidian Sync.
  2. Set up Copilot as normal.
  3. Add your api keys (In my case, Gemini).
  4. Test to ensure functionality on desktop environment.
  5. Verify that your key has been synced to mobile.
  6. View errors / attempt to use models via the chat pane. (Errors will be produced).

Expected behavior

Expected result would be for copilot to be compatible with obsidian sync and have usable API keys across devices.

Screenshots

image

image

image

Additional context

Device type: iPhone 16 Pro
IOS version: 18.3.1

As it stands, the keys become unusable on mobile when the desktop environment overwrites the mobile keys, even after manually setting them on mobile. When manually overwriting the key on mobile, they function until overwritten by Obsidian Sync. They continue to function well on desktop throughout all of this.

@i13-ctflora
Copy link

If you’ve had the setting to encrypt the api keys on, that might be the problem. Even after turning that option off, the api keys remain encrypted. I had to manually edit the config.json file on desktop to replace the encrypted keys with the plaintext versions before I could get this working on mobile.

@PuppetAJ
Copy link
Author

Can confirm that having encryption enabled for the API keys causes the key to sync the encrypted version and not the decrypted version, thus breaking it on mobile.

@logancyang
Copy link
Owner

Is it iOS or Android? Encrypted key should work on mobile.

@PuppetAJ
Copy link
Author

Is it iOS or Android? Encrypted key should work on mobile.

IOS 18.3.2, on an Iphone 16 Pro.

The keys are saved properly on my desktop device, and when I reveal them under API Keys, they show the unencrypted version of the key. However on my Iphone, when I reveal the key, it's set to an encrypted hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants