Skip to content

Can't build latest plugin (Windows 10, Unity 2017.3) #27

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

Open
timezinfinity opened this issue Feb 6, 2018 · 15 comments
Open

Can't build latest plugin (Windows 10, Unity 2017.3) #27

timezinfinity opened this issue Feb 6, 2018 · 15 comments

Comments

@timezinfinity
Copy link

The latest code seems to build fine but always fails when trying to copy files. I have verified all files exist and are accessible. If I run with stacktrace enabled it shows a FileNotFoundException with (Access Denied). However, the file does in fact exist and is readable.

FAILURE: Build failed with an exception.

  • Where:
    Build file 'E:\GoogleUnity\build.gradle' line: 98

  • What went wrong:
    Execution failed for task ':copy_unity_project'.

Could not copy file 'E:\GoogleUnity\GoogleSignInPlugin\Assets\GoogleSignIn\Editor\google-signin-plugin_v1.0.0.txt.meta' to 'E:\GoogleUnity\build\GoogleSignInPlugin\Assets\GoogleSignIn\Editor\google-signin-plugin_v1.0.0.txt.meta'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.598 secs

@timezinfinity timezinfinity changed the title Can't build latest plugin Can't build latest plugin (Windows 10, Unity 2017.3) Feb 7, 2018
@timezinfinity
Copy link
Author

Tested on different machine with fresh Windows 10, fresh install of Android Studio, fresh JDK etc. Same issue.

@timezinfinity
Copy link
Author

Manually copying the files results in this error:

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Projects\GoogleSignIn\build.gradle' line: 340
  • What went wrong:
    Execution failed for task ':inject_versionIntoMetaFiles'.

C:\Projects\GoogleSignIn\build\GoogleSignInPlugin\Assets\GoogleSignIn\Editor\google-signin-plugin_v1.0.0.txt.meta (Access is denied)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    BUILD FAILED

@dwulive
Copy link

dwulive commented Feb 12, 2018

Same problem here.

@PiotrKarczmarz
Copy link

Same issue. Please fix.

@dwulive
Copy link

dwulive commented Feb 13, 2018

Is there a way to work around the issue by not building an asset pack? All that I want to do is rebuild the binaries in a way that I can update the source files to return more error codes. I am not familiar with building on Android so I am not sure where to begin.
We are getting "Error" often and that could be one of many error codes.

@stanislavkaliuk
Copy link

I have that problem:

C:\Users\user\Downloads\google-signin-unity-master>gradlew -PlintAbortOnError build_all
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Incremental java compilation is an incubating feature.
:copy_jarresolver FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':copy_jarresolver'.

A problem occurred starting process 'command 'git''

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Does someone have this issue?

@vanilla-plus
Copy link

vanilla-plus commented Jul 2, 2018

@stanislavkaliuk I'm getting this too. Did you find anything out? If I also run a stacktrace, it points to this:

Caused by: java.io.IOException: Cannot run program "git" (in directory "<my-local-directory-obscured>\google-signin-unity-master"): CreateProcess error=2, The system cannot find the file specified at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)

It could be something I'm misunderstanding about the build process, I'm not too certain.

@rtlsilva
Copy link

rtlsilva commented Aug 24, 2018

I'm also having this issue on Windows 10 + Unity 2018.2.3f1 (the access denied error message).
The cause seems to be that when the project's Gradle tasks run Unity in batch mode to import the project, it generates hidden .meta files, which Gradle then somehow fails to pick up later in the task chain.

I have tried placing an EditorSettings.asset defining visible meta files in the GoogleSignInPlugin/ProjectSettings folder (hoping that Unity would use it instead of a default) and creating a Gradle task that runs attrib -h /s *.meta to attempt to unhide the meta files during the build process.

Both attempts were unfruitful. I have also tried looking for where the default EditorSettings.asset file is stored or generated, but to no avail.

@BhSmasher
Copy link

I have that problem:

C:\Users\user\Downloads\google-signin-unity-master>gradlew -PlintAbortOnError build_all
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Incremental java compilation is an incubating feature.
:copy_jarresolver FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':copy_jarresolver'.

A problem occurred starting process 'command 'git''

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Does someone have this issue?

Hi dude, I have the same problem, do you find any answer for it?

@notpresleybutelvis
Copy link

Hey guys, I'm trying to build this plugin too, I'm trying this on a Windows 10 OS
I've somehow resolved this error. This is what I've done, hope it helps

  1. Run cmd as an administrator
  2. If you have a build folder in the google-signin-unity-master folder, delete it

However, I'm now getting some other errors while gradlew executes the inject_versionIntoMetaFiles task

* Where:
Build file 'E:\work\google-signin-unity-master\build.gradle' line: 343

* What went wrong:
Execution failed for task ':inject_versionIntoMetaFiles'.
> java.io.FileNotFoundException: E:\work\google-signin-unity-master\build\GoogleSignInPlugin\Assets\GoogleSignIn\Editor\google-signin-plugin_v1.0.0.txt.meta (Access is denied)

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

@notpresleybutelvis
Copy link

Thanks to @claywilkinson in this thread I noticed that the prebuild .unitypackage is available on the Releases tab. You can download it from there.

@IneOtherGuys
Copy link

C:\Projects\GoogleSignIn\build\GoogleSignInPlugin\Assets\GoogleSignIn\Editor\google-signin-plugin_v1.0.0.txt.meta (Access is denied)

Also happening to me, Unity 2018.1.3, WIndows 10. And I had to fix like 4 other errors before that to get here. This is really frustrating. I need to build the plugin so I can fix 2 bugs that aren't being fixed (one's been in pull request for a while now, the other's been an open bug for months as well)...

@Mukikaizoku
Copy link

@IneOtherGuys Same here, it has been crazy trying to fix issue after issue to get the building to work (and still haven't). I'm using Unity 2019.2.0f1 and Windows 10 and upgrade Gradle to 5.6 for compatibility with the JDK I have installed.

Any luck figuring it out?

I finally got the sample working so I'm pausing this adventure trying to get the build process to work, but I did notice that there are build.gradle files within native-googlesignin and staging/native. The next thing I was going to try is just build the .aar and not deal with the Unity package generation.

@marianomdq
Copy link

Anybody got any luck with this?

Also having the same issue in Unity 2019.4.0f1 and MacOS 10.14.5. Already tried giving read/write access to the whole google-signin-unity folder.

java.io.FileNotFoundException: /Users/mariano/dev/google-signin-unity/build/GoogleSignInPlugin/Library/PackageCache/com.unity.purchasing@2.0.6/package.json.meta (Permission denied)

@marianomdq
Copy link

I've found a solution, but it's not a cool one.

  • Run sudo visudo
  • Add all the needed env variables for building the plugin like explained in here
  • Run sudo ./gradlew build_all

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

No branches or pull requests