Getting net::ERR_HTTP2_PROTOCOL_ERROR in Angular 7 App
Asked Answered
D

0

6

I am getting intermittently "net::ERR_HTTP2_PROTOCOL_ERROR" for one of the API call in Angular 7 application, I am using ngrx also. All other API calls are working fine with the same configurations/headers

net::ERR_HTTP2_PROTOCOL_ERROR

Darwinism answered 20/9, 2019 at 0:5 Comment(7)
Could you provide some of the code in the error-handling.service.ts ?Pentagon
Sure @Korte, this is our custom error handling service in Angular. catchEffectError<T = Action>(...actions: Action[]): OperatorFunction<T, T | Action> { const handler = (error: Error): Action[] => { try { console.error('Error caught in effect\n', error); } catch (e) { } return [ ...actions, this.notificationMessages.Error(), new ErrorsPushAction(error.toString()), ]; }Darwinism
@Darwinism any luck solving this?Grenoble
No @Obaid, I am not able to find the root cause for this, I just added 500ms delay for failing HTTP ajax call and now I am not getting these error. I am suspecting due to multiple HTTP calls, some HTTP call might be cancelling the effect of other http callsDarwinism
I have the same issue in my app. I do multiple HTTP calls, and sometimes cancel some of them. When I do this, I get a lot of net::ERR_HTTP2_PROTOCOL_ERROR in Chrome. If you find a solution, please share it :)Ezaria
@Ezaria Have you found the solution?Boudreau
@Yang, I'm sorry but no. I opened an issue on Github for this issue with example and reproductible case : github.com/icing/mod_h2/issues/190 . According the creator of mod_h2 (on Nov 4, 2019) : "Chrome is not meeting the spec and had issues with other HTTP/2 implementations as well. They will fix this in the next canaries.". I check 5 minutes ago, it's still not fixed… In my company we retry the request after this failure as workaround, it's ugly but it's transparent for our end users :(Ezaria

© 2022 - 2024 — McMap. All rights reserved.