---
# System prepended metadata

title: Task error in Chromium
tags: [tech, ' debug']

---

---
title: Task error in Chromium
tags: tech, debug
---


I'm getting `Check failed: checker.CalledOnValidSequence()` error when a posted Task calls [http_loader_->DownloadToString](https://chromium.googlesource.com/chromium/src/+/66.0.3359.158/services/network/public/cpp/simple_url_loader.cc#1039). It turns out that calling `DETACH_FROM_SEQUENCE(sequence_checker_);` does not help.



```cpp
func PrivateChannel::DoHTTPReq() {std::string pk} {
    // Prepares HTTP request..
 
    // breaks here (see stack print below)
    http_loader_->DownloadToString(
      loader_factory,
      base::BindOnce(&PrivateChannel::OnPrivateChannelFirstRoundLoadComplete,
                     base::Unretained(this), client_sks,
                     referral_code_, encrypted_hashes_size),
      kMaxPrivateChannelServerResponseSizeBytes);
}


func A() {
    std::string input_str;
    
    task_runner_->PostTask(FROM_HERE,
        base::BindOnce(&PrivateChannel::DoHTTPReq, base::Unretained(this), input_str));
}
    
```

```
[69142:60419:0911/143120.405312:FATAL:sequence_checker.h(127)] Check failed: checker.CalledOnValidSequence().          
0   libbase.dylib                       0x0000000106502b5f base::debug::CollectStackTrace(void**, unsigned long) + 31
1   libbase.dylib                       0x000000010619b0db base::debug::StackTrace::StackTrace(unsigned long) + 75
2   libbase.dylib                       0x000000010619b15d base::debug::StackTrace::StackTrace(unsigned long) + 29     
3   libbase.dylib                       0x000000010619b138 base::debug::StackTrace::StackTrace() + 40
4   libbase.dylib                       0x00000001061e87f7 logging::LogMessage::~LogMessage() + 183
5   libbase.dylib                       0x00000001061e7475 logging::LogMessage::~LogMessage() + 21                     
6   libbindings.dylib                   0x000000010776344b base::ScopedValidateSequenceChecker::ScopedValidateSequenceChecker(base::SequenceChecker const&) + 187
7   libbindings.dylib                   0x000000010776331d base::ScopedValidateSequenceChecker::ScopedValidateSequenceChecker(base::SequenceChecker const&) + 29
8   libbindings.dylib                   0x000000010778c340 mojo::InterfaceEndpointClient::SendMessage(mojo::Message*, bool) + 96
9   libbindings.dylib                   0x000000010778cedf mojo::InterfaceEndpointClient::Accept(mojo::Message*) + 31
10  libchrome_dll.dylib                 0x00000001091b9838 network::mojom::URLLoaderFactoryProxy::CreateLoaderAndStart(mojo::PendingReceiver<network::mojom::URLLoader>, int, int, unsigned int, network::ResourceRequest const&, mojo::Pendin
gRemote<network::mojom::URLLoaderClient>, net::MutableNetworkTrafficAnnotationTag const&) + 2184     
11  libnetwork_cpp.dylib                0x00000001665ad99c network::(anonymous namespace)::SimpleURLLoaderImpl::StartRequest(network::mojom::URLLoaderFactory*) + 892
12  libnetwork_cpp.dylib                0x00000001665a75ed network::(anonymous namespace)::SimpleURLLoaderImpl::Start(network::mojom::URLLoaderFactory*) + 813
13  libnetwork_cpp.dylib                0x00000001665a24de network::(anonymous namespace)::SimpleURLLoaderImpl::DownloadToString(network::mojom::URLLoaderFactory*, base::OnceCallback<void (std::__1::unique_ptr<std::__1::basic_string<char,
 std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >)>, unsigned long) + 382
14  libchrome_dll.dylib                 0x000000010bfc67bf private_channel::PrivateChannel::FirstRoundProtocol(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::c
har_traits<char>, std::__1::allocator<char> >, int) + 1663                                                                                                                                                                                    
15  libchrome_dll.dylib                 0x000000010bfc5f27 private_channel::PrivateChannel::Test(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 2695                                                16  libchrome_dll.dylib                 0x000000010bfc9286 void base::internal::FunctorTraits<void (private_channel::PrivateChannel::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >), void>::Invoke<
void (private_channel::PrivateChannel::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >), private_channel::PrivateChannel*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::alloca
tor<char> > >(void (private_channel::PrivateChannel::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >), private_channel::PrivateChannel*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) + 182                       
17  libchrome_dll.dylib                 0x000000010bfc9166 void base::internal::InvokeHelper<false, void>::MakeItSo<void (private_channel::PrivateChannel::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<ch
ar> >), private_channel::PrivateChannel*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(void (private_channel::PrivateChannel::*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::_
_1::allocator<char> >), private_channel::PrivateChannel*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) + 102
18  libchrome_dll.dylib                 0x000000010bfc90b1 void base::internal::Invoker<base::internal::BindState<void (private_channel::PrivateChannel::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char
> >), base::internal::UnretainedWrapper<private_channel::PrivateChannel>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void ()>::RunImpl<void (private_channel::PrivateChannel::*)(std::__1::basic
_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >), std::__1::tuple<base::internal::UnretainedWrapper<private_channel::PrivateChannel>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<cha
r> > >, 0ul, 1ul>(void (private_channel::PrivateChannel::*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >), std::__1::tuple<base::internal::UnretainedWrapper<private_channel::PrivateChannel>, std:
:__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 113
19  libchrome_dll.dylib                 0x000000010bfc9037 base::internal::Invoker<base::internal::BindState<void (private_channel::PrivateChannel::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >),
 base::internal::UnretainedWrapper<private_channel::PrivateChannel>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void ()>::RunOnce(base::internal::BindStateBase*) + 87
20  libbase.dylib                       0x0000000106149df5 base::OnceCallback<void ()>::Run() && + 117        
```


--- 

## Notes

../../base/bind.h:93:3: error: static_assert failed due to requirement 'param_is_forwardable' "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|."

