question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug?] headers as strings on handleResponse on fastboot mode

See original GitHub issue

Hello, today I struggled big time until I realized that my adapter’s handleResponse function had headers parameter as a string inside an property server inside it, instead of the regular object from ED. So In order to fix that I did the following:

handleResponse(status, headers, payload, requestData) {
    let _headers = headers;
    if(typeof FastBoot !== 'undefined'){
      let merged = {};
      headers.server.split('\n').map((l) => {
        let line = l.split(': ');
        let o = {};
        line[0] = line[0].split('-').map((k) => k.charAt(0).toUpperCase() + k.substr(1,k.length-1)).join('-');
        o[line[0]] = line[1];
        return o;
      }).forEach((o) => Object.assign(merged, o));
     _headers = merged;
    }
   ...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kratiahujacommented, Aug 4, 2017

Sounds good. Feel free to reopen if you have a reproduction. Happy to take a look.

0reactions
marcemiracommented, Aug 4, 2017

@kratiahuja Let’s close it for now then. Unfortunately I don’t have the time to reproduce it right now. I stumbled upon it and posted a solution so anyone else hitting the same issue could find a workaround until it gets solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fastboot/fuzzy_fastboot/main.cpp - platform/system/core
ASSERT_NE(transport, nullptr) << "Could not find the fastboot device after: " ... << cmd + "responded with a string that does not start...
Read more >
issue with curl : All headers must be strings #30 - GitHub
It seems there was a change somewhere that leads to an error. ... .list = opts$headers): All headers must be strings.
Read more >
Spring Integration - object placed in header is returned as ...
I created a stand alone project to reproduce the error, and that added in the header as an expected AtomicInteger.
Read more >
Moving Fastboot to Userspace | Android Open Source Project
To enter fastbootd mode, bootloader writes boot-fastboot into the command field ... Returns an error if the vendor boot header is version 3....
Read more >
Column Header Strings[] Property - NI - National Instruments
An array of the strings in the column headers. Remarks. The following table lists the characteristics of this property. Data type. Permissions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found