package incompatible version after upgrading flutter - flutter-dependencies

My Flutter app depends on intl_utils: ^1.6.3, and today I upgraded Fluter to the latest Flutter (Channel master, 1.26.0-2.0.pre.86, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-US).
Now when I run pub get I get this error:
Because every version of flutter_localizations from sdk depends on intl 0.17.0-nullsafety.2 and intl_translation >=0.17.7 depends on intl >=0.15.3 <0.17.0, flutter_localizations from sdk is incompatible with intl_translation >=0.17.7.
Because intl_utils >=1.6.3 <1.9.0 depends on intl_translation 0.17.10 and intl_utils >=1.9.0 depends on intl_translation 0.17.10+1, intl_utils >=1.6.3 requires intl_translation 0.17.10 or 0.17.10+1.
Thus, flutter_localizations from sdk is incompatible with intl_utils >=1.6.3.
So, because xxx depends on both flutter_localizations any from sdk and intl_utils ^1.6.3, version solving failed.
pub get failed (1; So, because xxx depends on both flutter_localizations any from sdk and intl_utils ^1.6.3, version solving failed.)
so I added intl: ^0.17.0-nullsafety.2 and intl_translation: ^0.17.10+1 but now I get this
Because intl_translation >=0.17.7 depends on intl >=0.15.3 <0.17.0 and xxx depends on intl ^0.17.0-nullsafety.2, intl_translation >=0.17.7 is forbidden.
So, because xxx depends on intl_translation ^0.17.10+1, version solving failed.
pub get failed (1; So, because xxx depends on intl_translation ^0.17.10+1, version solving failed.)
I then changed to intl_translation: 0.17.6 and now the error is:
Because intl_translation >=0.17.0 <0.17.7 depends on intl ^0.15.3 and xxx depends on intl ^0.17.0-nullsafety.2, intl_translation >=0.17.0 <0.17.7 is forbidden.
So, because gipi_partner depends on intl_translation 0.17.6, version solving failed.
pub get failed (1; So, because xxx depends on intl_translation 0.17.6, version solving failed.)
I'm trying all combinations of versions but none is working.
Should I just downgrade Flutter?

a temporary workaround you can override the dependency in pubspec.yaml
dependency_overrides:
intl: 0.17.0

it's best you downgrade there are compatibility issue with the newer version.

Related

Semver policy to exclude offending versions

Consider a package with running versions:
1.0.0
1.0.1
1.0.2
given the semver policy ~1.0.0 - we'll get the latest patch - and life is great.
Now consider that version 1.0.3 has landed and is an offending version, so we expect 1.0.4 to correct the offense.
I don't want to wait for the authors to depricate 1.0.3, and it's anyway on my builder cache. I hope to handle this using the semver policy.
Is there a way I can phrase my semver policy to exclude that offending version, so that until a fix is released I'll get 1.0.2, and after its released I'll get 1.0.4?
And - if 1.0.4 is also offending, what will be the way to exclude both 1.0.3 and 1.0.4 so I'll get 1.0.5 as soon as it's published?
Thanks
Ah.. found it. I was looking in the wrong place for that...
The way to do that is:
"dependencies": {
"the-package" : "~1.0.0 < 1.0.3 || ~1.0.4",
and if 1.0.4 is found offensive, then
"the-package" : "~1.0 < 1.0.3 || ~1.0.5",
It works with ^ as well, if you like, not just ~.
I expected to find it on the https://semver.org site, but the examples are found with an interactive playground here:
https://semver.npmjs.com/#syntax-examples

I am having the following errors when building my FLUTTER Firebase phone authentication application:

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
package:firebase_core_web
package:firebase_auth
package:firebase
package:firebase_core_platform_interface
package:firebase_core
package:plugin_platform_interface
package:http_parser
package:quiver
Check if all dependencies can be upgraded
dart pub outdated --mode=null-safety
Update to all the latest dependencies
dart pub upgrade --null-safety
Ps:you can find in https://codewithandrea.com/articles/migrating-flutter-firebase-app-null-safety/

Update dependencies in NPM to resolve vulnerability

My repo in github show the following alert :
Dependabot cannot update ssri to a non-vulnerable version. The latest possible version that can be installed is 6.0.1 because of the following conflicting dependencies:
terser-webpack-plugin#2.3.8 requires ssri#^7.0.0 via cacache#13.0.1
webpack#4.46.0 requires ssri#^6.0.1 via a transitive dependency on
cacache#12.0.4
The earliest fixed version is 8.0.1.
As far as I known, I should update the root package (which is terser-webpack-plugin) in package.json to a newer version, but how to determine the minimum version that can support the non-vulnerable version of the dependency (in this case ssri 8.0.1) since I don't want to update to a too high version and risk breaking things. I am thinking of manually checking through all the release version of terser-webpack-plugin, but it's very tedious and seem wrong to check like that. Any suggestions ?
To speed up the process and save installing each version and its associated dependency tree, we can use npm-remote-ls (https://stackoverflow.com/a/26005786/2815338)
Firstly get the list of available versions:
> npm view terser-webpack-plugin versions
[
'1.0.0', '1.0.1', '1.0.2', '1.1.0', '1.2.0',
...
Then run npm-remote-ls for each version after your current one and filter on the relevant dependency, e.g.
> npm-remote-ls terser-webpack-plugin#3.0.0 | grep ' ssri#'
??? ?????? ssri#8.0.1
??? ??? ??? ?????? ssri#6.0.2
In this case terser-webpack-plugin#5.0.0 is the first with only fixed versions of ssri (8.0.1), and 5.1.0 appears to not include ssri at all, presumably due to webpack no longer depending on cacache.
N.B. the question marks appear to be due to encoding of characters that npm-remote-ls uses to display a tree structure. You could also use Select-String in PowerShell, but this appears to show different (incorrect) characters instead.

flutter error: Because "flutterApp" depends on sqlflite any which doesn't exist version solving failed

I am following a tutorial to make a Note Keeper Application, so I did as he said and added these dependencies in pubspec.yaml:
dependencies:
flutter:
sdk: flutter
sqlflite: any
path_provider: any
intl: ^0.16.1
he used intl: ^0.15.7 , but I changed it because it didn't work.
the prblem is that it's just keep showing these messages and loading forever when I press "get packages"
[note_keeper] flutter pub get
Running "flutter pub get" in note_keeper...
Because note_keeper depends on sqlflite any which doesn't exist (could not find package sqlflite at https://pub.dartlang.org), version solving failed.
pub get failed (server unavailable) -- attempting retry 1
could you help me and tell what to do please? :( !
dependencies:
flutter:
sdk: flutter
sqflite: ^1.3.1+1 // check the spelling of sqflite you have used `sqlflite` instead
path_provider: any
intl: ^0.16.1

Protractor 5.1.1 selenium-webdriver version inconsitency

I've recently upgraded to Protractor 5.1.1 and am facing some issues when setting cookies via browser.manage().addCookie()
The API has changed between versions 2 and 3 of Selenium-webdriver to expect an object rather than the previous 2..6 arguments. When I make the changes to my code to use the object, the typescript compiler complains saying that it expects 2..6 arguments.
old api:
browser.manage().addCookie('cookieName', 'cookieVal');
new api:
browser.manage().addCookie({name:'cookieName', value: 'cookieVal'});
I think this is because the #types/selenium-webdriver in the package.json of protractor v5.1.1 is pointing at version 2.53.39. The version of the actual selenium-webdriver the same package.json is referencing is 3.0.1.
Should this be the same value? Is anyone else experiencing problems with this?
Yup, this is happening because the type definitions was not written at the time.
workaround
Here is the workaround for now:
(browser.manage() as any).addCookie({name:'cookieName', value: 'cookieVal'});
We are setting browser.manage returned options object to any. Then we can give it the addCookie method.
OR
upgrade definitions
you could upgrade your #types/selenium-webdriver type definitions to version 3.
I'm having the same problem! I do know that the #types/selenium-driver is now updated to version 3.0.0.
I haven't had luck with this, but you could try installing it directly (i.e. npm install --save-dev #types/selenium-webdriver) and adding it to your list of types in your tsconfig.json file (i.e. types: [ "selenium-webdriver" ].