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

ClaudeSync push command fails with 'No active provider set' error despite provider being configured #63

Closed
ivan2apexive opened this issue Sep 5, 2024 · 8 comments · Fixed by #67
Labels
bug Something isn't working

Comments

@ivan2apexive
Copy link

Describe the bug
The claudesync push command fails with an error stating "No active provider set" even though the provider has been set and is visible in the configuration file.

To Reproduce
Steps to reproduce the behavior:

Install ClaudeSync
Run claudesync auth login
Select provider (claude.ai)
Enter session key
Run claudesync organization ls
Run claudesync organization set
Run claudesync project set
Run claudesync push
See error: "No active provider set. Please select a provider for this project."

Expected behavior
The claudesync push command should successfully push the project files to Claude AI.
Error messages
"No active provider set. Please select a provider for this project."
Environment (please complete the following information):

OS: macOS Sonoma 14.4.1
Python version: 3 (exact version not specified)
ClaudeSync version: Last one
...
}
Additional context

The issue started happening immediately upon trying to use ClaudeSync
The bug can be reliably reproduced
The configuration file shows that the provider is set, but the command still fails
Attempts to manually set the provider using claudesync config set provider claude.ai did not resolve the issue

@ivan2apexive ivan2apexive added the bug Something isn't working label Sep 5, 2024
@jahwag
Copy link
Owner

jahwag commented Sep 6, 2024

I wasn't able to reproduce the issue on my side. Can you try running the script below and see if it helps?

rm -rf ~/.claudesync && \
mkdir issue-63 && \
cd issue-63 && \
claudesync auth login && \
claudesync organization set && \
claudesync project set && \
claudesync push

For your reference, this should give output resembling this:

Choose provider (claude.ai) [claude.ai]:
A session key is required to call: https://api.claude.ai/api
To obtain your session key, please follow these steps:
1. Open your web browser and go to https://claude.ai
2. Log in to your Claude account if you haven't already
3. Once logged in, open your browser's developer tools:
   - Chrome/Edge: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
   - Firefox: Press F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
   - Safari: Enable developer tools in Preferences > Advanced, then press Cmd+Option+I
4. In the developer tools, go to the 'Application' tab (Chrome/Edge) or 'Storage' tab (Firefox)
5. In the left sidebar, expand 'Cookies' and select 'https://claude.ai'
6. Locate the cookie named 'sessionKey' and copy its value. Ensure that the value is not URL-encoded.
Please enter your sessionKey:
Please enter the expires time for the sessionKey (optional) [Sun, 06 Oct 2024 09:22:36 UTC]:
Successfully authenticated with claude.ai. Session key stored globally.
Available organizations:
  1. [email protected]'s Organization (ID: XX)
Enter the number of the organization you want to work with [1]:
Selected organization: [email protected]'s Organization (ID: XX)
Project settings cleared. Please select or create a new project for this organization.
Available projects:
  1. issue-63 (ID: XX) - Main Project
Enter the number of the project to select [1]:
Selected project: issue-63 (ID: XX)
Ensured .claudesync directory exists in E:\IdeaProjects\issue-63
Local → Remote: 0it [00:00, ?it/s]
Main project 'issue-63' synced successfully: https://claude.ai/project/XX

Let me know if the issue persists, and we can dig deeper.

@Yogi-7y
Copy link

Yogi-7y commented Sep 10, 2024

Got the following after running the above script

Selected project: dotfiles (ID: foo-bar)
Ensured .claudesync directory exists in /Users/yogi/dotfiles/issue-63
Error: No active provider set. Please select a provider for this project.

@jahwag
Copy link
Owner

jahwag commented Sep 10, 2024 via email

@binaerverkehr
Copy link

Had the same issue. Not sure if this is the solution but I had installed claudesync inside a virtual env. Today I installed it globally and it works.

@Yogi-7y
Copy link

Yogi-7y commented Sep 11, 2024

Which version of python are you using?

v0.5.6
I had installed this via pipx globally.

I later did a clean install with v0.5.5 and it worked, but again when I tried switching to a different project after some time, it started failing with the same message on v0.5.5 as well. Not sure if it's related, but sharing if it helps.

@jahwag
Copy link
Owner

jahwag commented Sep 11, 2024 via email

@Yogi-7y
Copy link

Yogi-7y commented Sep 12, 2024

Oh, my bad. I thought you were asking for the Claudesync version.
Python version is 3.12.6

I went through the release notes, but that still left me a bit confused.
Is the config.local.json file under the .claudesync folder supposed to be created manually or should it be created automatically?

For me, only the folder got created automatically but not the file inside it. Whenever I'm running any command without the file being present, it gives the error that no active provider is set. But when I create the file manually, I'm able to run all the commands as expected.

@jahwag
Copy link
Owner

jahwag commented Sep 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@jahwag @Yogi-7y @binaerverkehr @ivan2apexive and others