devtools icon indicating copy to clipboard operation
devtools copied to clipboard

"splitOnDash.length <= 2" assertion error

Open rrousselGit opened this issue 4 months ago • 5 comments

Hello!

I am unsure what exactly triggers it, but while working on a custom Devtool extension I keep seeing the following error:

DartError: Assertion failed:
file:///Users/remirousselet/.pub-cache/hosted/pub.dev/devtools_shared-12.0.0/lib/src/utils/semantic_version.dar
t:39:12
splitOnDash.length <= 2
"version: 3.36.0-1.0.pre-232"
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 44:3        assertFailed
package:devtools_shared/src/utils/semantic_version.dart 39:34                     parse
package:devtools_app_shared/src/service/flutter_version.dart 26:36                __
package:devtools_app_shared/src/service/flutter_version.dart 35:27                parse
package:devtools_app_shared/src/service/connected_app.dart 168:30                 <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 623:19               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 648:23               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 594:19               <fn>
dart-sdk/lib/async/zone.dart 1849:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 222:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 948:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 977:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 720:5                                         [_completeWithValue]
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 504:7                complete
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 571:12               _asyncReturn
package:devtools_app_shared/src/service/service_manager.dart 481:3                <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 623:19               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 648:23               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 594:19               <fn>
dart-sdk/lib/async/zone.dart 1849:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 222:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 948:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 977:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 720:5                                         [_completeWithValue]
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 504:7                complete
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 571:12               _asyncReturn
package:devtools_app_shared/src/service/service_manager.dart 445:3                <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 623:19               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 648:23               <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 594:19               <fn>
dart-sdk/lib/async/zone.dart 1849:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 222:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 948:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 977:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 720:5                                         [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 804:7                                         <fn>
dart-sdk/lib/async/schedule_microtask.dart 40:34                                  _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                                   _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 118:77  tear
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 188:69               <fn>

My current SDK is:

Dart SDK version: 3.10.0-127.0.dev (dev) (Thu Aug 21 17:03:14 2025 -0700) on "macos_arm64"

rrousselGit avatar Aug 28 '25 16:08 rrousselGit

Hi @rrousselGit - are you still hitting this?

This is because the Flutter version string changed, fix was included in https://github.com/flutter/devtools/pull/9351.

elliette avatar Oct 08 '25 21:10 elliette

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!

github-actions[bot] avatar Oct 23 '25 00:10 github-actions[bot]

Appologies, I was busy.

Yes I still see this.

Current error message is:

DartError: Assertion failed:
file:///Users/remirousselet/.pub-cache/hosted/pub.dev/devtools_shared-12.0.0/lib/src/utils/semantic_version
.dart:39:12
splitOnDash.length <= 2
"version: 3.38.0-1.0.pre-242"
...

Has the fix been published? I don't see any out-of-date devtool packages on my side, and I don't see any newer versions compared to when I made the issue.

rrousselGit avatar Oct 31 '25 15:10 rrousselGit

The fix appears to be 2 months old, yet the latest devtools_shared version is 4 months old. I assume the fix hasn't be published yet

rrousselGit avatar Oct 31 '25 15:10 rrousselGit

My apologies, I missed this. Let me know if you are still hitting this and I can publish devtools_shared.

elliette avatar Dec 05 '25 21:12 elliette

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!

github-actions[bot] avatar Dec 20 '25 00:12 github-actions[bot]