# Peculiar errors thrown by dart vm and firefox in CI build

**URL:** <https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263>\
**Category:** Dart\
**Created:** [April 21, 2020, 12:53pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263 "2020-04-21T12:53:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![adarsh-maurya2699](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adarsh-maurya2699/32/4399_2.png) [@adarsh-maurya2699](https://travis-ci.community/u/adarsh-maurya2699)\
**Post date:** [April 21, 2020, 12:53pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/1 "2020-04-21T12:53:40Z")

</div>

Hi @athomas and @a14n , the [build](https://travis-ci.org/github/dart-lang/yaml/builds/677661080) is failing and I dont understand how the CI has a different output for one test in span\_test.dart, and the commands “pub run test -p vm”, “pub run test -p firefox” dont throw any errors on my machine. I would be glad if someone could point me in the right direction ?  
my output-

```auto
[adarshm26@dell yaml]$ pub run test -p vm
00:01 +98: test/yaml_test.dart: 6.8: Directives [Example 6.13]                 
line 1, column 1: Warning: unknown directive.
  ╷
1 │ %FOO bar baz # Should be ignored
  │ ^^^^
  ╵
00:01 +99: test/yaml_test.dart: 6.8: Directives [Example 6.14]                 
line 1, column 1: Warning: this parser only supports YAML 1.1 and 1.2.
  ╷
1 │ %YAML 1.3 # Attempt parsing
  │ ^^^^^^^^^
  ╵
00:02 +166: All tests passed!     

[adarshm26@dell yaml]$ pub run test -p firefox
00:06 +0: compiling test/span_test.dart                                        
Compiled 9,138,241 characters Dart to 1,219,940 characters JavaScript in 6.04 seconds
Dart file /tmp/dart_test_HIYZGI/runInBrowser.dart compiled to JavaScript: /tmp/dart_test_UWOTFO/test_SKXRCD/span_test.dart.browser_test.dart.js

00:06 +0: compiling test/yaml_test.dart                                        
Compiled 9,182,758 characters Dart to 1,313,565 characters JavaScript in 6.13 seconds
Dart file /tmp/dart_test_KBYYZL/runInBrowser.dart compiled to JavaScript: /tmp/dart_test_UWOTFO/test_AUSOUE/yaml_test.dart.browser_test.dart.js

00:06 +0: compiling test/yaml_node_wrapper_test.dart                           
Compiled 9,139,307 characters Dart to 1,125,875 characters JavaScript in 6.26 seconds
Dart file /tmp/dart_test_PANZTW/runInBrowser.dart compiled to JavaScript: /tmp/dart_test_UWOTFO/test_TCSNWK/yaml_node_wrapper_test.dart.browser_test.dart.js

00:09 +98: test/yaml_test.dart: 6.8: Directives [Example 6.13]                 
line 1, column 1: Warning: unknown directive.
  ╷
1 │ %FOO bar baz # Should be ignored
  │ ^^^^
  ╵
00:09 +99: test/yaml_test.dart: 6.8: Directives [Example 6.14]                 
line 1, column 1: Warning: this parser only supports YAML 1.1 and 1.2.
  ╷
1 │ %YAML 1.3 # Attempt parsing
  │ ^^^^^^^^^
  ╵
00:10 +166: All tests passed!   

```

---

<div class="post-metadata">

**Author:** ![athomas](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/athomas/32/5474_2.png) [@athomas](https://travis-ci.community/u/athomas)\
**Post date:** [April 21, 2020, 2:18pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/2 "2020-04-21T14:18:46Z")

</div>

> [@adarsh-maurya2699](#):
>
> build

It also seems to pass on the latest dev release: [Travis CI - Test and Deploy with Confidence](https://travis-ci.org/github/dart-lang/yaml/jobs/677661084)

Did you try running the tests with Dart 2.4.0 locally?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [April 21, 2020, 2:28pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/3 "2020-04-21T14:28:43Z")

</div>

> [@A tiny Go code fails only on Travis CI for Linux](https://travis-ci.community/t/a-tiny-go-code-fails-only-on-travis-ci-for-linux/7846/4):
>
> If something works locally but not in Travis, there are differences between your local environment and Travis. Find out what this error message means and dig from there – only that can tell what the cause is and point to the discrepancy.

Since those definitely are intended to be invalid directives, I reckon you have disabled those warnings locally.

These message also have nothing to do with [the actual failure](https://travis-ci.org/github/dart-lang/yaml/jobs/677661082#L264-L279) as you can see if you look at the log closely.

---

<div class="post-metadata">

**Author:** ![adarsh-maurya2699](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adarsh-maurya2699/32/4399_2.png) [@adarsh-maurya2699](https://travis-ci.community/u/adarsh-maurya2699)\
**Post date:** [April 21, 2020, 5:11pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/4 "2020-04-21T17:11:31Z")

</div>

Not on 2.4.0, it runs fine and as expected on 2.7.2. Thing is, the file span\_test.dart contains tests that are similar to the one which throws error. According to the error there are less whitespaces(’ ') in each line of the expected string. This should not be possible. The method call should produce the expected string in the same format as all other test’s expected string. How can one particular test have less whitespaces while others have the expected amount? I understand that build environments can affect how tabs are interpreted by the compiler, but then it should uniformly affect all cases, right?

---

<div class="post-metadata">

**Author:** ![adarsh-maurya2699](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adarsh-maurya2699/32/4399_2.png) [@adarsh-maurya2699](https://travis-ci.community/u/adarsh-maurya2699)\
**Post date:** [April 21, 2020, 5:21pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/5 "2020-04-21T17:21:23Z")

</div>

I have seen the log, please see my previous reply

---

<div class="post-metadata">

**Author:** ![athomas](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/athomas/32/5474_2.png) [@athomas](https://travis-ci.community/u/athomas)\
**Post date:** [April 21, 2020, 6:13pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/6 "2020-04-21T18:13:28Z")

</div>

> [@adarsh-maurya2699](#):
>
> How can one particular test have less whitespaces while others have the expected amount? I understand that build environments can affect how tabs are interpreted by the compiler, but then it should uniformly affect all cases, right?

To me it looks like you’ve hit an odd bug in the Dart SDK or a package that you depend on. The 2.4.0 build environment and the 2.9.0 build environment are quite far apart: besides the SDKs being different, they also pull in different versions of your dependencies because of the SDK constraints in those packages (you can see that if you expand the `$ pub get` line in the failing and the succeeding builds).

I don’t see any indication of this being a problem with the Dart-Travis integration. Which leaves you with a few options:  
a) Search for similar bugs that have been fixed (given that it works in the latest version) in the packages that have changed version and in the Dart SDK.  
b) Try to create a minimal reproduction of this issue and submit a bug to the repo that is most likely causing this to fail.  
c) Download 2.4.0 and debug the problem.  
d) Try to find out with which Dart SDK this test starts to work and increase the lower bound of your package’s SDK constraint.

---

<div class="post-metadata">

**Author:** ![athomas](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/athomas/32/5474_2.png) [@athomas](https://travis-ci.community/u/athomas)\
**Post date:** [April 21, 2020, 6:27pm UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/7 "2020-04-21T18:27:00Z")

</div>

I just noticed that this is dart-lang/yaml. So you might have to discuss the issue with one of that package’s authors (they are unlikely to hang around in this Travis community). They might be OK with just raising the lower bound to an SDK version that doesn’t have this issue.

---

<div class="post-metadata">

**Author:** ![adarsh-maurya2699](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adarsh-maurya2699/32/4399_2.png) [@adarsh-maurya2699](https://travis-ci.community/u/adarsh-maurya2699)\
**Post date:** [April 22, 2020, 2:37am UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/8 "2020-04-22T02:37:15Z")

</div>

Thank you very much for the detailed response. I will try your suggestions and also try to get a response from the repo’s maintainers.

---

<div class="post-metadata">

**Author:** ![adarsh-maurya2699](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/adarsh-maurya2699/32/4399_2.png) [@adarsh-maurya2699](https://travis-ci.community/u/adarsh-maurya2699)\
**Post date:** [April 22, 2020, 3:49am UTC](https://travis-ci.community/t/peculiar-errors-thrown-by-dart-vm-and-firefox-in-ci-build/8263/9 "2020-04-22T03:49:22Z")

</div>

I found the bug, it was from the dependency ‘source\_span’. Thank you again, I was really lost there.
