fix: Azure pipeline failing for Android
We got one report of Asure pipeline builds failing due to recent changes. It appears those use x64. I wonder if we could have broken iOS builds from x64?
it does brake when I try to build android as well!
@MatyasK clarified on Discord they're not using iOS, only Android, so this is not what I had thought it might be. (I was worried we had done something wrong in our Dart toolchain.)
It looks like gradle is exiting.
I see now the sysctl mesage is just a warning. I had thought we might be hitting this case: https://github.com/shorebirdtech/flutter/blob/shorebird/dev/bin/internal/update_dart_sdk.sh#L80
But we're not. I think based on that logging style maybe the sysctl call is coming from within gradle (rather than update_dart_sdk?
It's also not this one: https://github.com/shorebirdtech/flutter/blob/25bc2b57a159f5b52385c4adb5c80f6ed25ae6d5/packages/flutter_tools/lib/src/base/os.dart#L413
Are you able to share the entire log? Mailing to [email protected] is fine if you don't want to paste it here. I'm still not sure we're looking at the right error.
yes sure I email you the entire log!
@erickzanardo was looking at this just now. I searched my inbox, I don't think the log came to [email protected], but maybe I missed it.
Closing due inactivity, in case this is still a problem to you, feel free to send us the logs we mentioned above and we can re open this!
My email got rejected, I sent it you again. (We are still experiencing this issue, and we getting closer to go live with shorebird)
Great! We would love to help!
From the email chain, looks like gradle is complaining that JAVA_HOME points to an invalid directory.
This would suggest that our JAVA_HOME finding is not exactly matching flutters?
Would help to have the output of flutter doctor -v and shorebird doctor -v to compare.
@eseidel our JAVA_HOME matches the Flutter's, I have been working recently on this and the code is pretty much the same.
If there is an Android Studio installed, we will try to use its embed Java SDK. If not, it will use the path in the JAVA_HOME environment variable.
Since this is a CI, it wouldn't make much sense to have AS installed, so I bet that either the JAVA_HOME variable is not set, or it contains the wrong path.
The JAVA_HOME variable is a read only variable for the shorebird cli, so I guess that the solution here is to check how Azure is configuring that variable and adjust it accordingly
sg. Let's close and wait for the next report. thanks!
So the JAVA_HOME was indeed incorrect however I did not change anything in our pipeline script and it worked for a while! But thanks for the help and support!
So the JAVA_HOME was indeed incorrect however I did not change anything in our pipeline script and it worked for a while! But thanks for the help and support!
That is odd, we didn't changed how we read JAVA_HOME on shorebird cli too, so hard to say what went triggered the issue.
If you find any more issues, please, let us know and we will be happy to try to figure it out!