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

next-session showing "API resolved without sending a response" log message every request #73

Closed
stokescomp opened this issue Feb 17, 2020 · 2 comments

Comments

@stokescomp
Copy link

I installed next-session
Then I make a file in api/withsession.js

import { withSession } from 'next-session';
 
const handler = (req, res) => {
  req.session.views = req.session.views ? (req.session.views + 1) : 1;
  res.send(`In this session, you have visited this website ${req.session.views} time(s).`)
};
export default withSession(handler);

It shows this message every time I visit this page in the logs.
API resolved without sending a response for /api/withsession, this may result in a stalled requests.

@hoangvvo
Copy link
Owner

This was due to vercel/next.js#9999.

It is just a harmless warning and should not cause any actual error in production because the way next-session in written. I will soon update the package to avoid this warning.

@hoangvvo
Copy link
Owner

Refer to README. Feel free to reopen this for discussion.

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