Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#15808·activepieces

[BUG] Reconnect loads and saves the connection's creation-time piece version, so new OAuth2 scopes never appear

Author: majewskibartoszCreated Sep 25, 2026Updated Sep 29, 2026
Labels🐛 bug🏢 area/management🛟 support💫 priority

Problem

Reconnect on an OAuth2 connection shows the scope list of the piece version the connection was created with, not the current one. Scopes added in later piece versions never appear (Gmail: gmail.modify, added in piece 0.15.1 / platform 0.91.3; a connection created on 0.88.x is pinned to 0.12.10 with 4 scopes). Reconnect saves the same old pieceVersion, so nothing changes. Only delete + recreate picks up new scopes. Reproduced on 0.91.3; identical code in 0.92.0 and main.

Ref: Pylon 6120

Root cause

app_connection.pieceVersion is written at creation (activepieces/activepieces#10330, since 0.73.0) and never advanced.

  • packages/web/src/app/connections/reconnect-button-dialog.tsx:32 → usePiece({ name, version: connection.pieceVersion })
  • packages/web/src/app/builder/step-settings/piece-settings/connection-select.tsx:68 → version: reconnectConnection?.pieceVersion ?? params.piece.version
  • packages/web/src/app/connections/create-edit-connection-dialog.tsx → upsert sends pieceVersion: piece.version from that old model
  • appConnectionService.upsert stores params.pieceVersion as-is and accepts any version, so the server needs no change

Pin exists so refresh/validate load the auth schema at the stored version.

Fix

Frontend only. Reconnect loads the latest piece version when the connection's auth type still exists in the latest auth list (else fall back to stored version); upsert writes the new pieceVersion. Same change in routes/embed/embedded-connection-dialog.tsx.

Steps to reproduce

  1. app_connection row: pieceName=@activepieces/piece-gmail, pieceVersion=0.12.10
  2. Connections → Reconnect → Permissions: 4 scopes; request is GET /v1/pieces/@activepieces/piece-gmail?version=0.12.10
  3. New Connection → Gmail → Permissions: 5 scopes

Source: activepieces/activepieces

View original on GitHubView discussion on GitHub