CodexBar icon indicating copy to clipboard operation
CodexBar copied to clipboard

Ollama login detection fails because CodexBar does not recognize current `__Secure-session` cookie

Open hckal opened this issue 7 months ago • 10 comments

SUMMARY

CodexBar reports:

No Ollama session cookie found. Please log in to ollama.com in your browser.

But Safari is already signed into ollama.com.

This appears to be caused by CodexBar’s Ollama cookie detector recognizing older cookie names only, while the current Ollama web session is stored under __Secure-session.

Observed behavior

CodexBar fails to detect an existing Ollama web session and keeps prompting the user to log in.

Expected behavior

If the browser has a valid signed-in ollama.com session, CodexBar should detect it and use it.

Evidence

From the installed CodexBar.app binary, the Ollama detector appears to recognize these cookie names:

  • __Secure-next-auth.session-token
  • next-auth.session-token
  • __Host-ollama_session

From Safari’s local cookie store for ollama.com, the active session cookie present is: __Secure-session.

Environment

  • CodexBar: 0.19.0
  • Browser: Safari
  • macOS
  • Full Disk Access / restart / re-login were already attempted

Thank you!

hckal avatar Apr 13 '26 02:04 hckal

Hey @hckal, #707 adds support for Ollama’s __Secure-session cookie. Could you test a build from the PR and let me know if it fixes it for you?

anirudhvee avatar Apr 13 '26 11:04 anirudhvee

Hi @anirudhvee, I had the same issue and just tested your branch, but it didn't work. I tried logging in on both Chrome and Safari, and neither worked.

ImBada avatar Apr 13 '26 15:04 ImBada

Hi @anirudhvee, I had the same issue and just tested your branch, but it didn't work. I tried logging in on both Chrome and Safari, and neither worked.

Hi @ImBada, what does CodexBar show for Ollama on the PR build? Is it the same message as before or something different?

anirudhvee avatar Apr 14 '26 10:04 anirudhvee

Hi @anirudhvee, I had the same issue and just tested your branch, but it didn't work. I tried logging in on both Chrome and Safari, and neither worked.

Hi @ImBada, what does CodexBar show for Ollama on the PR build? Is it the same message as before or something different?

Hi, Yes. the same message: No Ollama session cookie found. Please log in to ollama.com in your browser.

ImBada avatar Apr 14 '26 10:04 ImBada

Hi, Yes. the same message: No Ollama session cookie found. Please log in to ollama.com in your browser.

Could you check whether About CodexBar shows 0.21 (56)? If it does, could you try refreshing Ollama once in Settings and let me know if the message remains?

anirudhvee avatar Apr 14 '26 10:04 anirudhvee

Appreciate that @anirudhvee it works for me now!

hckal avatar Apr 14 '26 10:04 hckal

Could you check whether About CodexBar shows 0.21 (56)? If it does, could you try refreshing Ollama once in Settings and let me know if the message remains?

Yes, I've built and tested your PR branch. The results remain the same. Anything else I can do to help?

Image Image Image

ImBada avatar Apr 14 '26 10:04 ImBada

Hang on, I think it's working now. Does this specifically pull cookies only from Chrome? It fixed itself after I reset Chrome and re-logged in. It didn't work on my main browser, Dia, or on Safari, even though I was logged in there as well.

ImBada avatar Apr 14 '26 10:04 ImBada

Glad it’s working now. Yeah, the current Ollama logic does seem to prefer Chrome first.

anirudhvee avatar Apr 14 '26 12:04 anirudhvee

I'd suggest changing 'in your browser' to 'in Chrome.' or something else. Using multiple browsers made the original instruction a little confusing for me.

ImBada avatar Apr 14 '26 13:04 ImBada