IBM-Cloud / phonebot

Slackbot using IBM Watson and Twilio to make phone calls via slack commands
MIT License
237 stars 32 forks source link

Error while trying to Deploy to IBM Bluemix #18

Open shalevi69 opened 7 years ago

shalevi69 commented 7 years ago

Hey, I was following the guide step by step. but I'm getting the same error over and over agian while trying to deploy to IBM Bluemix. When i do the command :

$ cf cups twilio -p '{"accountSID":"ACCOUNT_SID","authToken":"TOKEN", "url": "https://api.twilio.com"}'

I'm getting the error of:

FAILED No API endpoint set. Use 'cf login' or 'cf api' to target an endpoint.

And when i'm trying to set the api endpiont withe the command:

cf api "https://api.twilio.com"

I'm still getting the same error....

what can i do?

jthomas commented 7 years ago

The cf api or cf login commands need to target the Bluemix APIs, not Twilios.

If you follow these instructions to get authenticated, this should resolve your issue: https://stackoverflow.com/questions/29831297/how-do-i-use-cloud-foundry-to-login-to-ibm-bluemix

shalevi69 commented 7 years ago

Thanks you for you answer! that was very helpful. I am having another issue at the last part, at the deploy command:

$ cf push --name your_random_identifier I gave a random identifier, and when i'm trying to accesses the url - http://your_random_identifier.mybluemix.net , i'm getting this error:

This page contains the following errors:


error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.

I can't understand what did i missed out. The incoming and outgoing webhooks are integrated to the channel, and i have copied the sid and token correctly from twilio, and deployed the git to my bluemix.

Thanks for your help.

jthomas commented 7 years ago

You need to use the random identifier you gave in the URL. So if you choose foo_bar_foo as the identifier, the URL will be http://foo_bar_foo.mybluemix.net not http://your_random_identifier.mybluemix.net

shalevi69 commented 7 years ago

Yeah I know, that wha I did. I used my own identifier. Still not working

On 18 Jul 2017, at 15:23, James Thomas notifications@github.com wrote:

You need to use the random identifier you gave in the URL. So if you choose foo_bar_foo as the identifier, the URL will be http://foo_bar_foo.mybluemix.net http://foo_bar_foo.mybluemix.net/ not http://your_random_identifier.mybluemix.net http://your_random_identifier.mybluemix.net/ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/IBM-Bluemix/phonebot/issues/18#issuecomment-316047469, or mute the thread https://github.com/notifications/unsubscribe-auth/ATRjS5UW8di4Y49cUGZfuUS3eBBnPWiAks5sPKPBgaJpZM4OZQlu.

jthomas commented 7 years ago

Can you dump cf logs APP_NAME in here?

shalevi69 commented 7 years ago

screen shot 2017-07-20 at 10 39 11

screen shot 2017-07-20 at 10 39 01 screen shot 2017-07-20 at 10 43 02
jthomas commented 7 years ago

The command should be cf logs testBot not cf logs APP_NAME. It will show the console output which you can paste here.

This demo does not have a web interface, it's a Slack bot. Going to the URL for the app with a web-browser should not work.

shalevi69 commented 7 years ago
screen shot 2017-07-20 at 10 54 50
shalevi69 commented 7 years ago

First - thank for you help. second - what am i missing?...

jthomas commented 7 years ago

Can you run cf apps? Is that app listed?

shalevi69 commented 7 years ago

The app is not listed. how do i put it into list?

screen shot 2017-07-20 at 11 18 24
jthomas commented 7 years ago

Can you run cf push --name testBot again and paste the output?

shalevi69 commented 7 years ago
screen shot 2017-07-20 at 11 35 01
jthomas commented 7 years ago

okay, let's do cf push testBot and try again. looks like that flag was removed or the docs are incorrect.

shalevi69 commented 7 years ago
screen shot 2017-07-20 at 11 58 21
jthomas commented 7 years ago

You need to use a name which hasn't been taken by another user. Let's try phonebot12345.

shalevi69 commented 7 years ago
screen shot 2017-07-20 at 12 20 03
jthomas commented 7 years ago

Great, now we can check the logs....cf logs phonebot12345

shalevi69 commented 7 years ago

something went wrong..

screen shot 2017-07-20 at 13 04 11
jthomas commented 7 years ago

Hmm that's odd, can you try the push command again?

shalevi69 commented 7 years ago
screen shot 2017-07-20 at 13 07 18
knolleary commented 7 years ago

@shalevi69 hi. Why did run cf push without the application name included?

From what I can see, you are running this command in your home directory. That is wrong. Lets take a step back and make sure you've done some of the proper initial steps.

  1. have you cloned this git repository locally? The README doesn't explicitly tell you to, but it does kinda assume you know to do this.

  2. once you have cloned the repository locally, you should be running the cf push phonebot12345 command from the top directory of the repository (the directory that contains the manifest.yml and package.json files etc).

shalevi69 commented 7 years ago

Thank you for your help. So you were right and i didn't cloned the repository locally. so now i have done it. after that i run the command cf push phonebot12345 and the result remain the same.

screen shot 2017-07-23 at 9 44 13
knolleary commented 7 years ago

What directory did you run that command in? Did you run it inside the repository you cloned?

shalevi69 commented 7 years ago

I made mistake while copy the directory. that's the result of the command from the correct directory

screen shot 2017-07-23 at 10 51 51
shalevi69 commented 7 years ago

What did i missed ? ...

knolleary commented 7 years ago

For some reason it has failed to create an instance of the speech_to_text service. I can't immediately see anything wrong with what you've tried to do.

If you look at the bluemix service catalog, do you see the 'Speech To Text' service listed? https://console.bluemix.net/catalog/services/speech-to-text

What type of bluemix account have you got? Have you provided your credit card details yet? It may be you are using a freemium account that doesn't have access to this particular service.

shalevi69 commented 7 years ago

Hey knoleary, thank you for your answer. We have the basic plan in bluemix (not the freemium). And yes we did add the 'Speech To Text' service to the app. Running the app in bluemix resulted in failed due to: `An error occurred performing the operation. Try again later.

Description:The app package is invalid: bits have not been uploaded`

and another problem is after i'm trying to connect the Speech To Text to the app, i'm getting a msg to restage the app, i click ok, and get an "failed" result..

guydoron commented 7 years ago

got the same issue with "speech to text" service could not bind to ...

passionhunt commented 6 years ago

anybody know this error caught while building spring project using maven :

[INFO] Changes detected - recompiling the module! [INFO] Compiling 5 source files to /home/pipeline/55d47591-8fc0-4f1f-a6a1-cb44be7c5998/target/classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.418 s [INFO] Finished at: 2018-08-08T15:10:17+00:00 [INFO] Final Memory: 14M/23M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project restapi: Fatal error compiling: invalid flag: -parameters -> [Help 1] [ERROR]

any idea ?