Giter Club home page Giter Club logo

Comments (15)

jellyfang avatar jellyfang commented on August 16, 2024

When I try to load up the heroku link it shows the app is broken. Can you paste in what the heroku logs say?

from messenger-bot-tutorial.

shurm avatar shurm commented on August 16, 2024

Sure no problem. I tried to open my application and it said the same thing. so I went to view logs on heroku and copyed the text. I hope this help cause im still lost :(

heroku log

from messenger-bot-tutorial.

mcgingras avatar mcgingras commented on August 16, 2024

I'm having the same issue... was any conclusion made on how to solve this problem?

from messenger-bot-tutorial.

xbklairith avatar xbklairith commented on August 16, 2024

Remove all app.get and app.post except root path

app.get('/', function (req, res) {
    res.send('hello world i am a secret bot')
})

it should be ok, if not pls check on heroku

from messenger-bot-tutorial.

Marisha-Sahay avatar Marisha-Sahay commented on August 16, 2024

I did this but its still not working for me

from messenger-bot-tutorial.

neeraj87 avatar neeraj87 commented on August 16, 2024

@shurm and @Marisha-Sahay I faced this same issue and here is what I did to solve it.

When I tried to run it locally using node index.js it gave me an error saying:

const express = require('express');
SyntaxError: Use of const in strict mode.

So I replaced all const in the code with var

After tha,t I ran it again locally and it gave an error saying: Cannot find module 'request', so I did

npm install request --save

After this, I ran it locally and it gave the message "Hello world, I am a chat bot". I deployed it to Heroku and ran it from there again and it gave the same message. So now the app is working on Heroku. I did the Facebook webhook setup again and it worked.

from messenger-bot-tutorial.

kostimarko avatar kostimarko commented on August 16, 2024

Hi what URL are you using? You should add /webhook/ to your FB URL

from messenger-bot-tutorial.

codename-47 avatar codename-47 commented on August 16, 2024

@neeraj87 I am getting the same problem. my code is running good and I am getting output in local port but when deployed to heroku, I am getting the error message(check the image). Is there something we need to change in the script before deploying it to Heroku? I have no prior knowledge to Heroku cloud.
image

from messenger-bot-tutorial.

neeraj87 avatar neeraj87 commented on August 16, 2024

@codename-47 few ways to debug.

  1. Have you included the procfile?
  2. install heroku toolbelt on your machine and print out logs: heroku logs --app appname

from messenger-bot-tutorial.

codename-47 avatar codename-47 commented on August 16, 2024

@neeraj87 Thanks. yes, I have included the procfile. However when I am using heroku logs --app appname, heroku is not recognising the app. (chatbot is my app name). Any comments on that?
image

from messenger-bot-tutorial.

neeraj87 avatar neeraj87 commented on August 16, 2024

On your app's dashboard in heroku, there is a More button near Open App which has View Logs option. Open your app, when it shows the application error then go back and View logs, it will show you the logs on heroku.

Regarding the screenshot above, have you first logged in heroku toolbelt from terminal? Also, are you the primary owner of the app or a collaborator?

from messenger-bot-tutorial.

codename-47 avatar codename-47 commented on August 16, 2024

@neeraj87 What connection string are you providing in the code? I have hardcoded it to my local machine port 5000. That might be the problem?

from messenger-bot-tutorial.

codename-47 avatar codename-47 commented on August 16, 2024

@neeraj87 @Marisha-Sahay @shurm it worked!!! We need to provide start script to "start": "node index.js" in package.json file. Thanks for all the help.
image

from messenger-bot-tutorial.

neeraj87 avatar neeraj87 commented on August 16, 2024

@codename-47 glad you got it figured out.

from messenger-bot-tutorial.

Eshpelin avatar Eshpelin commented on August 16, 2024

Okay so, since I am having the exact same problem, here is what I have to show for now:

Error Received:

The URL couldn't be validated. Callback verification failed with the following errors: HTTP Status Code = 503; HTTP Message = Service Unavailable

Did definitely use:

.../webhook/

The package.json is also configured:

image

Now, the heroku dashboard shows that things are running, but I still get the error page too:

image

Application Page Error:

image

And, here is the latest log:

2018-02-14T23:21:54.685786+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2018-02-14T23:21:54.685947+00:00 app[web.1]: npm ERR!     npm bugs gui-webview
2018-02-14T23:21:54.686279+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2018-02-14T23:21:54.686621+00:00 app[web.1]: npm ERR!     npm owner ls gui-webview
2018-02-14T23:21:54.686965+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2018-02-14T23:21:54.695161+00:00 app[web.1]: 
2018-02-14T23:21:54.695468+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2018-02-14T23:21:54.695355+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2018-02-14T23:21:54.814625+00:00 heroku[web.1]: State changed from starting to crashed
2018-02-14T23:22:37.464232+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/webhook/?hub.mode=subscribe&hub.challenge=1669061154&hub.verify_token=connect123" host=gradconnect-signup-bot.herokuapp.com request_id=18da082a-629b-479a-8af7-49ed206fbbb1 fwd="69.171.225.21" dyno= connect= service= status=503 bytes= protocol=https
2018-02-14T23:28:58.183029+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gradconnect-signup-bot.herokuapp.com request_id=619e38e1-d6d5-4456-adb0-2a5572957fb0 fwd="45.127.50.230" dyno= connect= service= status=503 bytes= protocol=https

Any idea what I might still be doing wrong?

from messenger-bot-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.