Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

1.27.0: netlify host with tracker script name environment variable #1008

Closed
duboiss opened this issue Mar 3, 2022 · 7 comments
Closed

1.27.0: netlify host with tracker script name environment variable #1008

duboiss opened this issue Mar 3, 2022 · 7 comments

Comments

@duboiss
Copy link
Contributor

duboiss commented Mar 3, 2022

Since v1.27.0, my custom tracker script name is not available on Netlify but still works on Heroku.
Its the same repository with the same environments variables.

image

Without env variable, everything work well with umami.js file (which always seems to be accessible, even with the environment variable).

https://portfolio-unami.herokuapp.com/statistics.js
https://unami.duboiss.fr/statistics.js

I think its related to #731 & #977

@duboiss duboiss changed the title 1.27.0: netlify 1.27.0: netlify host with tracker script name environment variable Mar 3, 2022
@mikecao
Copy link
Collaborator

mikecao commented Mar 3, 2022

I'm not that familiar with Netlify, but I'm guessing it can't run the new Next.js middleware, which is how the tracker script name is handled. We may need to come up with a static solution for Netlify.

@duboiss
Copy link
Contributor Author

duboiss commented Mar 3, 2022

One question, if I rollback to v1.26.0 for testing purposes, will I have database problems? If the v1.17.0 has updated the schema. Thanks

@mikecao
Copy link
Collaborator

mikecao commented Mar 4, 2022

No schema changes were made.

@AFilthyLeaf
Copy link

I have the same issue as this but on Heroku! Not sure what could be causing it.

@christopherpickering
Copy link
Contributor

I did a few prints to try and debug as well. I set the env variable to "something_cool".

Modified function:
image

Netlify logs:
image

And when running locally with npm run dev

image

But when I check the network logs on the netlify build, it looks like it tries to get the umami.js properly. But somehow returns 404 instead of 200.

I wonder if the href of the url object needs to be updated as well? I'll test it out.

@christopherpickering
Copy link
Contributor

I opened an issue w/ netlify, but I have a feeling it is something with dev vs prod in next... as the netlify cli runs fine.
opennextjs/opennextjs-netlify#1266

@christopherpickering
Copy link
Contributor

I'm wondering now if this is something w/ nextjs in the prod vs dev mode on how it handles 404's?https://stackoverflow.com/questions/66854788/getting-404-when-loading-dynamic-routes-on-nextjs

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants