-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Firebase builds and Android - (ios references and python missing from Android images) #100
Comments
For very small projects or a very slow data connection this could be true - in which case there is the solution of self-hosted runners. We have consciously chosen against this because it eliminates our preference for parallelization. The bottleneck is usually not in the downloading of the image (which would even be substantially bigger in the suggested approach) but the build process itself - especially concerning CPU time. Parallelisation is important for by far most cases that we know of. Please note that in the opening post the problem is not described clearly - just the solution. This makes it harder to think along. Could you please elaborate on the problem we're trying to solve here? Is it about
Could you speak further for the actual use case that would make this preferable? |
Sorry for the confusion - I was not meaning to build both iOS and Android in the same build step, and agree that a preference for parallelization is definitely worth while. The specific issue I have faced is when including the Firebase libraries I get the above errors. This is something that Google is working on trying to solve, but from what I have managed to find it could be tricky or not possible - as the required preprocessor commands to exclude the iOS libraries cannot be run for their final package. This is where I was mentioning 'some projects' and on reading back should have been a lot clearer - this is a problem with any Android project that includes an external library with iOS code included, where I might see a lot of them including the Firebase or other Google libraries. The current workaround for this issue is to include the iOS module in the Unity - regardless of if it is being used. This looks to be an issue with the newer 2020 versions of Unity as pointed out in this comment, where I can only assume in the earlier versions it might have been a silent warning instead of an error. For us - I am still looking into this issue on the side, as there may be other workarounds as well as getting myself more familiar with the Dockerimage process. Will update if I find anything worth while |
I may have found a workaround for now - buried in the plugin settings you can Disable the validation (didn't understand that error properly to see that option). The next problem seems to be that
I have also updated the issue to better reflect the issue that's happening here, for others to find. EDIT: Added image to illustrate the option |
Currently, python is only included on webGL and linux-IL2CPP. |
Yes, please. However if there is a known workaround, I'd give it a try. |
Argh - I fogot to update >.< I did have a bit of a workaround (at least for my situation). It's pretty much installing Python before running my build scripts with |
Accepting a PR for this. |
Would be amazing to have a simple symlink in the docker images. Either installing python 2 with |
Can we assume that by now it's ok to go with Python 3 only and use your second suggestion? We're open to PRs with your suggested changes. |
As Python3 is 22 megs (compared to 2GB that we're pulling already, at a minimum) and installing it solves a category of problems like those of Firebase, I would suggest that we install it on all platforms by installing it in the base image - simplifying the Dockerfile per-platform snippets. What do you think? |
@webbertakken you can also solve it by just installing |
Thank you for your input @mastef By "just installing |
Ubuntu image ubuntu:18.04 (which we are using in the base image) is already come with python3 preinstalled. But firebase is trying to use python, That's why we have created just symlink to fix the issue. |
Ah check. In that case I suggest we make that symlink in the base image and remove links and installs elsewhere. |
There’s a package called Haven’t tried it in a docker image yet |
Please review. #160 Could any firebase user manually build the image to see if it works for you? Then we can roll this out for everyone. |
This turned out to not be true. It has Python2 installed. |
Context
Due to the nature of some projects - it might be quicker to combine and download a single image that contains both the Android and iOS modules. This would also help address builds that require the use of the
UnityEditor.iOS.Extensions.Xcode
reference (which seems to be a common thing if you integrate with Firebase/Google libraries)googlesamples/unity-jar-resolver#412
Suggested solution
Create a new image with the module type
mobile
or possiblyandroid-ios
if this would mean there is less work for the remainder of the build scripts. This image would contain both the Android and iOS modules installed.Considered alternatives
None I can think of
Additional details
Ideally, this would not be required, but due to the later versions of Unity being stricter with the reference inclusion this silently breaks apps as the required libraries are disabled during the build process. It appears Google is working on their issue, though I could see a benefit for a combined base image in the future for cross mobile platform builds.
The text was updated successfully, but these errors were encountered: