shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
1.97k stars 118 forks source link

`shorebird doctor` cannot resolve `args ^2.5.0` #1938

Open OCXcode opened 3 weeks ago

OCXcode commented 3 weeks ago

liuer@liukunpeng yt_devop_app % shorebird doctor Updating Flutter... HEAD is now at 47571af6 chore: roll engine to 255003dc70296f2db5855f12de4d9f93a7b8b087 (release perf regression) Shorebird Engine • revision 255003dc70296f2db5855f12de4d9f93a7b8b087 Flutter 3.19.6-0.0.pre.14 • channel [user-branch] • unknown source Framework • revision 47571af6a3 (33 hours ago) • 2024-04-17 11:19:34 -0500 Engine • revision 255003dc70 Tools • Dart 3.3.3 • DevTools 2.31.1 Building Shorebird... Resolving dependencies... (2.3s) Because shorebird_cli depends on args ^2.5.0 which doesn't match any versions, version solving failed. My command started well, but you reported an error after releasing the new version. How can I restore it to normal.

bryanoltman commented 3 weeks ago

I think there may be an issue with your Flutter checkout. args 2.5.0 is the latest version. Did you edit shorebird's Flutter checkout? I'm surprised to see Flutter 3.19.6-0.0.pre.14 • channel [user-branch] • unknown source

eseidel commented 3 weeks ago

Maybe resolving dependencies... is calling pub get but failing to connect to pub and thus running offline and not finding args 2.5.0? Or maybe you're using a pub mirror that doesn't have 2.5.0?

eseidel commented 3 weeks ago

I wonder if when the shorebird doctor command started it was using an older version of dart, and now it's trying to build the newer shorebird_cli package with that older version and failing? e.g. this is only an upgrade bug? I wonder if simply running shorebird doctor a second time would fix it?

eseidel commented 3 weeks ago

I just verified that shorebird works without having dart installed, so I know we're using our own Dart. The path does change between Shorebird revisions, since we cache Flutter based on its git hash. It's possible that the later invocation of dart is using the older path when it should be using the newer path?

sssolinjie commented 3 weeks ago

我刚刚验证了它shorebird可以在没有dart安装的情况下工作,所以我知道我们正在使用我们自己的 Dart。 Shorebird 版本之间的路径确实会发生变化,因为我们根据 Flutter 的 git 哈希值对其进行缓存。以后的调用是否可能dart在应该使用较新的路径时使用较旧的路径?

I'm also experiencing the same issue. Switching from args ^2.5.0 to 2.4.2 solved the problem, but the app still crashes on startup after applying the iOS patch.

eseidel commented 3 weeks ago

We would love to help. Can you tell us more about your setup? Could you share your flutter doctor output? It sounds like shorebird doctor is the command which is failing for you with this error?

eseidel commented 3 weeks ago

We've now had 3 reports of this. They all seem to be from users in China. My current guess is that maybe one of the pub mirrors there is/was missing package:args 2.5.0 and thus has confused version resolution for these users?

The error suggests that package:args 2.5.0 does not exist, which doesn't seem to be the case: https://pub.dev/packages/args Similarly its in the api response marked as "latest": https://pub.dev/api/packages/args

Also on the first recommended pub mirror in china: https://pub.flutter-io.cn/api/packages/args

Is anyone hitting this issue who is not using a pub mirror?

eseidel commented 3 weeks ago

If my theory is correct, dart pub cache clean should resolve it? Since it appears that at least the flutter-io.cn mirror has the 2.5.0 args package now?

OCXcode commented 2 weeks ago

I have updated Shorebird again, and the issue with args has not appeared, but there is a new issue that is similar to the issue with args. liuer@liukunpeng Yt_devop.app% shorebird release ios Updating Flutter Cloning into '/Users/liuer/. shorebird/bin/cache/fluent/aee5222c0d52012f089564a8395826d56e7c2fe8' Remote: Enumerating objects: 41367, done Remote: Total 41367 (delta 0), reused 0 (delta 0), pack reused 41367 Receiving objects: 100% (41367/41367), 22.94 MiB | 1.14 MiB/s, done Resolving delta: 100% (2004/2004), done Remote: Enumerating objects: 1840, done Remote: Counting objects: 100% (454/454), done Remote: Compression objects: 100% (407/407), done Remote: Total 1840 (delta 92), reused 47 (delta 47), pack reused 1386 Receiving objects: 100% (1840/1840), 307.37 KiB | 1.16 MiB/s, done Resolving delta: 100% (121/121), done Remote: Enumerating objects: 6286, done Remote: Counting objects: 100% (4456/4456), done Remote: Compression objects: 100% (4005/4005), done Remote: Total 6286 (delta 1481), reused 451 (delta 451), pack reused 1830 Receiving objects: 100% (6286/6286), 11.79 MiB | 1.16 MiB/s, done Resolving delta: 100% (1888/1888), done Updating files: 100% (7980/7980), done HEAD is now at aee5222c Update engine for 3.19.6 Shorebird Engine • revision e4434d7a212b29a8ee8ffaf8e2c453c753904933 Downloading Darwin arm64 Dart SDK from Flutter engine e4434d7a212b29a8ee8ffaf8e2c453c753904933 %Total% Received% Xfer Average Speed Time Time Current Dload Upload Total Split Left Speed 0 0 0 0 0 0 0 0--: --: --0:00:19--: --: --0 100 212M 100 212M 0 0 1015k 0 0:03:34 0:03:34--: --: --1084k Building Flutter tool Resolving dependencies Got dependencies Flutter 3.19.7-0.0.pre.16 • channel [user brand] • unknown source Framework • revision aee5222c0d (3 days ago) • 2024-04-24 14:01:36-0400 Engine • revision e4434d7a21 Tools • Dart 3.3.4 • DevTools 2.31.1 Building Shorebird Resolving dependencies (1.2s) Because shorebird_cli depends on googleapis.auth ^ 1.6.0 which does not match any versions, version solving failed

coderLLW commented 2 weeks ago

@OCXcode 我也是如此,是否解决

bryanoltman commented 2 weeks ago

@OCXcode I would recommend dart pub cache clean as Eric recommended above. googleapis_auth 1.6.0 exists, but if you're using a mirror, it's possible that the mirror has not been updated.