calendar: every call fails with 190006 "wrong unit for app tenant" on a Lark tenant in the Japan region

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

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

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

評価

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

調査の方向性

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.

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

説明

bug domain/auth domain/calendar domain/core

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 holds calendar:calendar.event:read, calendar:calendar:read and calendar: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.go resolves the lark brand to https://open.larksuite.com for every service, and config set has 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.
主要言語
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 を短くまとめたダイジェスト。