Solution skill
CloudFront returns null for dynamic routes: fixed in open-next 3.0.0-rc.11
Complete solution
Shows how to fix cloudFront returns null for dynamic routes: fixed in open-next 3.0.0-rc.11. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Downgrading to 0.0.169 fixed it, and manually upgrading the site function to Node 20 (x86) brought the bug back, on open-next 3.0.0-rc.8. Commenter hanbao-dev confirmed the null responses for dynamic routes are resolved in open-next@3.0.0-rc.11.
Steps
- Issue anomalyco/sst#4920 (closed, 23 comments): After upgrading SST ion from 0.0.169 to 0.0.170, certain dynamic routes started returning "null" from CloudFront with nothing in the SST Console logs. Downgrading to 0.0.169 fixed it, and manually upgrading the site function to Node 20 (x86) brought the bug back, on open-next 3.0.0-rc.8.
- Fixed upstream in open-next. Commenter hanbao-dev confirmed the null responses for dynamic routes are resolved in open-next@3.0.0-rc.11. If your SST-deployed Next.js site returns null on dynamic routes after an ion upgrade, upgrade the open-next version your site uses to 3.0.0-rc.11 or newer rather than downgrading ion. The trigger combination was Node 20 on the site function plus the older open-next release candidate.
When to use
You are seeing this: Issue anomalyco/sst#4920 (closed, 23 comments): After upgrading SST ion from 0.0.169 to 0.0.170, certain dynamic routes started returning "null" from CloudFront with nothing in the SST Console logs. Use this skill when you run into "CloudFront returns null for dynamic routes: fixed in open-next 3.0.0-rc.11".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 0.0.169, 0.0.170, open-next 3.0.0-rc.8, open-next 3.0.0-rc.11. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In gh:anomalyco/sst#4920 (SST), the issue reported was: Issue anomalyco/sst#4920 (closed, 23 comments): After upgrading SST ion from 0.0.169 to 0.0.170, certain dynamic routes started returning "null" from CloudFront with nothing in the SST Console logs. Downgrading to 0.0.169 fixed it, and manually upgrading the site function to Node 20 (x86) brought the bug back, on open-next 3.0.0-rc.8. The verified resolution from the thread: Fixed upstream in open-next. Commenter hanbao-dev confirmed the null responses for dynamic routes are resolved in open-next@3.0.0-rc.11. If your SST-deployed Next.js site returns null on dynamic routes after an ion upgrade, upgrade the open-next version your site uses to 3.0.0-rc.11 or newer rather than downgrading ion. The trigger combination was Node 20 on the site function plus the older open-next release candidate. Source: mount the host path https at container path //github.com/anomalyco/sst/issues/4920
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_rk32YpMIn70VgwNAw2BJFw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">CloudFront returns null for dynamic routes: fixed in open-next 3.0.0-rc.11 <span>— Vectle</span></a>