calendar: every call fails with 190006 "wrong unit for app tenant" on a Lark tenant in the Japan region
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with internal/core/types.go, which the issue names as resolving the Lark brand to a single API host, and trace how calendar requests choose their endpoint. Compare that path with the working service calls and check whether the tenant region is available to the CLI. Done means calendar calls work for a Japan region tenant with the same app and user token; the issue does not identify relevant tests.
Written by the indexing model from the issue text.
Description
Summary
On a Lark (international) tenant hosted in the Japan region (web domain *.jp.larksuite.com), every calendar call fails with error 190006 "wrong unit for app tenant". The same app and user token work for IM, Tasks, Docs, Wiki and Contacts, so credentials and scopes look fine. Only calendar is affected.
Environment
- lark-cli 1.0.98 (npm), macOS
- App created with
lark-cli config init --new --brand lark - Tenant web domain:
*.jp.larksuite.com - Identity: user (
--as user). The token holdscalendar:calendar.event:read,calendar:calendar:readandcalendar:calendar.free_busy:read.
Steps to reproduce
lark-cli calendar +agenda --as user
lark-cli api POST /open-apis/calendar/v4/calendars/primary --as user
lark-cli api GET /open-apis/calendar/v4/calendars --as user
Actual result
All three return the same error:
{"type": "api", "subtype": "unknown", "code": 190006, "message": "wrong unit for app tenant"}
log_id values: 20261020232914850990F1AF93490992AF, 20261020232925F04D779153D06007ED7F, 202610202329267EFEBDCA92E27E082329
Expected result
Calendar events and calendars are returned, as they are for other domains (im, task, docs, wiki, contact) on the same tenant with the same token.
Notes
internal/core/types.goresolves thelarkbrand tohttps://open.larksuite.comfor every service, andconfig sethas no endpoint option. Does calendar need a region-specific Open API host for tenants on the Japan unit? If so, could the CLI support configuring it, or pick it up from the tenant?- Feishu's calendar error table lists 190006 as "wrong unit for app tenant" and suggests checking the App ID and App Secret. Those are fine here, since every other domain succeeds with the same app.
- Dominant language
- Go
- Stars
- 18.2k
- Forks
- 1.4k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from larksuite/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
domain/im
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug domain/doc
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
mail: all-ASCII draft bodies are hard-wrapped every 998 bytes, inserting newlines inside words and tagsPossibly taken @linye157 claimed this 26 days ago. Opendomain/mail
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
auth: a 429 from the Token Endpoint during refresh deletes a still-valid loginPossibly taken @linye157 claimed this 26 days ago. Openbug domain/auth domain/im
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
larksuite/cli#2869 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
github/github-mcp-server#3960 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
JuliusBrussee/caveman#1594 ·
Maintainers usually reply within 1 day
-
C-bug O-community X-blathers-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
cockroachdb/cockroach#176264 · 1 comment ·
-
security trivy
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
kubefleet-dev/kubefleet#1068 ·
Maintainers usually reply within 3 days