timwis / jkan

A lightweight, backend-free open data portal, powered by Jekyll
https://jkan.io
MIT License
219 stars 309 forks source link

404 error? #128

Closed BasharAG closed 7 years ago

BasharAG commented 7 years ago

I followed all the steps, but when I visited my Github URL to the app, I got a 404 error. I tried visiting the Heruko deployed app page, and it said "Cannot GET/".

Did I do something wrong?

timwis commented 7 years ago

Hm, looks like it's working for me: https://basharag.github.io/jkan/ no?

BasharAG commented 7 years ago

Wow. That is odd. It wouldn't work for the past couple of days at all, and I was using the exact URL you provided. Do you have any idea or speculation as to why that happened?

carlvlewis commented 7 years ago

As a sidenote, I'm experiencing a similar problem. The Heroku deployent is just showing Cannot GET/. And although the initial JKAN instance does launch at http://carlvlewis.github.io/jkan, whenever I go to /admin and try to edit fields, it returns There was an error saving the configuration message.

screen shot 2017-03-04 at 4 13 20 am

This seems to me to be a bug in the Heroku gatekeeper deployment. Everything was configured correctly on my end, and the client ID and deployment URL even appear under the Authentification tab of the JKAN admin.

I just can't save any changes in the admin...

@timwis -- I can replicate the exact same problem on your fork at /admin/––it's essentially not authenticating with GH OAuth app. (cc @BasharAG)

carlvlewis commented 7 years ago

Here's the build log from the Heroku deployment, which does say it successfully deployed. It just doesn't load anything but cannot /GET

`-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  >= 0.6.x
       engines.npm (package.json):   unspecified (use default)

       Resolving node version >= 0.6.x via semver.io...
       Downloading and installing node 7.7.1...
       Using default npm version: 4.1.2
-----> Restoring cache
       Skipping cache restore (new runtime signature)
-----> Building dependencies
       Installing node modules (package.json)
       gatekeeper@0.1.0 /tmp/build_9bdc2b4f7a5bab59fa606b6be553b6ce/prose-gatekeeper-f2d6f32
       └─┬ express@3.16.10
       ├── basic-auth@1.0.0
       ├── buffer-crc32@0.2.3
       ├─┬ commander@1.3.2
       │ └── keypress@0.1.0
       ├─┬ connect@2.25.10
       │ ├── basic-auth-connect@1.0.0
       │ ├─┬ body-parser@1.6.7
       │ │ ├── iconv-lite@0.4.4
       │ │ └── raw-body@1.3.0
       │ ├── bytes@1.0.0
       │ ├─┬ compression@1.0.11
       │ │ ├─┬ accepts@1.0.7
       │ │ │ └── negotiator@0.4.7
       │ │ ├── compressible@1.1.1
       │ │ └── vary@1.0.1
       │ ├── connect-timeout@1.2.2
       │ ├── cookie-parser@1.3.2
       │ ├─┬ csurf@1.4.1
       │ │ └─┬ csrf@2.0.7
       │ │   ├── base64-url@1.2.1
       │ │   ├── rndm@1.1.1
       │ │   ├── scmp@1.0.0
       │ │   └─┬ uid-safe@1.1.0
       │ │     └── native-or-bluebird@1.1.2
       │ ├── errorhandler@1.1.1
       │ ├─┬ express-session@1.7.6
       │ │ ├─┬ uid-safe@1.0.1
       │ │ │ └─┬ mz@1.3.0
       │ │ │   ├─┬ thenify@3.2.1
       │ │ │   │ └── any-promise@1.3.0
       │ │ │   └── thenify-all@1.6.0
       │ │ └── utils-merge@1.0.0
       │ ├── finalhandler@0.1.0
       │ ├─┬ method-override@2.1.3
       │ │ └── vary@1.0.1
       │ ├── morgan@1.2.3
       │ ├─┬ multiparty@3.3.2
       │ │ ├─┬ readable-stream@1.1.14
       │ │ │ ├── core-util-is@1.0.2
       │ │ │ ├── inherits@2.0.3
       │ │ │ ├── isarray@0.0.1
       │ │ │ └── string_decoder@0.10.31
       │ │ └── stream-counter@0.2.0
       │ ├── on-headers@1.0.1
       │ ├── pause@0.0.1
       │ ├── qs@2.2.2
       │ ├── response-time@2.0.1
       │ ├── serve-favicon@2.0.1
       │ ├─┬ serve-index@1.1.6
       │ │ └── batch@0.5.1
       │ ├── serve-static@1.5.4
       │ ├─┬ type-is@1.3.2
       │ │ └── mime-types@1.0.2
       │ └── vhost@2.0.0
       ├── cookie@0.1.2
       ├── cookie-signature@1.0.4
       ├─┬ debug@1.0.4
       │ └── ms@0.6.2
       ├── depd@0.4.4
       ├── escape-html@1.0.1
       ├── fresh@0.2.2
       ├── media-typer@0.2.0
       ├── merge-descriptors@0.0.2
       ├── methods@1.1.0
       ├─┬ mkdirp@0.5.0
       │ └── minimist@0.0.8
       ├── parseurl@1.3.1
       ├─┬ proxy-addr@1.0.1
       │ └── ipaddr.js@0.1.2
       ├── range-parser@1.0.0
       ├─┬ send@0.8.5
       │ ├── destroy@1.0.3
       │ ├── mime@1.2.11
       │ └─┬ on-finished@2.1.0
       │   └── ee-first@1.0.5
       └── vary@0.1.0

-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 15.6M
-----> Launching...
       Released v4
       https://opensav-jkan.herokuapp.com/ deployed to Heroku`
carlvlewis commented 7 years ago

Pinning this back to the top as this is a critical bug, it appears.

carlvlewis commented 7 years ago

@timwis @BasharAG Did you all get JKAN up and running?

timwis commented 7 years ago

Hi @carlvlewis, I've just installed a fresh fork of JKAN and Gatekeeper and it seems to be working fine. Gatekeeper is supposed to give you the Cannot GET / message when you visit its endpoint directly; It expects requests to /authenticate/<auth-code>. You can see a different response if you go to https://opensav-jkan.herokuapp.com/authenticate/asdf.

I just tried logging in on your site and if you look at the URL it redirects you to, it suggests that you don't have the "authorization callback url" configured correctly in your GitHub Application settings. It should be set to https://carlvlewis.github.io/jkan. Can you double check that?

carlvlewis commented 7 years ago

This works but I was trying to deploy on a GH organizational account. It seems to be working fine now. On Thu, Mar 16, 2017 at 9:26 PM Tim Wisniewski notifications@github.com wrote:

Hi @carlvlewis https://github.com/carlvlewis, I've just installed a fresh fork of JKAN and Gatekeeper and it seems to be working fine. Gatekeeper is supposed to give you the Cannot GET / message when you visit its endpoint directly; It expects requests to /authenticate/. You can see a different response if you go to https://opensav-jkan.herokuapp.com/authenticate/asdf.

I just tried logging in on your site and if you look at the URL it redirects you to, it suggests that you don't have the "authorization callback url" configured correctly in your GitHub Application settings. It should be set to https://carlvlewis.github.io/jkan. Can you double check that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/timwis/jkan/issues/128#issuecomment-287241316, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnnIejbYHIBnk6iunCtMFUf7O6pSLE4ks5rmeFfgaJpZM4MP8h4 .

timwis commented 7 years ago

@carlvlewis ah, in that case, it may be that you did not have write access to the repo in the organization you were deploying it to -- I've seen that one before. Going to close this since it's resolved; let me know if otherwise.

carlvlewis commented 7 years ago

No, that's not the case. But I'll give it a go later when I have time.

On Sat, Mar 18, 2017 at 3:14 PM, Tim Wisniewski notifications@github.com wrote:

Closed #128 https://github.com/timwis/jkan/issues/128.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/timwis/jkan/issues/128#event-1005626540, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnnIfpkVErnj5aGf6akd573ToFcIcDUks5rnC0DgaJpZM4MP8h4 .