okfn / dataportals.org

Open Data Portals and Sites around the world
http://dataportals.org/
132 stars 80 forks source link

Javascript on the site not loading #200

Closed augusto-herrmann closed 2 years ago

augusto-herrmann commented 5 years ago

None of the javascript files on the site are loading. They all return 404 errors. Because of that, the map and other functionality are no longer working.

Could it be due to the free quota having been exceeded on Heroku? @todrobbins @rufuspollock

rufuspollock commented 5 years ago

@augusto-herrmann i'm not sure - normally if free quota exceeded the site shuts down.

augusto-herrmann commented 5 years ago

We should have some tests and CI to track changes to the code of DataPortals.org and alert if there are any errors. We currently do have just a CI for the data using GoodTables.io, but not for the actual code (which brings me the question of whether or not we should separate the codebase for the site and the dataset in different repos. Wdyt, @rufuspollock ? ).

For now, I think we need someone who is familiar with the site's code or stack to take a look and find out why all the scripts are returning 404 errors.

todrobbins commented 5 years ago

@augusto-herrmann I think this might be my fault. I don't think the git submodules are being deployed via Heroku. I should have some time this week to troubleshoot if you're available.

augusto-herrmann commented 5 years ago

I have no experience deploying to Heroku or using the Heroku CLI, but, from what I've glanced at, it does not seems to be difficult to do. So I'm up for it if I can help.

About the git submodules, weren't they set up before? What has changed?

augusto-herrmann commented 5 years ago

When issuing the following command:

$ git submodule 
-fa5ff306740fffc17cd3c83d8c4121782ba66567 public/vendor/recline

we see only a submodule for Recline. What is the expected behaviour? Which submodules should be there?

I also tried checking out a commit of more than a year ago, and typing the same command. The result is exactly the same. So, I don't suppose some submodule has been excluded by accident. Am I looking in the correct places, @todrobbins ? As I said, I have no experience at all with submodules.

rufuspollock commented 4 years ago

@augusto-herrmann we're looking at this today on Open Data Day. If you are around drop in to the channel here https://gitter.im/okfn/opendataday

zelima commented 4 years ago

@augusto-herrmann what exactly do you mean by

None of the javascript files on the site are loading. They all return 404 errors.

Just checked and most of them seem to be loading ok

zelima commented 4 years ago

So I've removed recline to reproduce error locally and maps were gone. Brought it back and maps are back.

I've created 2 new heroku apps and both work fine - maps are loading

  1. run git submodle update before pushing to heroku https://mighty-island-21211.herokuapp.com/
  2. just clone and push to heroku https://rocky-tor-25569.herokuapp.com/

Both loading maps. Probably simple redeploy to heroku will fix this

rufuspollock commented 4 years ago

@augusto-herrmann i also now definitively have heroku access and can share with others. Let's get this sorted!

augusto-herrmann commented 4 years ago

@augusto-herrmann what exactly do you mean by

None of the javascript files on the site are loading. They all return 404 errors.

Just checked and most of them seem to be loading ok

You're right. What I meant to say is that a lot of the javascript files are not loading, especially the ones related to recline and leaflet.

data-portals-errors

@augusto-herrmann i also now definitively have heroku access and can share with others. Let's get this sorted!

Cool!

Sadly, the link to Heroku deployment instructions on the README.md is now broken. It seems the Github repository okfn/datasets.okfnlabs.org no longer exists. @rufuspollock, do you know where that went?

As a side note, I've found this article on containerizing Node.js apps that we might want to look into and implement in order to facilitate deployment using Docker.

azolnai commented 4 years ago

Hi, what's the status on the map front end? Thanks, Andrew

todrobbins commented 4 years ago

@rufuspollock @augusto-herrmann happy to help sort this out. I apologize for causing the issue in the first place!

rufuspollock commented 4 years ago

@toddrobbins - thanks, do you want to reproduce locally and see if you can create a fix?

Rufus

On Wed, May 27, 2020 at 6:30 PM Tod Robbins notifications@github.com wrote:

@rufuspollock https://github.com/rufuspollock @augusto-herrmann https://github.com/augusto-herrmann happy to help sort this out. I apologize for causing the issue in the first place!

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/okfn/dataportals.org/issues/200#issuecomment-634783523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMDMWPX4757LELLLVNGODRTU5ZRANCNFSM4IZODZQA .

augusto-herrmann commented 4 years ago

Thanks, @todrobbins !

From zelima's comment above it should be simple to fix, but if you need my help fixing this, just say so.

todrobbins commented 4 years ago

βœ… Fixed

Screen Shot 2020-06-02 at 5 41 30 PM

Pushed the current GitHub master and we're good.

azolnai commented 4 years ago

Yay! Good work and thx, Andrew

On Wed, 3 Jun 2020, 00:42 Tod Robbins, notifications@github.com wrote:

βœ… Fixed

[image: Screen Shot 2020-06-02 at 5 41 30 PM] https://user-images.githubusercontent.com/158590/83580069-500b8b80-a4f8-11ea-9034-fd365c91b47e.png

Pushed the current GitHub master and we're good.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/okfn/dataportals.org/issues/200#issuecomment-637863739, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBZZTYIBLE4WGQ6HICZHH3RUWE53ANCNFSM4IZODZQA .

azolnai commented 3 years ago

Hi, this front-end is broken again, shall I submit a new issue, or can you re-open this one?

image

augusto-herrmann commented 3 years ago

Indeed, it's broken again. Let's reopen.

azolnai commented 3 years ago

πŸ‘

On Wed, 21 Oct 2020, 20:17 Augusto Herrmann, notifications@github.com wrote:

Reopened #200 https://github.com/okfn/dataportals.org/issues/200.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/okfn/dataportals.org/issues/200#event-3905568766, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBZZTZP3ZKQANGN5Y5WYK3SL4XWHANCNFSM4IZODZQA .

augusto-herrmann commented 3 years ago

@todrobbins a lot of resource files are giving 404 errors again. Do you remember how you fixed it last time? I looked into the commit history and could not find any commits in June 2020, when you fixed it. So I suppose this is just some deployment issue?

You said last time you just manually deployed from master, but I just did that right now and it didn't make a difference.

todrobbins commented 3 years ago

@augusto-herrmann sorry for the delay! If I recall correctly I had to be sure to install the git submodule for recline. But I don't remember the command.

augusto-herrmann commented 3 years ago

@todrobbins I managed to install the git submodule for recline locally, but not on the Heroku deployment. There was supposed to be Heroku deployment instructions in the README, but they point to a broken link now (as an aside, I propose removing them for now, until we manage to write proper instructions #224).

Besides, okfn/recline has been renamed to datopian/portal.js, but I'm not sure it is a problem, as I was able to update the git submodule locally with the following command:

git submodule update --init --recursive

I found some instruction on Heroku on how to work with git submodules. However, these instructions there:

Heroku properly resolves and fetches submodules as part of deployment:

git push heroku
Counting objects: 13, done.

seem to be designed for a different kind of deployment. We're using automatic deploy from the master branch:

heroku-automatic-deploy

and for some reason it seems it's not fetching the Recline submodule.

todrobbins commented 3 years ago

@rufuspollock care to lend a hand? πŸ™πŸ»

rufuspollock commented 3 years ago

@todrobbins i'm not sure i have access to the heroku and i'm not very online atm. Is it worth asking e.g. @amercader?

todrobbins commented 3 years ago

No worries! Thanks for the reference!

amercader commented 3 years ago

Site seems up again, please check if everything works as expected.

I did two things:

  1. Install this buildpack to make sure git submodules are initialized on deploy (pretty sure this was unnecessary as the app had worked fine without it in the past)
  2. Change the submodules config to point to a branch in the old recline repo (currently portal.js) that contained the actual recline code (https://github.com/okfn/dataportals.org/commit/b55023ed7537488966cdccf9e8f83749641bbb13). The renaming and reusing of the repository for a different purpose was what broke the build
azolnai commented 3 years ago

Thanks guys! I posted it on my SM. Andrew https://twitter.com/azolnai/status/1437745413428240385?s=20

On Tuesday, 14 September 2021, 10:50:04 BST, AdriΓ  Mercader ***@***.***> wrote:  

Site seems up again, please check if everything works as expected.

I did two things:

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

azolnai commented 3 years ago

Thanks guys! I posted it on my SM s.a. below. Cheers, Andrew

https://twitter.com/azolnai/status/1437745413428240385?s=20

On Tuesday, 14 September 2021, 10:50:04 BST, AdriΓ  Mercader ***@***.***> wrote:  

Site seems up again, please check if everything works as expected.

I did two things:

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

augusto-herrmann commented 2 years ago

The site seems to be working properly for a while, now. Let's close this.

azolnai commented 2 years ago

Lookin' good, kid (apols 2 the Bogart)... Thanks for restoring that! Call me an old sentimental who helped w this baby LOL

Sent from Yahoo Mail on Android

On Sun, 3 Jul 2022 at 1:14, Augusto @.***> wrote:

The site seems to be working properly for a while, now. Let's close this.

β€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>