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

Goat counter issue on staging branch #75

Open
mdunbavan opened this issue Apr 13, 2022 · 4 comments
Open

Goat counter issue on staging branch #75

mdunbavan opened this issue Apr 13, 2022 · 4 comments
Assignees

Comments

@mdunbavan
Copy link
Contributor

mdunbavan commented Apr 13, 2022

Hello all,

So after a bit of investigation it seems like Google App Engine has some issues with external scripts being loaded on static sites that are client-side only. I got to this conclusion by deploying exactly the same code to Netlify to see if I could replicate the issue there but it worked perfectly fine for me. The url is below:

https://staging-netlify-test--elastic-noether-393172.netlify.app/

I then changed the above env to use SSR(server side rendering) on the front-end so we aren't relying too much on the client-side and we get the added benefits of everything being loaded into the app state at once. This would then stop the issue of the external script being loaded before the client-side was ready breaking the site on refresh.

To further back up my thoughts, I have attached a screengrab of the associated env with the network tab open displaying the Goatcounter script publishing a count event.

Screenshot 2022-04-13 at 12 03 06

I have now created a PR to go into the main branch for staging on Google App Engine with the same config settings as above. I will need this to be approved to merge into main then we can further test.

#74

Thanks,
Mark

@mdunbavan mdunbavan self-assigned this Apr 13, 2022
@azeemshaikh38
Copy link
Contributor

Yep, that fixes the breakages but now the sidebar is gone (see image below). Also, the GitHub Stars icon is flaky. The number gets populated sometimes but sometimes it doesn't.

image

@mdunbavan
Copy link
Contributor Author

mdunbavan commented Apr 13, 2022

Yeah I saw that.

I am leaving in about 30 mins but I am going to look into this issue tomorrow

@azeemshaikh38
Copy link
Contributor

Another question is - we are now making these changes (like disabling ssr) for AppEngine deployment. If we move to Netlify at a later point, would these changes still work?

I am leaving in about 30 mins but I am going to look into this issue tomorrow

Thanks!

@mdunbavan
Copy link
Contributor Author

Yeah they will still work, and in that change which fixed the Goat counter issue, we actually enabled ssr

Ideally you need to move to Netlify sooner rather than later. It would be great if OSSF could get it setup now so we could easily port it over and make sure it is running on an optimal server for what you need.

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

2 participants