Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Android capacitor crashes on subsequent launch if versionCode/versionName omitted #7802

Open
1 of 3 tasks
aeharding opened this issue Dec 12, 2024 · 0 comments · May be fixed by #7803
Open
1 of 3 tasks

[Bug]: Android capacitor crashes on subsequent launch if versionCode/versionName omitted #7802

aeharding opened this issue Dec 12, 2024 · 0 comments · May be fixed by #7803
Labels

Comments

@aeharding
Copy link

Capacitor Version

[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0

Installed Dependencies:

@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.1.2

[success] Android looking great! 👌

Other API Details

npm --version
10.9.0

node --version
v22.11.0

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

When versionCode and versionName are omitted from build.gradle, Capacitor crashes on subsequent dev runs (after initial app install on device).

(versionCode and versionName are omitted in my project for dev builds. They are only added/controlled by CI.)

To reproduce:

  • Clone/install app
  • Run capacitor for android - npx cap open android
  • Ctrl+R to run on phone
  • Observe success
  • Ctrl+R again to update/run on phone
  • Observe crash
  • Observe crash on any further update until app is deleted from device, in which case first install will succeed again.

Expected Behavior

No crash

Project Reproduction

https://github.com/aeharding/cap-crash-test

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant