Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar not loading since 1.161.3 with nextjs rewrites #1458

Closed
FabianRueckert opened this issue Oct 8, 2024 · 2 comments
Closed

Toolbar not loading since 1.161.3 with nextjs rewrites #1458

FabianRueckert opened this issue Oct 8, 2024 · 2 comments

Comments

@FabianRueckert
Copy link

FabianRueckert commented Oct 8, 2024

Hi,

I am using nextjs rewrites according to the docs

  async rewrites() {
    return [
      {
        source: "/ingest/static/:path*",
        destination: "https://eu-assets.i.posthog.com/static/:path*",
      },
      {
        source: "/ingest/:path*",
        destination: "https://eu.i.posthog.com/:path*",
      },
      {
        source: "/ingest/decide",
        destination: "https://eu.i.posthog.com/decide",
      },
    ];
  },

Until release 1.161.2 the toolbar works fine, but since release 1.161.3, the toolbar doesn't load correctly anymore, apparently due to a failed network call.

In 1.161.2 I can see in the chrome network tab, that the request to fetch the toolbar.js is made to

http://localhost:3000/ingest/static/toolbar.js?t=1728405000000

In 1.161.3 however, when I look in the network tab, i can see a request to the url

http://localhost:3000/ingest/static/toolbar.js?v=1.167.0?&=1728404700000

is made and returns with a 500 internal server error. Note that the t is missing before the =1728404700000.
If I re-add the t manually or if I disable the nextjs rewrite I correctly receive the JS for the toolbar.

@lucasra1
Copy link
Contributor

Already have an PR ready that should fix that, we have the same problem.

#1456

@lucasra1
Copy link
Contributor

@pauldambra this can be closed. is fixed in 1.176.1

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

No branches or pull requests

3 participants