shorebird icon indicating copy to clipboard operation
shorebird copied to clipboard

fix: Azure pipeline failing for Android

Open eseidel opened this issue 1 year ago • 7 comments

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?

eseidel avatar May 05 '24 16:05 eseidel

it does brake when I try to build android as well!

MatyasK avatar May 06 '24 09:05 MatyasK

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

eseidel avatar May 06 '24 15:05 eseidel

image image2 image3

eseidel avatar May 06 '24 15:05 eseidel

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?

eseidel avatar May 06 '24 15:05 eseidel

It's also not this one: https://github.com/shorebirdtech/flutter/blob/25bc2b57a159f5b52385c4adb5c80f6ed25ae6d5/packages/flutter_tools/lib/src/base/os.dart#L413

eseidel avatar May 06 '24 15:05 eseidel

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.

eseidel avatar May 06 '24 15:05 eseidel

yes sure I email you the entire log!

MatyasK avatar May 07 '24 12:05 MatyasK

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

eseidel avatar May 30 '24 15:05 eseidel

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!

erickzanardo avatar May 30 '24 15:05 erickzanardo

My email got rejected, I sent it you again. (We are still experiencing this issue, and we getting closer to go live with shorebird)

MatyasK avatar May 31 '24 14:05 MatyasK

Great! We would love to help!

eseidel avatar May 31 '24 14:05 eseidel

From the email chain, looks like gradle is complaining that JAVA_HOME points to an invalid directory.

eseidel avatar May 31 '24 15:05 eseidel

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 avatar Jun 12 '24 21:06 eseidel

@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

erickzanardo avatar Jun 19 '24 14:06 erickzanardo

sg. Let's close and wait for the next report. thanks!

eseidel avatar Jun 19 '24 15:06 eseidel

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!

MatyasK avatar Jun 19 '24 15:06 MatyasK

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!

erickzanardo avatar Jun 19 '24 16:06 erickzanardo