OPENER-next / OpenStop

App for collecting OpenStreetMap-compliant accessibility data in public transport
https://openstop.app
GNU General Public License v3.0
63 stars 13 forks source link

F-Droid build failed #224

Closed linsui closed 1 day ago

linsui commented 7 months ago

Problem

https://gitlab.com/fdroid/fdroiddata/-/jobs/5636228675

The libflutter.so files are different, which generally means that we used different flutter version. We use the version defind in pubspec.yml. Is that changed?

Which app version do you use?

0.6.0

What operating system do you use?

Android

What operating system version do you use?

No response

Additional information

No response

licaon-kter commented 7 months ago

The libflutter.so files are different

Interesting that libapp.so is not different :+1:

Robbendebiene commented 7 months ago

Thanks for the report.

The libflutter.so files are different, which generally means that we used different flutter version. We use the version defind in pubspec.yml. Is that changed?

No this hasn't changed. See:

https://github.com/OPENER-next/OpenStop/blob/245b59d3c70a570e24f4c6617e5f097d837f22a3/.github/actions/environment_setup/action.yml#L16-L27

For flutter --version our build logged:

Flutter 3.13.4-0.0.pre.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0daa737b7 (3 months ago) • 2023-09-12 17:01:41 -0700
Engine • revision 17a711a776
Tools • Dart 3.1.1 • DevTools 2.25.0

Unfortunately this call is missing in the F-Droid build script. But when I run this locally

git clone --depth 1 --branch 3.13.3 https://github.com/flutter/flutter.git
flutter --version`

I get

Flutter 3.13.3 • channel [user-branch] • unknown source
Framework • revision 2524052335 (vor 3 Monaten) • 2023-09-06 14:32:31 -0700
Engine • revision b8d35810e9
Tools • Dart 3.1.1 • DevTools 2.25.0

So for some reason we end up with 2 different flutter versions.

I suspect the subosito/flutter-action@v2 action. But before going further @licaon-kter @linsui can you please add flutter --version to https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/de.tu_chemnitz.etit.sse.openstop.yml#L152-161 so we can verify this better?

licaon-kter commented 7 months ago

You can see the command the recipe uses to get the right Flutter version in line https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/de.tu_chemnitz.etit.sse.openstop.yml#L141 what if you run it too, what do you get?

Maybe that line needs a new updated command that extracts the version?

Robbendebiene commented 7 months ago

You can see the command the recipe uses to get the right Flutter version in line https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/de.tu_chemnitz.etit.sse.openstop.yml#L141 what if you run it too, what do you get? Maybe that line needs a new updated command that extracts the version?

We also get 3.13.3 so I don't think there is anything wrong with the version extraction.

linsui commented 7 months ago

So the problem is that you should use 3.13.3 but somehow 3.13.4-0.0.pre.2 is used.

Robbendebiene commented 7 months ago

So we found the cause.

The Github action we use normally downloads flutter not from Github but from the flutter archive, in this case: https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.13.3-stable.tar.xz Note the correct release version in the URL. However if you actually run bin/flutter --version inside the archive it returns 3.13.4-0.0.pre.2.

Someone @flutter must have messed something up:

grafik source: https://storage.googleapis.com/flutter_infra_release/releases/releases_linux.json


Conclusion: We changed it in #225 and will make a new release.

licaon-kter commented 1 week ago

can you reopen?

I see https://gitlab.com/fdroid/fdroiddata/-/jobs/7145399969#L454

So I replace python-yq with yq, no biggie...

but then I build and: stop080.log

it's not repro? :(

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/53115053bc3f71688e518945c976265137399d14

a-andre commented 1 week ago

@licaon-kter Have you tried pip3 install --break-system-packages yq?

licaon-kter commented 1 week ago

No, wow, is there such a big diffrence in operation between yq and python-yq?

a-andre commented 1 week ago

If I remember right, there was a problem with older versions of yq, but that seems to be solved. yq and python-yq create the same pubspec.yaml now.

https://gitlab.com/fdroid/fdroiddata/-/commit/53115053bc3f71688e518945c976265137399d14

With pip3 install removed, python3-pip is no longer needed. jq can also be removed, because it will be installed as a dependency of yq.

7h30n3 commented 4 days ago

@licaon-kter We have found out that the mismatch between the used Java versions caused the issue. We will update our build script for the GitHub action to use Java 17 and release a new version.