Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dio interceptor: blocks every event #5

Closed
ArinFaraj opened this issue Apr 4, 2022 · 5 comments
Closed

Dio interceptor: blocks every event #5

ArinFaraj opened this issue Apr 4, 2022 · 5 comments

Comments

@ArinFaraj
Copy link

From the dio documentations

If you want to continue the request, call [handler.next].

However, in this package, the interceptor never uses the handler and therefore does not send events to the next interceptor, causing the event to be blocked.

Fix:
Just add handler.next at the end of each event ie. onRequest, onResponse ...

@themisir
Copy link
Owner

themisir commented Apr 4, 2022

Yes and no. Check this and this lines. super.onRequest and super.onResponse are already calling handler.next.

@themisir themisir closed this as completed Apr 4, 2022
@ArinFaraj
Copy link
Author

That's true my bad, its really strange this interceptor still blocks every event for me even tho its perfectly normal, thanks for the reply 💙

@themisir
Copy link
Owner

themisir commented Apr 9, 2022

Hm that's strange, maybe dio interceptor behavior changed again.. Can you debug and set a breakpoint on super.onRequest or super.onResponse to see what happens and where it stucks?

@ArinFaraj
Copy link
Author

Found the issue
the version 1.0.0 on pub.dev doesn't have the super calls, probably you forgot to update it there.
and probably thats why i made the issue cause i didn't see it there

image

@themisir themisir reopened this Apr 10, 2022
@themisir
Copy link
Owner

Outch, let me update, sorry for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants