nuxt-modules / nuxt-modules/strapi

http onResponse hook freezes the server

Open
#174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
717
Forks
89
Avg merge
7h 3m
Merged PRs (30d)
6

Description

Version

@nuxtjs/strapi: v0.3.1
nuxt: v2.15.8

Reproduction Link

https://github.com/sjahns/strapi-test

You will need a working strapi server to do a request. I just used another strapi installation I had running on localhost. You might have to change the strapi settings.

Steps to reproduce
  • Start the server.
  • Go to localhost:3000 -> That should work with the console.log() output from the asyncData in the page
  • enable the plugin that I prepared
  • Go to localhost:3000 -> You will see the console.log() from the hook but the server freezes

If you register the plugin as client only it works as expected. It only breaks on the server. You can also register the hook in the asyncData without the plugin, same result.

What is Expected?

the console.log() from the asyncData as well as the console.log() from the plugin

What is actually happening?

the console.log() from the plugin and the server freezes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the freeze with the linked strapi-test project using @nuxtjs/strapi v0.3.1, Nuxt 2.15.8, and a working Strapi server. Start by comparing the server-side plugin registration and asyncData use of the http onResponse hook with client-only registration. Done means the server completes the request and both the plugin and asyncData console output appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.