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.

Why httpGet() causes a com.github.kittinunf.fuel.core.BubbleFuelError: null?

See original GitHub issue

Description

I have a rest call realized by fuel library in my Android app Kotlin project. While attempting to call httpGet I get this

Caused by: com.github.kittinunf.fuel.core.BubbleFuelError: null com.github.kittinunf.fuel.core.FuelError$Companion.wrap(FuelError.kt:84) 03-06 11:32:39.112 6328-6328/com.example.demo I/System.out: com.github.kittinunf.fuel.core.requests.RequestTask.executeRequest(RequestTask.kt:24) com.github.kittinunf.fuel.core.requests.RequestTask.call(RequestTask.kt:44) com.github.kittinunf.fuel.core.requests.RequestTask.call(RequestTask.kt:14) com.github.kittinunf.fuel.core.DeserializableKt.response(Deserializable.kt:166) com.github.kittinunf.fuel.core.requests.DefaultRequest.responseObject(DefaultRequest.kt:463)

Question

Most probably the response seem null, and it fails during deserialization? What can I do there?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
BVADYcommented, Apr 3, 2019

I can’t figure out why this is not working for me:

val (_,_,result )= Fuel.get(requestUrl).responseString()

And this works fine:

requestUrl.httpGet().responseString { _, _, result ->
     when (result) {
          is Result.Success -> {
             // do something on success
          }
          is Result.Failure -> {
             // do something on fail
          }
     }
}

I would like to work as in the first example, because I would like to return this result.

1reaction
baillyjamycommented, May 24, 2019

Hello, Effectively, it was an error of inattention, my synchronous request was in the android main thread. A beginner’s mistake. I should have answered faster to avoid wasting your time. I’m sorry. Anyway, thank you for the modification, I just reproduced this problem and the error is clearer. I think you can close this issue. Sorry again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Why httpGet() causes a com.github.kittinunf.fuel.core ...
While attempting to call httpGet I get this: Caused by: com.github.kittinunf.fuel.core.BubbleFuelError: null com.github.kittinunf.fuel.core.
Read more >
com.github.kittinunf.fuel.core.BubbleFuelError: null-kotlin
I found a way to solve this with kotlin coroutines. fun doRequest() = runBlocking { val (_, _, result) = Fuel.get("https://jsonplaceholder.typicode.com/ ...
Read more >
Use com.github.kittinunf.fuel.core.interceptors ... - LambdaTest
Learn how to use ParameterEncoder class in com.github.kittinunf.fuel.core.interceptors package for your next Fuel project with LambdaTest Automation Testing ...
Read more >
v1.x.y - Fuel - Documentation - GitBook
This is possible by including the [Gson](https://github.com/kittinunf/Fuel/tree/master/fuel-gson) module in your dependency block. ​. ```kotlin.
Read more >
Why am I getting an error code of 400 with Fuel? : r/Kotlin
FuelError$Companion.wrap(FuelError.kt:86) Caused by: com.github.kittinunf.fuel.core.HttpException: HTTP Exception 400 Bad Request ...
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