Code Monkey home page Code Monkey logo

Comments (19)

vanlooverenkoen avatar vanlooverenkoen commented on July 24, 2024 5

For now, I just use:

dependency_overrides:
  win32: 3.1.4

because that was the dependency that was causing issues.

from wakelock.

martin-formigas avatar martin-formigas commented on July 24, 2024 5

Also created this as a PR: #213

from wakelock.

gabrielginter avatar gabrielginter commented on July 24, 2024 5

Consider switching to https://pub.dev/packages/wakelock_plus
Published by fluttercommunity.dev

It is a continuation of this project, so there shouldn't be any issues.

from wakelock.

mpillawa avatar mpillawa commented on July 24, 2024 2

We still need an update of wakelock, because we need win32: 5.0.3 and wakelock requires win32 ^2.0.0 or ^3.0.0

from wakelock.

Goddchen avatar Goddchen commented on July 24, 2024 2

Also this part will be an issue since Flutter 3.10 uses Dart >=3.

environment:
  sdk: '>=2.12.0 <3.0.0'

from wakelock.

martin-formigas avatar martin-formigas commented on July 24, 2024 1

For a temporary workaround, I have forked the repo and upgraded the dependency constraints. If you want to use it until an official update is available:

dependency_overrides:
  wakelock_windows:
    git:
      url: [email protected]:formigas/wakelock.git
      path: wakelock_windows/
      ref: main
dependencies:
  wakelock:
    git:
      url: [email protected]:formigas/wakelock.git
      path: wakelock/
      ref: main

from wakelock.

Goddchen avatar Goddchen commented on July 24, 2024 1

@aytunch hm strange, the And because pod_player >=0.1.1 depends on wakelock ^0.6.2 and the dependency_overrides for wakelock existing at the same time doesn't make real sense to me. Sorry, I have no idea how that could happen or how to solve it.

from wakelock.

gabrielginter avatar gabrielginter commented on July 24, 2024 1

@thomasklaush by looking at the frequency of updates on this package, we might need to wait a while (not a criticism to the maintainer, we all have stuff going on).

My recommendation to anyone looking for a reliable solution would be to download the package locally, make all the package updates you require and override the reference on your app's pubspec to point at your local folder, that's what I have done until this package gets an update, this way you don't rely on other people's repositories.

I'll upload in the next few hours my version in a ZIP file for anyone that wants to use it locally.

from wakelock.

gabrielginter avatar gabrielginter commented on July 24, 2024 1

Sorry the delay, here it is:

wakelock-main.zip

place the file at the same level as your project folder (1 level up from your pubspec.yaml)

then edit your pubspec.yaml reference like:

wakelock:
  path: ../wakelock-main/wakelock

I also have an override for win32 as follows:

dependency_overrides:
  win32: ^5.0.2

I'm not sure if you'll need this win32 override though

Hope it helps

from wakelock.

kamyar75 avatar kamyar75 commented on July 24, 2024

I am having this problem and I don't know what to do

from wakelock.

XHZ360 avatar XHZ360 commented on July 24, 2024

We have also encountered the same issue

from wakelock.

aytunch avatar aytunch commented on July 24, 2024

@martin-formigas
The project I am working on is not using wakelock directly but some of the packages we have are using it.
How can I use your fork to overcome this? I tried the above suggested solution

dependency_overrides:
  win32: 3.1.4

But it gave errors on pub get.

from wakelock.

Goddchen avatar Goddchen commented on July 24, 2024

@aytunch you can override it even when it is only a transitive dependency. Just use dependency_overrides instead of dependencies.

dependency_overrides:
  wakelock:
    git:
      url: git@github.com:formigas/wakelock.git
      path: wakelock/
      ref: main

from wakelock.

aytunch avatar aytunch commented on July 24, 2024

Hi @Goddchen thanks for the info.
This is what I added to my pubspec.yaml and I get the below error.
If I downgrade the pod_player to 0.0.6, then I can do pub get but app crashes when wakelock is used in the podplayer package with the new Flutter 3.10.5.
Can I solve this by dependency_overrides magic?

environment:
  sdk: '>=3.0.0 <4.0.0'

dependencies:
  flutter:
    sdk: flutter
  flutter_inappwebview: ^6.0.0-beta.22
  # https://pub.dev/packages/pod_player
  pod_player: ^0.1.5

dependency_overrides:
  wakelock:
    git:
      url: [email protected]:formigas/wakelock.git
      path: wakelock/
      ref: main
  wakelock_windows:
    git:
      url: [email protected]:formigas/wakelock.git
      path: wakelock_windows/
      ref: main
Resolving dependencies...
Because every version of core from path depends on package_info_plus ^4.0.2 and no versions of package_info_plus match >4.0.2 <5.0.0, every version of core from path requires package_info_plus 4.0.2.
And because package_info_plus 4.0.2 depends on win32 >=4.0.0 <6.0.0, every version of core from path requires win32 >=4.0.0 <6.0.0.
Because wakelock_windows >=0.2.1 depends on win32 ^3.0.0 and wakelock_windows <0.2.1 depends on win32 ^2.0.0, every version of wakelock_windows requires win32 ^2.0.0 or ^3.0.0.
Thus, core from path is incompatible with wakelock_windows.
And because pod_player >=0.1.1 depends on wakelock ^0.6.2 which depends on wakelock_windows ^0.2.0, core from path is incompatible with pod_player >=0.1.1.
So, because insurance depends on both pod_player ^0.1.5 and core from path, version solving failed.
exit code 1

from wakelock.

aytunch avatar aytunch commented on July 24, 2024

Moreover, I don't see wakelock_windows in my pubspec.lock files. This is the generated lock: (I am testing on mobile and Web, windows is not important for me)

  wakelock:
    dependency: transitive
    description:
      name: wakelock
      sha256: "78bad4822be81d37e7bc34b6990da7dface2a445255cd37c6f053b51a4ccdb3b"
      url: "https://pub.dev"
    source: hosted
    version: "0.4.0"
  wakelock_macos:
    dependency: transitive
    description:
      name: wakelock_macos
      sha256: "73581e5d9ed2dd1ba951375c30e63f0eb8c58d7d6286ae9ddf927b88f2aea8d9"
      url: "https://pub.dev"
    source: hosted
    version: "0.1.0+3"
  wakelock_platform_interface:
    dependency: transitive
    description:
      name: wakelock_platform_interface
      sha256: d0a8a1c02af68077db5df1e0f5e2b745f7b1f2cdcc48e3e0b6f8f4dcc349050e
      url: "https://pub.dev"
    source: hosted
    version: "0.2.1+3"
  wakelock_web:
    dependency: transitive
    description:
      name: wakelock_web
      sha256: "06b0033d5421712138e7fa482ff5c6280fe12e0a41c40c3fe8fda2c007eb4348"
      url: "https://pub.dev"
    source: hosted
    version: "0.2.0+3"

from wakelock.

thomasklaush avatar thomasklaush commented on July 24, 2024

Will be there a new version soon?
Somehow, the dependency override is not working anymore

from wakelock.

thomasklaush avatar thomasklaush commented on July 24, 2024

Sorry the delay, here it is:

wakelock-main.zip

place the file at the same level as your project folder (1 level up from your pubspec.yaml)

then edit your pubspec.yaml reference like:

wakelock:
  path: ../wakelock-main/wakelock

I also have an override for win32 as follows:

dependency_overrides:
  win32: ^5.0.2

I'm not sure if you'll need this win32 override though

Hope it helps

Thank you, worked well without the override.

from wakelock.

jhonatan-3a avatar jhonatan-3a commented on July 24, 2024

Consider switching to https://pub.dev/packages/wakelock_plus
Published by fluttercommunity.dev

It is a continuation of this project as the owner is not able to work on it at the moment afaik.

from wakelock.

creativecreatorormaybenot avatar creativecreatorormaybenot commented on July 24, 2024

I will soon discontinue this repository. Please use wakelock_plus: ^1.1.6 instead.

from wakelock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.