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

Settings not being saved #117

Open
hutchhicken opened this issue Feb 21, 2025 · 3 comments
Open

Settings not being saved #117

hutchhicken opened this issue Feb 21, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@hutchhicken
Copy link

hutchhicken commented Feb 21, 2025

Operating System

MacOS 15.3.1

Python Version

3.13.2

ClaudeSync Version

0.7.1

Installation Type

New

Configuration

None

{
  "claude_api_url": "https://api.claude.ai/api",
  "compression_algorithm": "none",
  "file_categories": {
    "all_files": {
      "description": "All files not ignored",
      "patterns": [
        "*"
      ]
    },
    "all_source_code": {
      "description": "All source code files",
      "patterns": [
        "*.java",
        "*.py",
        "*.js",
        "*.ts",
        "*.c",
        "*.cpp",
        "*.h",
        "*.hpp",
        "*.go",
        "*.rs"
      ]
    },
    "build_config": {
      "description": "Build configuration files",
      "patterns": [
        "**/pom.xml",
        "**/build.gradle",
        "**/package.json",
        "**/setup.py",
        "**/Cargo.toml",
        "**/go.mod",
        "**/pyproject.toml",
        "**/requirements.txt",
        "**/*.tf",
        "**/*.yaml",
        "**/*.yml",
        "**/*.properties"
      ]
    },
    "production_code": {
      "description": "Production source code",
      "patterns": [
        "**/src/**/*.java",
        "**/*.py",
        "**/*.js",
        "**/*.ts",
        "**/*.vue"
      ]
    },
    "test_code": {
      "description": "Test source code",
      "patterns": [
        "**/test/**/*.java",
        "**/tests/**/*.py",
        "**/test_*.py",
        "**/*Test.java"
      ]
    },
    "uberproject_java": {
      "description": "Uberproject Java + Javascript",
      "patterns": [
        "**/src/**/*.java",
        "**/*.py",
        "**/*.js",
        "**/*.ts",
        "**/*.vue",
        "**/pom.xml",
        "**/build.gradle",
        "**/package.json",
        "**/setup.py",
        "**/Cargo.toml",
        "**/go.mod",
        "**/pyproject.toml",
        "**/requirements.txt",
        "**/*.tf",
        "**/*.yaml",
        "**/*.yml",
        "**/*.properties"
      ]
    }
  },
  "log_level": "DEBUG",
  "max_file_size": 32768,
  "prune_remote_files": true,
  "submodule_detect_filenames": [
    "pom.xml",
    "build.gradle",
    "package.json",
    "setup.py",
    "Cargo.toml",
    "go.mod"
  ],
  "two_way_sync": false,
  "upload_delay": 0.5
}

Steps to Reproduce

  1. install using pipx as instructed here for MacOS installation
  2. claudesync auth login (followed instructions, received Successfully authenticated with claude.ai. Session key stored globally.)
  3. claudesync organization ls -> Error: No active provider set. Please select a provider for this project.
  4. claudesync orgainization set
  1. ************'s Organization (ID: ****-**-******)
Enter the number of the organization you want to work with [1]: 1
Selected organization: ***************'s Organization (ID: ****-**-**)
Project settings cleared. Please select or create a new project for this organization.
  1. claudesync project ls -> Error: No active organization set. Please select an organization (claudesync organization set).
  2. claudesync project set -> Error: No active organization set. Please select an organization (claudesync organization set).

Description

The application isn't retaining organization and project information in a way that it can read later.

Doing some naive debugging, it appears that it is not properly reading the settings that seem to be written correctly in ~/.claudesync/config.local.json. That file contains correct properties for active_provider, local_path, and active_organization_id.

It seems like the file isn't being properly read from within the virtualized environment?

Of note, similar problems when I try on PopOS 22.04 using pip install

Logs

$ claudesync organization set
2025-02-21 10:34:45,176 - DEBUG - Making GET request to https://api.claude.ai/api/organizations
2025-02-21 10:34:45,176 - DEBUG - Headers: {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0', 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip'}
2025-02-21 10:34:45,176 - DEBUG - Cookies: {'sessionKey': '***'}
2025-02-21 10:34:45,379 - DEBUG - Response status code: 200
2025-02-21 10:34:45,381 - DEBUG - Response headers: Date: Fri, 21 Feb 2025 15:34:45 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
request-id: req_01YC5jg9SDXh9U4NUmayjH15
via: 1.1 google
alt-svc: h3=":443"; ma=86400
cf-cache-status: DYNAMIC
Set-Cookie: __cf_bm=***; path=/; expires=Fri, 21-Feb-25 16:04:45 GMT; domain=.claude.ai; HttpOnly; Secure; SameSite=None
X-Robots-Tag: none
Server: cloudflare
CF-RAY: 9157cd64f881a4c7-MIA
Content-Encoding: gzip


2025-02-21 10:34:45,382 - DEBUG - Response content: [{"id":***,"uuid":"***","name":"***'s Organization","settings":{"claude_console_privacy":"default_private","allowed_invite_domains":null,"workbench_completion_feedback_enabled":null,"claude_ai_completion_feedback_enabled":null,"batches_download_ui_visibility":"all","batches_download_ui_enabled_workspace_ids":[]},"capabilities":["chat","claude_pro"],"parent_organization_uuid":null,"rate_limit_tier":"default_claude_ai","billing_type":"stripe_subscription","free_credits_status":"available","data_retention":"default","api_disabled_reason":null,"api_disabled_until":null,"billable_usage_paused_until":null,"raven_type":null,"created_at":"2024-07-18T10:35:05.994675Z","updated_at":"2024-10-15T12:28:55.940230Z","active_flags":[],"data_retention_periods":null}]...
Available organizations:
  1. ***'s Organization (ID: ***)
Enter the number of the organization you want to work with [1]: 1
Selected organization: ***'s Organization (ID: ***)
Project settings cleared. Please select or create a new project for this organization.

$ claudesync project ls
Error: No active organization set. Please select an organization (claudesync organization set).

$ claudesync project set
Error: No active organization set. Please select an organization (claudesync organization set).
@hutchhicken hutchhicken added the bug Something isn't working label Feb 21, 2025
@hutchhicken
Copy link
Author

Looking at #107, it looks like this may be a similar issue.

@phemmer
Copy link

phemmer commented Feb 22, 2025

Experiencing the same problem. Can set organization, but when I go to select a project, it has no idea about the organization.
Although contrary to the reported behavior, I am not seeing any config being written. I have no config.local.json in my ~/.claudesync directory. I attached strace to the claudesync organization set, and see the following:

551781 write(1, "Available organizations:\n", 25) = 25
551781 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 write(1, "  1. MyOrg (ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)\n", 69) = 69
551781 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 write(1, "Enter the number of the organization you want to work with [1]:", 63) = 63
551781 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 write(2, " ", 1)                 = 1
551781 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x13), ...}) = 0
551781 read(0, "1\n", 1024)             = 2
551781 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 write(1, "Selected organization: MyOrg (ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)\n", 87) = 87
551781 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
551781 write(1, "Project settings cleared. Please select or create a new project for this organization.\n", 87) = 87
551781 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK, sa_restorer=0x7f0569e4fd00}, {sa_handler=0x7f056a10b26d, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK, sa_restorer=0x7f0569e4fd00}, 8) = 0
551781 munmap(0x7f055b315000, 417792)   = 0
551781 munmap(0x7f056a686000, 16384)    = 0
551781 futex(0x7f055b060190, FUTEX_WAKE_PRIVATE, 2147483647) = 0
551781 exit_group(0)                    = ?
551781 +++ exited with 0 +++                                                                                                                                                                                                                                                    

As you can see from this, it doesn't write any file after taking the input of which organization to use. It just takes the input, does nothing with it, and exits.

@cjmellor
Copy link

I was also getting this, but once I ran claudesync project init in my folder, I was then able to select them and the options stuck.

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

No branches or pull requests

3 participants