bridge icon indicating copy to clipboard operation
bridge copied to clipboard

Infinite loop bridge

Open nestle49 opened this issue 3 years ago • 0 comments

Environment

Nuxt CLI v3.0.0-rc.8


  • Operating System: Darwin
  • Node Version: v16.15.0
  • Nuxt Version: 2.15.8
  • Package Manager: [email protected]
  • Builder: webpack
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

I can't create repro for this project

Describe the bug

I migrated from composition/api to nuxt/bridge and get infinite loading and console error on server side:

found in

---> <Error> at layouts/error.vue
       <Nuxt>
         <ErrorLayout> at layouts/ErrorLayout.vue
           <Root>
[Vue warn]: Error in setup: "Error: This must be called within a setup function."

I searching root of problem and found it:

try {
     const response = await this.$nuxt.$axios.get<ApiFirmApplicationInit>(`/api/firm/application/init/?action=init`, {
           params: { hostname }
      });
      
     if (response.data) {
             this.INIT_APP(response.data);
             return true;
       }
}

Request for some reason sleep and does not finished in line

const response = await this.$nuxt.$axios.get<ApiFirmApplicationInit>(`/api/firm/application/init/?action=init`, {
           params: { hostname }
      });

It works with @nuxt/composition-api and returned response, but not with bridge Also I use @nuxtjs/axios with params:

axios: {
        proxy: true,
    },

And finally i get:

503 Server Unavailable

Error: socket hang up
    at connResetException (node:internal/errors:692:14)
    at Socket.socketOnEnd (node:_http_client:478:23)
    at Socket.emit (node:events:539:35)
    at Socket.emit (node:domain:475:12)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21

Any ideas, what's wrong?

Additional context

No response

Logs

No response

nestle49 avatar Aug 15 '22 12:08 nestle49