Skip to content
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

[BUG] 'flutter_background' blocking build #77

Closed
5 tasks done
andreystavitsky opened this issue Nov 26, 2022 · 14 comments · Fixed by #78
Closed
5 tasks done

[BUG] 'flutter_background' blocking build #77

andreystavitsky opened this issue Nov 26, 2022 · 14 comments · Fixed by #78
Labels
bug high priority Should be worked on before other issues
Milestone

Comments

@andreystavitsky
Copy link

What is the bug?

Due to outdated gradle version in currentrly published flutter_background plugin, this plugin cannot be built.
There's an issue for this.

That was fixed in fcce0d57525802b6f720dee0a080a10a0feaca4b, but published version of that plugin does not contain this commit.

> Could not resolve com.google.jimfs:jimfs:1.1. Required by: project :flutter_background > com.android.tools.build:gradle:3.5.0 > com.android.tools.build:builder:3.5.0 > com.android.tools:sdklib:26.5.0 > com.android.tools:repository:26.5.0 > Could not resolve com.google.jimfs:jimfs:1.1. > Could not get resource 'https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom'. > Could not HEAD 'https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom'. > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties > PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed

What is the expected behaviour?

Build successful

How can we reproduce this issue?

No response

Do you have a potential solution?

No response

Can you provide any other information?

No response

Platforms Affected

Android

Severity

Fatal: Causes the application to crash

Frequency

Consistently: Always occurs at the same time and location

Requirements

  • I agree to follow this project's Code of Conduct
  • My Flutter/Dart installation is unaltered, and flutter doctor finds no relevant issues
  • I am using the latest stable version of this package
  • I have checked the FAQs section on the documentation website
  • I have checked for similar issues which may be duplicates
@andreystavitsky andreystavitsky added bug needs verification This needs to be verified/tested before fixes (or not) can be made labels Nov 26, 2022
@stx
Copy link

stx commented Nov 26, 2022

Critical breaking issue for our apps. Trigger is because jcenter's SSL cert expired:

image

@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Nov 26, 2022

Hey @andreystavitsky and @stx, and thanks for letting me know.

For now, you may be able to use a dependency override in your pubspec.yaml. To depend on a git commit, see https://dart.dev/tools/pub/dependencies#git-packages. To override a dependency, see https://dart.dev/tools/pub/dependencies#dependency-overrides.

I won't be able to fix this in this project until a published version is released (I've pinged the author of the package in the issue you linked), because pub.dev packages cannot depend on packages from Git.

Please try this and let me know how it works out!

@JaffaKetchup JaffaKetchup added high priority Should be worked on before other issues blocked Something else needs to be completed first and removed needs verification This needs to be verified/tested before fixes (or not) can be made labels Nov 26, 2022
@JaffaKetchup JaffaKetchup changed the title [BUG] unable to build due to flutter_background [BUG] 'flutter_background' blocking build Nov 26, 2022
@JaffaKetchup JaffaKetchup pinned this issue Nov 26, 2022
@andreystavitsky
Copy link
Author

Hello @JaffaKetchup
with dependency override build works

dependency_overrides:
flutter_background:
git:
url: "https://github.com/JulianAssmann/flutter_background.git"

@JaffaKetchup
Copy link
Owner

That's what I hoped @andreystavitsky :)
Please use this for the time being.

@JaffaKetchup
Copy link
Owner

@stx @andreystavitsky With v7 release fast approaching, I'd like to ask a question. Do you think it would be more appropriate to have a seperate package providing the background download functionality?

Pros:

  • Easier to setup this package
  • Fewer dependencies in this package
  • Background downloading is only supported on Android and has very few users (I would imagine) anyway, so seperating would make platform support clearer

Cons

  • More effort to setup background downloading
  • Can you think of any others?

@andreystavitsky
Copy link
Author

andreystavitsky commented Dec 31, 2022

@JaffaKetchup my vote is for separate package

P.S. Happy New Year and thanks for your work!

@JaffaKetchup
Copy link
Owner

And the same for the import/export functionality, or is that too far?

Happy new years to both of you as well :)

@andreystavitsky
Copy link
Author

And the same for the import/export functionality, or is that too far?

I think that main purpose of this plugin is caching, and as for me, I currently needed caching only. Import\export and background downloading, for the other hand, look more suitable for each other. It's my personal opinion, of course.

@stx
Copy link

stx commented Dec 31, 2022

@JaffaKetchup Intuitively, when I saw this package I was surprised when I read about background downloading. I think almost everyone looking for this package is just looking for your typical caching (make network request, save it and reuse it.)

I think background downloading and loading is a specific, heavy enough load to justify its own package.

Hope that helps!

@JaffaKetchup
Copy link
Owner

Thanks guys :) I think I'm going to seperate both import/export and background bulk download (I'll leave bulk download in base, as it doesn't add any dependencies) into their own seperate packages.

@aytunch
Copy link

aytunch commented Jan 2, 2023

I agree with the general consensus. This plugin should concentrate on caching and import/export/bg_download can be handled separately.

@ElDavoo
Copy link

ElDavoo commented Jan 9, 2023

FYI, this is another error you may get:

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':flutter_background' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

Just copy-pasting if someone is searching with these keywords

@JaffaKetchup JaffaKetchup linked a pull request Jan 13, 2023 that will close this issue
@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Jan 17, 2023

@stx Can you change your override to point to the new version on pub.dev? Let me know if it works.

@andreystavitsky
Copy link
Author

@JaffaKetchup I can confirm that with 1.2.0 my application was successfully built.

@JaffaKetchup JaffaKetchup added in progress and removed blocked Something else needs to be completed first labels Jan 22, 2023
@JaffaKetchup JaffaKetchup added this to the v7 milestone Feb 1, 2023
@JaffaKetchup JaffaKetchup unpinned this issue Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high priority Should be worked on before other issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants