Skip to content

fix: prevent Cordova exec startup race - #2851

Merged
bajrangCoder merged 1 commit into
mainfrom
fix/cordova-exec-startup-race
Sep 3, 2026
Merged

fix: prevent Cordova exec startup race#2851
bajrangCoder merged 1 commit into
mainfrom
fix/cordova-exec-startup-race

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

Closes: #2848

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Replaces the startup-sensitive cordova.exec lookup with Cordova’s internal cordova/exec module and adds a regression test that imports the plugin context before the public exec mapping exists.

  • Resolves the native bridge implementation through cordova.require during module initialization.
  • Verifies connection establishment and plugin-token creation with cordova.exec absent.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified.

The changed bridge lookup matches Cordova’s internal module usage pattern, and the new test directly exercises plugin-context initialization while the public cordova.exec property is unavailable.

Important Files Changed

Filename Overview
src/lib/pluginContext.js Uses Cordova’s internal module loader to obtain the native exec function without waiting for the public mapping.
tests/unit/pluginContext.test.js Adds an isolated regression test covering early import, trusted-session connection, and plugin-token generation.

Reviews (1): Last reviewed commit: "fix: prevent Cordova exec startup race" | Re-trigger Greptile

@bajrangCoder
bajrangCoder requested review from RohitKushvaha01 and removed request for RohitKushvaha01 September 3, 2026 17:28
@bajrangCoder
bajrangCoder added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 12e14ba Sep 3, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Sep 3, 2026
@bajrangCoder
bajrangCoder deleted the fix/cordova-exec-startup-race branch September 3, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Acode fails to start when internet connection is available before app startup

1 participant