Closed licaon-kter closed 1 year ago
librust.so is a required dependency. It parses and writes metadata for mp3/m4a/ogg/floc etc audio formats Removing it from the build will definitely cause error
Also not sure about rebuilding librust in the pipeline. Is it a good idea?
As said, we rebuild it... Also the error above is at build time, not while running the app... we did not reach that step yet. :)
What's next? Which Flutter version did you use?
Also the error above is at build time, not while running the app... we did not reach that step yet. :)
yeah right
What's next? Which Flutter version did you use?
v3.7.3
Btw, this workflow might help you https://github.com/KRTirtho/metadata_god/blob/v0.3.2/.github/workflows/build-libs.yaml
Also, the pipeline using Java 8 right?
Oh... Ok. In 2.7.0 I added a .env file which is required
@licaon-kter is there any way to provide the content of the .env file without exposing them?
Because, exposing those secrets can exploit user security plus can give bad actors access to the backend (https://spotube.pockethost.io/)
Root of the issue output:
[ ] Successfully started process 'command '/home/vagrant/build/srclib/flutter/bin/flutter''
[+86100 ms] Error detected in pubspec.yaml:
[ ] No file or variants found for asset: .env. <--- this is causing the build error
[+34297 ms] Target aot_android_asset_bundle failed: Exception: Failed to bundle asset files.
[+4799 ms] > Task :app:compileFlutterBuildRelease FAILED
[ +99 ms] Android Lint: Disposing Uast application environment in lint classloader [30.2.1]
[ +100 ms] FAILURE: Build failed with an exception.
[ ] * Where:
[ ] Script '/home/vagrant/build/srclib/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1151
is there any way to provide the content of the .env file without exposing them?
No... we have no secrets... your recipe already provides some: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/oss.krtirtho.spotube.yml#L212-L213 are those not enough?
Btw, this workflow might help you https://github.com/KRTirtho/metadata_god/blob/v0.3.2/.github/workflows/build-libs.yaml the pipeline using Java 8 right?
Yeah, saw it, but I kinda ignored Java 8 :) Since last year we switched to Debian Bullseye so it's Java11 by default. But I can have it use Java8 if needed.
Well... once you clarify what .env
should contain.
Luckily, the app can run without the backend. So the basic info will get the job done. Let's do this workaround for this release, in the next one I'll use a better way of connecting to backend
So create the .env in project root before flutter build
$ echo "POCKETBASE_URL=https://spotube.pockethost.io/" >> .env
Taking it for a spin now
Can you test the APK? (remove .zip
and unpack .001 with 7zip)
st.7z.001.zip
st.7z.002.zip
st.7z.003.zip
st.7z.004.zip
Another thing, it does not make sense to check for updates for the F-Droid build, so, is it enough to set this to false
at build time? https://github.com/KRTirtho/spotube/blob/v2.7.0/lib/provider/user_preferences_provider.dart#L51
Yeah, an Env variable to toggle this on and off must be added
Cannot open archive. 7z not working
$ 7zz e st.7z.001
7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
64-bit locale=en_US.UTF-8 Threads:4, ASM
Scanning the drive for archives:
1 file, 9437184 bytes (9216 KiB)
Extracting archive: st.7z.001
ERROR: st.7z.001
st.7z
Open ERROR: Cannot open the file as [7z] archive
ERRORS:
Unexpected end of archive
Can't open as archive: 1
Files: 0
Size: 0
The archive files work fine for me, delete them and redownload :shrug:
Can you provide me this with a zip format. I don't know why these are not working. Other 7z files working fine
ZIP can't do multivolumes and the upload size is limited here :shrug:
Did you save and renamed all 4 files before trying to unpack?
/LE:
is it enough to set this to false at build time? https://github.com/KRTirtho/spotube/blob/v2.7.0/lib/provider/user_preferences_provider.dart#L51
And the answer is ... no... as that makes it ... fail to build :scream:
And the answer is ... no... as that makes it ... fail to build scream
No it should build, this means by default the update checker will be toggled off
Oh it was fragmented 7zip. I thought those are separate arch apk (aarch64, arm32, x86, x64) :sweat_smile: Was able to extract it
And I can confirm everything is still working as expected in the app
I've retried now and it build fine :facepalm: nvm me then
Anyway, that line works fine, check update is disabled and the app does not start to connect to Github right away.
So, can we update the recipe to include this?
Yup
No, thank you. You're helping so much in the open source community. Keep up your great service :+1:
Regarding flutter, any chance you could add it as a submodule in your repo?
It will erase the need to manually open MRs when updating Flutter version, as you control the version directly here
ref: https://git-scm.com/book/en/v2/Git-Tools-Submodules
and ref: https://gitlab.com/fdroid/fdroiddata/-/blob/master/templates/build-flutter.yml
Just using .gitmodules
?
But I already have a fvm configuration in the .fvm
which is a natural way of handling flutter versions
Can f-droid use fvm automatically when it detects the .fvm/flutterSdkVersion
file?
This is news to me, is this a new thing or? I don't recall Flutter devs using this so far... we're mostly guessing the version and "hope latest works" :)
fvm has been around for a while now😄
I guess that most projects that are in F-Droid might not use it then
You can always make it a requirement for flutter apps. It's better to keep track of Flutter versions for your app then failing on CI
@licaon-kter Spotube 2.7.0 is still not available in the fdroid repo. Was there any problem building it?
I'll make an MR with the fix
It was more than this: https://gitlab.com/fdroid/fdroiddata/-/commit/c7e38b623e8dad0b1a521b716bfeaf4e4d70bd6e ? :)
Builds fine
Man I fixed it already but forgot to create an MR 😂 All 3 hours in vain 🥲 Great work btw! Sorry for all the trouble ❤️
Recipe needs an update
So fails with: https://gitlab.com/fdroid/fdroiddata/-/jobs/4580191732#L779
Looks like maybe you forgot to bump flutter version? https://github.com/KRTirtho/spotube/blob/v3.0.0/.fvm/fvm_config.json#L2
Let me set it to 3.10.5 (latest stable) locally
Error when reading 'bin/create-secrets.dart': No such file or directory.
Oh... https://github.com/KRTirtho/spotube/tree/v3.0.0/bin
What now?
/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/27476875c11e7f423a2cf239d03323dffdaf9100
Oops sorry. I always forget to update F-Droid scripts
I'll update it and create a MR
Closing as it is resolved now
It can be re-opened if same issue is face again
We need the lastFmApiKey for 3.2.0. Could you please update the metadata? Thanks!
Yea sure sure. Why do I always forget about F-Droid! :facepalm:
Saw version 17 fail: https://gitlab.com/fdroid/fdroiddata/-/jobs/3891617399
So I tried to bump Flutter to 3.7.6, but that brought up
librust.so
binary deps to the surface: https://gitlab.com/fdroid/fdroiddata/-/commit/493af32591b1b93607b30f9557a2e0c6b3a755b5#note_1305278538OK, so I built that too: https://gitlab.com/fdroid/fdroiddata/-/commit/1e3e91193e2a6c7003a351fe1499a84bd6a37d0f
But still fails later in Flutter: oss.krtirtho.spotube_17.log.gz