Skip to content

Promise may not be fulfilled with 'undefined' when statusCode is not 204 #138

Closed
@milesj

Description

@milesj

Environment

react-native 0.64.2
@callstack/repack 2.5.1

Description

I seem to get this error a lot and I'm not sure why, as there's no other information. It only happens when bundling ios, not android. Here's the full console log.

ℹ [21:46:13.025Z][DevServerProxy] Starting compiler worker { platform: 'ios', port: 64743 }
ℹ [21:46:13.074Z][DevServerProxy] Hermes device connected { deviceId: 2 }
ℹ [21:46:14.087Z][DevServer@ios] Server listening at http://[::]:64743
ℹ [21:46:14.088Z][DevServerProxy] fetching from remote server {
  source: 'http://localhost:64743/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.coinbase.OnboardingMobile'
}
ℹ [21:46:14.094Z][DevServerProxy] fetching from remote server { source: 'http://localhost:64743/api/dashboard/stats?platform=ios' }
ℹ [21:46:14.129Z][webpack-dev-middleware] wait until bundle finished: /index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.coinbase.OnboardingMobile
ℹ [21:46:14.130Z][DevServer@ios] Dashboard client connected { clientId: 'client#0' }
ℹ [21:46:14.132Z][webpack-dev-middleware] wait until bundle finished: /api/dashboard/stats?platform=ios
✖ [21:47:13.971Z][DevServerProxy] Promise may not be fulfilled with 'undefined' when statusCode is not 204 {
  err: {
    type: 'FastifyError',
    message: "Promise may not be fulfilled with 'undefined' when statusCode is not 204",
    stack: "FastifyError: Promise may not be fulfilled with 'undefined' when statusCode is not 204\n" +
      '    at /Users/milesjohnson/Projects/react-native/node_modules/fastify/lib/wrapThenable.js:30:30',
    name: 'FastifyError',
    code: 'FST_ERR_PROMISE_NOT_FULFILLED',
    statusCode: 500
  }
}

Reproducible Demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalearea:repackThe issue is about logic/code inside of Re.Pack.status:investigatingThe issue needs more research and information.type:bugA bug report.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions