Nativescript-plugin-firebase: @nativescript/firebase 11.0.0-rc.5 plugin fails with Error: spawn ./gradlew EACCES

Created on 4 Sep 2020  路  13Comments  路  Source: EddyVerbruggen/nativescript-plugin-firebase

The latest firebase plugin @nativescript/firebase 11.0.0-rc.5 with {N} 7 fails with Error: spawn ./gradlew EACCES during compilation. The reason i could find was that the gradlew file is created corrupt. The warn(), die() & save() methods are created with a space inside the paranthesis as warn ( ), die ( ) & save ( ). please check and fix it.

image

image

Most helpful comment

@Salahudeen someone mentioned that on Slack earlier today - we're still digging into some cases - My advice would be if this plugin is blocking your ability to update to {N} 7, just stay on {N} 6 until we publish a final latest version which I would anticipate would land sometime next week at latest.

All 13 comments

got the same error for nativescript-plugin-firebase v:10.5.2
nativescript/core: 7.0

looking online I found this as the fix for this : https://stackoverflow.com/questions/54541734/spawnsync-gradlew-eacces-error-when-running-react-native-project-on-emulator-u

But, when I tried after updating the permissions on the files generated in platforms/tempPlugin/nativescript_plugin_firebase I found those files are regenerated at build time, with the same chmod permissions (644)

Looking for a solution here...!

I tried that too, but i realized that permission is not the issue, the file gradlew under the folder platforms/tempPlugin/firebase is created corrupt. The warn(), die() & save() have an extra space inside the parathesis. I fixed this manually and it becomes and excutable. But @samarth-math mentioned its overwriten at build time.... Tried checking the @nativescript/firebase package to see if i can modify it, but i coudnt find it....Right now, i have commented out the firebase implementation, need the author help to fix this.

@samarth-math Which version of X-Code are you using? Mine is Version 10.3 (10G8). Not sure if this is the cause....

@Salahudeen I'm using XCode 11.7 and have the same problem

@Salahudeen I'm not using xcode, I'm working on a linux environment and building for android... I have the sdk etc installed through studio, and using vscode, so it's probably not related to xcode.

The problem is related to this issue.

You can use the work-around I provide in there, until a proper fix is added to the CLI tool.

Thanks @SzaboKrisztian! This solved the above mentioned issue, but now i am stuck with a new error..

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':javaPreCompileRelease'.
    > This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.

BUILD FAILED in 1s
Failed to build plugin @nativescript/firebase :
Error: Command ./gradlew failed with exit code 1

I searched for gradle.properties file and found one under @nativescript/android/framework folder. But, these settings are already defined as true on these files as shown below:

android.enableJetifier=true
android.useAndroidX=true

Workaround suggested did not help to solve, but migrating to nativescript version released 3 days back helped to solve the issue.

For me neither of those things solved anything and I still see the same issue cropping up

@samarth-math I installed this specific version of Nativescript CLI [7.0.6-2020-09-07-183913-14253]. It solved the build issues for me, but I am stuck with runtime errors for google auth, with promise resolutions

The CLI tagged release 7.0.6-2020-09-07-183913-14253 worked for me as well.

Does any have issue with firebase google auth? or is it only me? i get the follwoing error at runtime...

JS: Error in firebase.login: TypeError: Cannot set property 'resolve' of undefined

@Salahudeen someone mentioned that on Slack earlier today - we're still digging into some cases - My advice would be if this plugin is blocking your ability to update to {N} 7, just stay on {N} 6 until we publish a final latest version which I would anticipate would land sometime next week at latest.

Was this page helpful?
0 / 5 - 0 ratings