Skip to content

ERROR Cannot set headers after they are sent to the client #1510

Discussion options

You must be logged in to vote

I had the same error.

if you are using auth module and fetching the data on initial : Use mounted instead of created

created() { this.search(); //--> Axios get request },
This will cause Error => Cannot set headers after they are sent to the client.

mounted() { this.search(); //--> Axios get request },
It's OK :)

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by frederikpyt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants
Converted from issue

This discussion was converted from issue #1205 on January 20, 2022 10:37.