Skip to content

Upgrading nativescript/android causes compileDebugArtProfile error #10623

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

Closed
3 tasks done
PixsaOJ opened this issue Sep 9, 2024 · 2 comments
Closed
3 tasks done

Upgrading nativescript/android causes compileDebugArtProfile error #10623

PixsaOJ opened this issue Sep 9, 2024 · 2 comments
Labels
bug-pending-triage Reported bug, pending triage to confirm.

Comments

@PixsaOJ
Copy link

PixsaOJ commented Sep 9, 2024

Issue Description

When I upgrade certain core packages, and remove pnpm-lock.yaml file. It gives me following error, which i do not know where is it coming from.

Bug is caused by upgrading "@nativescript/android" from ~8.7.0 to ~8.8.4

image

I also tried disabling VPN and Firewall blockers as suggested in different similar issues.

Reproduction

I will provide if needed, but might be just my project, because others didn't seem to report anything about this.

Relevant log output (if applicable)

+ adding aar library dependency: REDACTED/App_Resources/Android/libs/REDACTED.0.aar
         + adding aar library dependency: REDACTED/App_Resources/Android/libs/REDACTED.1.aar
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Execution failed for task ':app:compileDebugArtProfile'.
REDACTED/platforms/android/app/build/intermediates/l8_art_profile/debug/l8DexDesugarLibDebug/baseline-prof.txt (No such 
file or directory)

Environment

OS: LINUX Nonofurbuisness.
CPU: Intel i Nonofurbuisness.
Shell: /usr/bin/zsh
node: 22.6.0
npm: 10.8.2
nativescript: Not Found <-- weird, I am on pnpm tough

# android
java: 17.0.12
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: Not Found
cocoapods: Not Found
python: 3.12.5
python3: 3.12.5
ruby: 3.2.4
platforms: Not Found

Dependencies

"dependencies": {
  "@dev4ndy/markdown": "^1.0.0",
  "@master.technology/permissions": "^2.0.1",
  "@nativescript-community/ui-drawer": "^0.1.28",
  "@nativescript-community/ui-image": "^4.5.2",
  "@nativescript-community/ui-material-bottomsheet": "^7.2.61",
  "@nativescript-community/ui-svg": "^0.2.5",
  "@nativescript-use/nativescript-orientation": "^0.0.3",
  "@nativescript-use/vue": "^0.0.44",
  "@nativescript/core": "~8.8.2",
  "@nativescript/imagepicker": "^4.0.0",
  "@nativescript/secure-storage": "^3.0.3",
  "@nativescript/theme": "~3.1.0",
  "@testjg/nativescript-nfc": "^1.1.3",
  "@triniwiz/nativescript-supabase": "2.0.0-rc.7",
  "@triniwiz/nativescript-toasty": "^4.1.3",
  "@vulksoft/nativescript-platform-css": "^1.6.16",
  "ios-sdk-plugin": "file:ios-sdk-plugin",
  "lodash": "^4.17.21",
  "markdown-to-txt": "^2.0.1",
  "mitt": "^3.0.1",
  "nativescript-dark-mode": "^1.0.0",
  "nativescript-gif": "^5.0.0",
  "nativescript-intl": "^4.0.2",
  "nativescript-nfc-fix": "^5.1.0",
  "nativescript-vibrate": "^4.0.1",
  "nativescript-vue": "3.0.0-rc.2",
  "nativescript-windowed-modal": "^7.0.0",
  "pinia": "2.2.2",
  "router-vue-native": "^2.1.0"
},
"devDependencies": {
  "@csstools/postcss-is-pseudo-class": "^5.0.0",
  "@nativescript-dom/core-types": "^1.0.31",
  "@nativescript-dom/vue-types": "^1.0.16",
  "@nativescript/android": "~8.8.4",
  "@nativescript/eslint-plugin": "^0.0.4",
  "@nativescript/ios": "~8.8.2",
  "@nativescript/preview-cli": "1.0.13",
  "@nativescript/tailwind": "^2.1.0",
  "@nativescript/types": "^8.8.0",
  "@nativescript/webpack": "~5.0.22",
  "@types/lodash": "^4.17.7",
  "@types/node": "22.5.4",
  "@typescript-eslint/eslint-plugin": "^8.4.0",
  "@typescript-eslint/parser": "^8.4.0",
  "@vue/typescript-plugin": "^2.1.6",
  "eslint": "^9.10.0",
  "eslint-config-prettier": "^9.1.0",
  "eslint-plugin-prettier": "^5.2.1",
  "eslint-plugin-vue": "^9.28.0",
  "nativescript-custom-entitlements": "^0.2.0",
  "prettier": "^3.3.3",
  "tailwindcss": "^3.4.10",
  "tns-platform-declarations": "^6.5.15",
  "ts-loader": "^9.5.1",
  "typescript": "^5.5.4"
}

Please accept these terms

@PixsaOJ PixsaOJ added the bug-pending-triage Reported bug, pending triage to confirm. label Sep 9, 2024
@PixsaOJ
Copy link
Author

PixsaOJ commented Sep 14, 2024

Additional log from trace:

Command ./gradlew failed with exit code 1
Error: Command ./gradlew failed with exit code 1
    at Errors.failWithOptions (/home/XXXXX/.local/share/pnpm/global/5/.pnpm/nativescript@8.8.2_@types+node@22.5.4_encoding@0.1.13/node_modules/nativescript/lib/common/errors.js:165:27)
    at Errors.fail (/home/XXXXX/.local/share/pnpm/global/5/.pnpm/nativescript@8.8.2_@types+node@22.5.4_encoding@0.1.13/node_modules/nativescript/lib/common/errors.js:137:21)
    at GradleCommandService.<anonymous> (/home/XXXXX/.local/share/pnpm/global/5/.pnpm/nativescript@8.8.2_@types+node@22.5.4_encoding@0.1.13/node_modules/nativescript/lib/services/android/gradle-command-service.js:47:30)
    at Generator.throw (<anonymous>)
    at rejected (/home/XXXXX/.local/share/pnpm/global/5/.pnpm/nativescript@8.8.2_@types+node@22.5.4_encoding@0.1.13/node_modules/nativescript/lib/services/android/gradle-command-service.js:6:65)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

@PixsaOJ
Copy link
Author

PixsaOJ commented Sep 15, 2024

This was due to Zendesk requiring Desugaring.

Add this to the end of app.gradle

gradle.taskGraph.whenReady { taskGraph ->
    taskGraph.allTasks.each { task ->
        // Check for the desugaring task (l8DexDesugarLibDebug) and compileDebugArtProfile
        if (task.name.contains("l8DexDesugarLibDebug") || task.name == 'compileDebugArtProfile') {
            println "Desugaring or ART profile task detected: Disabling ART profile tasks"
            tasks.matching { it.name.startsWith("compile") && it.name.endsWith("ArtProfile") }.configureEach {
                it.enabled = false
                println "Disabled ${it.name} due to desugaring"
            }
        }
    }
}

P.s checking for l8DexDesugarLibDebug task is not required i think

@PixsaOJ PixsaOJ closed this as completed Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-pending-triage Reported bug, pending triage to confirm.
Projects
None yet
Development

No branches or pull requests

1 participant