NoSuchMethodError: method not found: 'headers' on null during tests
On CI:
test/http_client/tracing_client_test.dart: TracingClient captured span adds sentry-trace header to the request (failed) NoSuchMethodError: method not found: 'headers' on null test/http_client/tracing_client_test.dart 111:32
Likely because of https://pub.dev/packages/http/versions/0.13.5
expect(response.request!.headers['sentry-trace'],
span.toSentryTrace().value);
response.request is null likely, something has changed.
@ueman do you know if something has changed? just noticed it but I didn't see any change in that class.
Sorry, no idea. If I had to guess, it's because of
In MockHttpClient use the callback returned Response.request instead of the argument value to give more control to the callback. This may be breaking for callbacks which return incomplete Responses and relied on the default.
as mentioned in the changelog for the newest version.