EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

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

Open Salahudeen opened 3 years ago

Salahudeen commented 3 years ago

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

samarth-math commented 3 years ago

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...!

Salahudeen commented 3 years ago

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.

Salahudeen commented 3 years ago

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

pmiguelmartins commented 3 years ago

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

samarth-math commented 3 years ago

@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.

SzaboKrisztian commented 3 years ago

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.

Salahudeen commented 3 years ago

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

FAILURE: Build failed with an exception.

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

Salahudeen commented 3 years ago

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

samarth-math commented 3 years ago

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

Salahudeen commented 3 years ago

@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

keerl commented 3 years ago

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

Salahudeen commented 3 years ago

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

NathanWalker commented 3 years ago

@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.