Skip to content

fix(plugin-oracle): connect when the password is about to expire - #3407

Merged
datlechin merged 3 commits into
mainfrom
fix/oracle-password-expiry-warning
Oct 13, 2026
Merged

datlechin merged 3 commits into
mainfrom
fix/oracle-password-expiry-warning

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

An Oracle user whose password is about to expire could not connect: Test Connection and Connect failed after 30 seconds with a timeout. Oracle sends ORA-28002 (ORA-28098 on 26ai) as a warning message before the login reply. oracle-nio read that message with the wrong field widths, decided the packet was incomplete, and waited for bytes the server never sends.

Change

  • Connects again: oracle-nio is repinned to fix: decode a server warning, and keep the one a login raises oracle-nio#15, which decodes the warning (upstream's fix, cherry-picked) and keeps the one a login raises.
  • The connection window shows the server's warning in a dismissible banner, and Test Connection shows it next to its buttons with a yellow triangle. A new PluginKit requirement, connectionWarning (kit 38, default nil), carries it from the driver.
  • A login that finishes after its connect was canceled closes its session instead of leaving it open on the server.

Verified

Against Oracle 23.26 Free with a user in its grace period: the old pin times out in the authentication phase, this branch connects in 54 ms and reports ORA-28098 (scripts/probes/check-oracle-login-warning.sh). No UI test: the Oracle plugin is registry-only and a test build cannot load it; the shots are a Debug build with the plugin side-loaded.

Screenshots

Connection window, light
Connection window, dark
Test Connection, light
Test Connection, dark

Not in this PR

  • Merge fix: decode a server warning, and keep the one a login raises oracle-nio#15 with a merge commit first, then release plugin-oracle at kit 38 with the next app. Users on 0.80.0 get the connect fix sooner only from a kit-37 Oracle build of v0.80.0 with just the repin.
  • The iOS app connects after the repin but does not show the warning yet.
  • The app's 30-second deadline usually fires before the driver's own login timeout, so a stalled login shows a generic timeout instead of the step it stalled at.
  • Closing an Oracle connection logs off with no deadline, so a server that goes silent keeps that background close and its socket alive.

Fixes #3401

An Oracle login whose password is in its grace period hung for 30 seconds:
the server sends ORA-28002 (ORA-28098 on 26ai) as a warning message, and
oracle-nio read it with the wrong field widths and waited for bytes that
never came. Repin oracle-nio to TableProApp/oracle-nio#15, which decodes it
and exposes the warning a login raised.

The warning reaches the user through a new PluginKit requirement,
connectionWarning (kit 38, default nil), which the adapter reads when a
connect is adopted. The connection window shows it in a dismissible banner
and Test Connection shows it next to its buttons.

A login that finishes after its connect was canceled now closes its session
instead of leaving it open on the server.
…erver

Closing logs off and waits for the server's answer, so a server that stops
answering after a canceled login held up the canceled connect, and a redial
holding the query gate. The close now runs on its own, like the other closes.
Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
@datlechin
datlechin merged commit 958a419 into main Oct 13, 2026
10 checks passed
@datlechin
datlechin deleted the fix/oracle-password-expiry-warning branch October 13, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oracle: lỗi không kết nối được

1 participant