calendar: 190006 "wrong unit for app tenant" on US-unit Lark tenant

オープン
#2,866 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
api, backend

調査の方向性

The report names calendar commands and the raw /open-apis/calendar/v4/calendars request, but no source files or tests. Start by tracing how the lark brand selects the Open API host for calendar calls and compare it with the working Docs or Drive requests. Done means calendar requests on a US-unit tenant succeed for both user and bot identities, with coverage for the host selection behavior.

索引モデルが issue の本文から書いたものです。

説明

bug domain/calendar domain/core

Related: #2835 (same error on a Japan-region tenant). Filing separately because this happens on a US-unit tenant, so it doesn't look region-specific to Japan.

Summary

On a Lark (international) tenant hosted in the US unit (*.usttp.larksuite.com), every calendar call fails with error 190006 "wrong unit for app tenant", for both user and bot identities. The same app and token work for Docs, Drive and IM.

Environment

  • lark-cli 1.0.98 (npm), Windows 11, Git Bash
  • App created with --brand lark; config show → "brand": "lark"
  • User identity: token valid, DPoP (dpopMode: preferred)
  • Bot identity: ready
  • User token scopes include all calendar scopes: calendar:calendar:read, calendar:calendar.event:create, calendar:calendar.event:read, calendar:calendar.event:update, calendar:calendar.free_busy:read, etc.

Steps to reproduce

Command Identity Result
lark-cli calendar +freebusy --start 2026-10-29 user 190006
lark-cli calendar +freebusy --start 2026-10-29 --user-id <other user> user 190006
lark-cli calendar +agenda --start 2026-10-29 --end 2026-10-29 user 190006
lark-cli calendar calendars primary user 190006
lark-cli api GET /open-apis/calendar/v4/calendars user 190006
lark-cli calendar +freebusy --start 2026-10-29 --user-id <self> bot 190006

Actual result

{"ok": false, "error": {"type": "api", "subtype": "unknown", "code": 190006, "message": "wrong unit for app tenant"}}

Log IDs:

  • 20261029133455A4483A5B2F39E8A14B8F (+freebusy, user)
  • 20261029133504AB0C4CA237348F9E9BFE (calendars primary, user)
  • 20261029133523241F3E9E8107699E4661 (+freebusy, bot)
  • 20261029133614649D9ACC7EFA3F9D628F (raw GET /open-apis/calendar/v4/calendars, user)

Expected result

Calendar data is returned, the same way other domains work on this tenant.

What works on the same tenant

docs +search, docs +fetch, Drive comment listing, IM. Credentials and scopes appear correct.

Notes

  • The bot (tenant token) fails the same way as the DPoP user token, so DPoP doesn't look like the cause.
  • The lark brand seems to send all services to https://open.larksuite.com, and config set only supports dpop. Calendar may need a unit-specific Open API host for tenants outside the default unit.
  • Request: a config option to set the Open API host (globally or per service), or auto-detect the tenant's unit.
主要言語
Go
スター
18.2k
フォーク
1.4k
平均マージ
1日 3時間
マージ済み PR(30日)
18

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

larksuite/cli のほかの issue

larksuite/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。