sst: CloudFront returns "null" for dynamic routes in Node 20 and NextJs

When upgrading from ion version 0.0.169 to 0.0.170 (and confirmed the issue still exists in 0.0.188), certain dynamic routes are simply returning “null” - no logs have shown up SST Console and I haven’t found anything pertinent to the cause yet

image

Downgrading to version 0.0.169 resolves the issue. From there, manually upgrading the Default Site function to Node 20 (x86) causes it again. I’m running open-next@3.0.0-rc.8


Initial discord link: https://discord.com/channels/983865673656705025/1177071497974648952/1219813905036214413

From SyncLinear.com | ION-213

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 23 (11 by maintainers)

Most upvoted comments

@sethcarlton If you still have issues with the middleware in V3 you can open a new issue directly in the open-next repo.

@Hazmatyre At the moment there is no place to check for this apart from a thread in the discord. I’ll start posting releases directly on the open-next channel in the sst discord.

@fwang I think you can go back to Node 20 for the construct and set the OpenNext version to 3.0.0-rc.11. The issue can probably be closed as well.

Could you try enabling streaming in open-next.config.ts, it seems that there is an issue with next not properly awaiting for the end before returning. It would help if you could provide a sample repro of this issue as well.

// This is an example `open-next.config.ts` with streaming
import type { OpenNextConfig } from 'open-next/types/open-next.d.ts';

const config = {
  default: {
    override: {
      wrapper: "aws-lambda-streaming"
    }
  },
} satisfies OpenNextConfig;

export default config;
export type Config = typeof config;