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

Determine encoding of source files used for coverage #1691

Merged
merged 4 commits into from Apr 20, 2022

Conversation

jayudey-wf
Copy link
Contributor

After upgrade past version 1.15.7 of the test package I was no longer able to collect code coverage.

After working with several of my teammates we tracked down that it was due to a non utf-8 character in one of the javascript sources that are being used by our browser tests.

It looks like this got introduced with the move away from the http package because it looks like it was handling that type of problem here.

RangeError (index): Invalid value: Not in inclusive range 0..335531: 335532
dart:core                                            List.[]=
package:coverage/src/chrome.dart 137:21              _offsetCoverage
package:coverage/src/chrome.dart 48:28               parseChromeCoverage
package:test/src/runner/browser/chrome.dart 111:20   Chrome.gatherCoverage
package:test_core/src/runner/runner_suite.dart 79:8  RunnerSuite.gatherCoverage
package:test_core/src/runner/coverage.dart 16:18     writeCoverage
package:test_core/src/runner/engine.dart 270:36      Engine.run.<fn>.<fn>

This is an unexpected error. Please file an issue at http://github.com/dart-lang/test
with the stack trace and instructions for reproducing the error.
Unhandled exception:
RangeError (index): Invalid value: Not in inclusive range 0..335531: 335532
#0      List._setIndexed (dart:core-patch/array.dart:118:64)
#1      List.[]= (dart:core-patch/array.dart:114:5)
#2      _offsetCoverage (package:coverage/src/chrome.dart:137:21)
#3      parseChromeCoverage (package:coverage/src/chrome.dart:48:28)
<asynchronous suspension>
#4      Chrome.gatherCoverage (package:test/src/runner/browser/chrome.dart:111:20)
<asynchronous suspension>
#5      RunnerSuite.gatherCoverage (package:test_core/src/runner/runner_suite.dart:79:8)
<asynchronous suspension>
#6      writeCoverage (package:test_core/src/runner/coverage.dart:16:18)
<asynchronous suspension>
#7      Engine.run.<anonymous closure>.<anonymous closure> (package:test_core/src/runner/engine.dart:270:36)
<asynchronous suspension>


@google-cla
Copy link

google-cla bot commented Apr 19, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@jayudey-wf jayudey-wf marked this pull request as ready for review April 19, 2022 21:48
@kevmoo kevmoo requested a review from natebosch April 20, 2022 04:19
@kevmoo
Copy link
Member

kevmoo commented Apr 20, 2022

@jayudey-wf – need to figure out the CLA check. This looks great, BTW!

@jayudey-wf
Copy link
Contributor Author

I signed the individual one, but I think Workiva has a corporate one as well

Copy link
Member

@natebosch natebosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this!

@natebosch natebosch merged commit d54846b into dart-lang:master Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants