"endRequest called when no request is active"
See original GitHub issueSeems to happen when you redeploy a @Push
enabled application. Browser console says
Push connection re-established using websocket
21:34:09.738 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 JSON parsing took 0ms
21:34:09.738 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 Received push (websocket) message: for(;;);[{"meta":{"sessionExpired":true}}]
21:34:09.738 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1049 Response didn't contain a server id. Please verify that the server is up-to-date and that the response data has not been modified in transmission.
Eq @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:1049
21:34:09.738 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1065 Handling message from server
21:34:09.738 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1006 Handling dependencies
21:34:09.739 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 handleUIDLMessage: 0 ms
21:34:09.739 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 Setting heartbeat interval to -1sec.
21:34:09.739 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1001 Closing push connection
21:34:09.739 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 Processing time was 1ms
client-52731741FE58EF8056D7E6EA323C8436.cache.js:210 endRequest called when no request is active
HB @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:210
21:35:09.763 vaadinPush.js?v=1.0.0.beta9:3259 Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent). - wasClean: false
log @ vaadinPush.js?v=1.0.0.beta9:3259
warn @ vaadinPush.js?v=1.0.0.beta9:3265
_websocket.onclose @ vaadinPush.js?v=1.0.0.beta9:1517
21:35:09.764 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1068 Push connection closed
21:35:09.764 client-52731741FE58EF8056D7E6EA323C8436.cache.js:782 Reopening push connection
21:35:15.788 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 Push connection re-established using websocket
21:35:15.790 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 JSON parsing took 0.1ms
21:35:15.790 client-52731741FE58EF8056D7E6EA323C8436.cache.js:185 Received push (websocket) message: for(;;);[{"meta":{"sessionExpired":true}}]
21:35:15.790 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1049 Response didn't contain a server id. Please verify that the server is up-to-date and that the response data has not been modified in transmission.
Eq @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:1049
Qo @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:1068
(anonymous) @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:1037
ob @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:439
rb @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:931
(anonymous) @ client-52731741FE58EF8056D7E6EA323C8436.cache.js:638
_f @ vaadinPush.js?v=1.0.0.beta9:2765
_invokeFunction @ vaadinPush.js?v=1.0.0.beta9:2754
_invokeCallback @ vaadinPush.js?v=1.0.0.beta9:2884
_websocket.onmessage @ vaadinPush.js?v=1.0.0.beta9:1457
21:35:15.791 client-52731741FE58EF8056D7E6EA323C8436.cache.js:1049 Ignored received message because application has already been stopped
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Error "endRequest called when no request is active" | Vaadin
I am using MPR + Vaadin 7 with push enabled ( using just `@Push` ). ... Error "endRequest called when no request is...
Read more >HttpModule EndRequest handler called twice - Stack Overflow
Does Init method of the Module called once while the EndRequest is called twice for a single request? because EndRequest can not be...
Read more >HttpApplication.EndRequest Event (System.Web)
Occurs as the last event in the HTTP pipeline chain of execution when ASP.NET responds to a request.
Read more >Ensuring Application Continuity - Oracle Help Center
Application Continuity does not resubmit work following call failures due to ... If you want to disable the end request test, then use...
Read more >Transactional messaging approaches - IBM
Configure the server with the Transactional property enabled. ... The first transaction carries the message from the front-end request queue to the back-end...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Flow version ‘2.0.12’, platform version ‘14.0.5’, vaadin7 version ‘7.7.17’ ( so I am using MPR ) Coding on Windows 10, using Eclipse 2019-06 (4.12.0) Problem occurs in logout code, like @mpilone.
I can say that, in my tests, if I call
currentUi.getPage().executeJs("window.location.href=''");
and do NOT callVaadinSession.getCurrent().getSession().invalidate();
, I do not get the error. So the problem seems to be related to invalidating the session, maybe?Tell me if you need more information, but my basic goal is the same as @mpilone.
I tried a lot of things, using Chrome as my browser most of the time. See below:
VaadinSession.getCurrent().close();
instead ofVaadinSession.getCurrent().getSession().invalidate();
. This did not fix the issue. It actually causes another issue entirely, in addition to this one, because things are not properly cleaned up. Yes, this is not valid, was just experimenting.VaadinSession.getCurrent().close();
beforeVaadinSession.getCurrent().getSession().invalidate();
, but that did not help either. It did not cause other problems, just did not fix my endRequest problem.currentUi.navigate("");
orcurrentPage.reload();
. Also, same thing happens if I movecurrentUi.navigate("");
to before I callVaadinSession.getCurrent().getSession().invalidate();
( with or without callingVaadinSession.getCurrent().close();
).currentUi.navigate("");
tocurrentUi.getPage().executeJs("window.location.href=''");
, and still get the same problem if I callVaadinSession.getCurrent().getSession().invalidate();
.VaadinSession.getCurrent().getSession().invalidate();
, I don’t get the error. Obviously,currentUi.navigate("");
does nothing if I don’t callinvalidate
, butcurrentUi.getPage().executeJs("window.location.href=''");
works without error.@Push
and any references toUI.access
of course removes the problem. If I just comment out all references toUI.access
, but keep@Push
, we still have the problem. This makes sense considering the comments of others.UI.getCurrent().getPushConfiguration().setPushMode(PushMode.MANUAL);UI.getCurrent().getPushConfiguration().setTransport(Transport.WEBSOCKET);
and declarative@Push(value = PushMode.MANUAL, transport = Transport.WEBSOCKET)
. I get this error, even though I am not actively using push, it is simply enabled.Someone else may continue the fix in https://github.com/vaadin/flow/pull/6798
It requires to make the UI test read the browser log and make sure there is no error. Otherwise the fix itself works. Also UI tests with
websocket
andwebsocket_xhr
may be added.