Skip to content

[WIP] Fix failed resource loading for Vercel insights script#101

Open
Codex wants to merge 4 commits intomainfrom
codex/fix-vercel-script-issue
Open

[WIP] Fix failed resource loading for Vercel insights script#101
Codex wants to merge 4 commits intomainfrom
codex/fix-vercel-script-issue

Conversation

@Codex
Copy link
Copy Markdown

@Codex Codex AI commented Apr 9, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>Failed to get resources (Vercel script)</issue_title>
<issue_description>When going to the mobilitydatabase website, there will be an error in the console saying that the vercel insights script 404 and that it refused to execute script from vercel insights because it's mime type text/html is not executable and strict mime type checking is enabled.

There should be no console errors

Image</issue_description>

Comments on the Issue (you are @codex[agent] in this section)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mobilitydatabase-web Ready Ready Preview, Comment May 1, 2026 1:09pm

Request Review

Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread src/app/[locale]/layout.tsx Outdated
Comment on lines +58 to +121
@@ -115,7 +118,7 @@ export default async function LocaleLayout({
}}
>
{children}
{process.env.VERCEL_ENV === 'production' && (
{vercelInsightsEnabled && (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex[agent] it was discovered this issue is due to the fact that we do not have Web Analytics enabled in Vercel. Revert these changes and remove import { SpeedInsights } from '@vercel/speed-insights/next';

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the layout change and removed the SpeedInsights usage/import in commit 70c5b3f.

Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
@Alessandro100 Alessandro100 marked this pull request as ready for review May 1, 2026 13:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

*Lighthouse ran on https://mobilitydatabase-d4aapeb4z-mobility-data.vercel.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 97 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-d4aapeb4z-mobility-data.vercel.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 86 🟠 87 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-d4aapeb4z-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🔴 40 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-d4aapeb4z-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 97 🟠 84 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-d4aapeb4z-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 92 🟢 94 🟢 96 🟢 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to get resources (Vercel script)

4 participants