dexcalibur icon indicating copy to clipboard operation
dexcalibur copied to clipboard

No error prompt when creating project with APK SDK > device SDK

Open kylemd opened this issue 2 years ago • 1 comments

Describe the bug When a project is created with an APK that has a higher minimum version than what the device is running, project creation fails with no meaningful error message in the WebUI.

To reproduce / to understand Attempted to load Google Camera 8.7 (.apkm) which requires SDK33+

Expected behavior Error message "App minimum SDK version is higher than device SDK"

Log traceback

[INFO] [APK HELPER] APK extracted into : C:\Users\kyle\dexcaliburWS\gcam87\apk
TypeError: Cannot read property 'getUID' of null
    at DexcaliburProject.fullscan (C:\Users\kyle\Development\_Builds\dexcalibur\src\DexcaliburProject.js:710:56)
    at C:\Users\kyle\Development\_Builds\dexcalibur\src\WebServer.js:448:49
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:33748) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getMinApiVersion' of null
    at DexcaliburProject.synchronizePlatform (C:\Users\kyle\Development\_Builds\dexcalibur\src\DexcaliburProject.js:411:78)
    at C:\Users\kyle\Development\_Builds\dexcalibur\src\WebServer.js:444:43
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:33748) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:33748) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 11
  • Node JS version: node --version v12.22.12
  • Dexcalibur version (see 'package.json' or output) : master

** If you think this issue is related to your device, please fill following information:**

  • Device: Xiaomi Mi 10 Pro
  • Android version: Evolution X ROM 12L
  • Rooted / Not rooted Rooted

kylemd avatar Nov 09 '22 13:11 kylemd

If the minimal API version is upper than your device, it causes several things:

  • Dexcalibur can generate wrong hooks for Android API because signatures may changes or a method contained into the public API for API X can became private in API X+1
  • Dexcalibur cannot analyze missing dependencies

FrenchYeti avatar Nov 09 '22 13:11 FrenchYeti