Comments (10)
Thanks for the code @ColtonIdle
I was able to reproduce and here the potential fix: #87
from chucker.
@ColtonIdle I'm not sure I completely got your point, but apparently it works fine (latest master):
Can you provide more insights or a project that I can checkout and test?
from chucker.
Looks like it's working for you. I don't think master has a release artifact available right?
What happens if you try with latest beta. Feel free to close for now if you want. I'll try the latest master when it's released.
from chucker.
I don't think master has a release artifact available right?
There is no master branch 😅
You can anyway try the latest SNAPSHOT from the develop
branch with:
dependencies {
debugImplementation 'com.github.ChuckerTeam.Chucker:library:develop-SNAPSHOT'
releaseImplementation 'com.github.ChuckerTeam.Chucker:library-no-op:develop-SNAPSHOT'
}
Feel free to close for now if you want
I'm closing now but feel free to re-open if you manage to reproduce
from chucker.
Oh. I thought there was a master branch because you said
I'm not sure I completely got your point, but apparently it works fine (latest master)
I just tried this again, (using SNAPSHOT) and it's still showing 0. Maybe it's because on the Q Beta 6?
I'll try on my api 28 emulator...
Nope. Shows 0 on the emulator. Looks like it's a valid bug?
from chucker.
Do you have other Interceptors
?
Are you using any other proxy that might rewrite your requests (like Charles or similar)?
from chucker.
I have a few things going on at the same time, like Flipper, etc. Let me remove them.
Just as a heads up though. If I migrate back down to the current stable, then the numbers show fine.
from chucker.
I have a few things going on at the same time, like Flipper, etc. Let me remove them.
The best would be to have like a project that I can checkout where the issue is reproducible
from chucker.
Removed flipper, stetho, etc. Same issue.
Tried downgrading again to make sure I wasn't going crazy. Sure enough, it works.
from chucker.
My project:
class MainActivity : AppCompatActivity() {
lateinit var client: OkHttpClient
lateinit var retrofit: Retrofit
lateinit var service: MyService
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
client = OkHttpClient.Builder()
.addInterceptor(ChuckInterceptor(this))
.build()
retrofit = Retrofit.Builder()
.baseUrl("http://www.mocky.io/v2/")
.client(client)
.addConverterFactory(MoshiConverterFactory.create())
.build()
service = retrofit.create(MyService::class.java)
button1.setOnClickListener { button1Clicked() }
}
fun button1Clicked() {
val call = service.getPersonValid()
call.enqueue(object : Callback<Person> {
override fun onFailure(call: Call<Person>, t: Throwable) {
Toast.makeText(this@MainActivity, "Fail", Toast.LENGTH_LONG).show()
}
override fun onResponse(call: Call<Person>, response: Response<Person>) {
Toast.makeText(this@MainActivity, "Success", Toast.LENGTH_LONG).show()
}
})
}
}
interface MyService {
@GET("5d4d9ebf3300003e3a33792e?mocky-delay=1000ms")
fun getPersonValid(): Call<Person>
}
data class Person(
val person: String = ""
)
If I use stable, the above works. If I change to SNAPSHOT (and also change ChuckInterceptor to ChuckerInterceptor) then it does not work.
from chucker.
Related Issues (20)
- How to use chucker for intercepting all http request(okhttp & webview) in my android application HOT 1
- Chucker not intercepting custom response returned by another interceptor in OkHttp. HOT 1
- OutOfMemoryError: Failed to allocate a 8208 byte allocation with 3418760 free byte HOT 8
- How to add the request manually? HOT 1
- Crash when the client app is using the WAKE_LOCK permission HOT 2
- Build Failed HOT 1
- Build Failed HOT 4
- Grpc integration HOT 1
- java.lang.NoSuchMethodError: No static method parseString HOT 1
- Scroll to searched values in Chucker response search
- Project build crashes if there is a smaller version in the project for library "Room" HOT 3
- Duplicate class found Chucker HOT 2
- Got ANR when share large data curl HOT 2
- Enable selecting and copying specific part of the response HOT 3
- Share Multiple Request at One Time HOT 3
- StrictMode policy violation: android.os.strictmode.DiskReadViolation HOT 1
- When Chucker is turned on and the APP is debugged, it will cause the APP to appear ANR suspended animation.
- Not receiving notification
- Crash on Share Click java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/graphics/drawable/DrawableWrapper; HOT 3
- React native app crashing issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chucker.