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

Issues while deploying on Slack #15

Open
smishy05 opened this issue Jul 1, 2020 · 1 comment
Open

Issues while deploying on Slack #15

smishy05 opened this issue Jul 1, 2020 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@smishy05
Copy link

smishy05 commented Jul 1, 2020

Hi there,

I am trying to deploy the Bot on Slack Platform. When I am trying to run the bot, I get this error:

Xatkit classpath:
/home/shailesh1998/xatkit/build/examples/WeatherBot/lib/xatkit-rest-runtime-2.0.0-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/examples/community/Twitter/CanYouTweet/lib/xatkit-twitter-runtime-1.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/examples/GitHubBots/GithubBot/lib/xatkit-github-runtime-2.1.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-github-platform/xatkit-github-runtime-3.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-chat-platform/xatkit-chat-runtime-3.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-slack-platform/xatkit-slack-runtime-3.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-log-platform/xatkit-log-runtime-3.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-core-platform/xatkit-core-runtime-3.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-react-platform/xatkit-react-runtime-4.0.1-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-rest-platform/xatkit-rest-runtime-2.0.0-SNAPSHOT.jar
/home/shailesh1998/xatkit/build/bin/xatkit-nodep-jar-with-dependencies.jar
java -Dfile.encoding=UTF-8 -cp '/home/shailesh1998/xatkit/build/examples/WeatherBot/lib/xatkit-rest-runtime-2.0.0-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/examples/community/Twitter/CanYouTweet/lib/xatkit-twitter-runtime-1.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/examples/GitHubBots/GithubBot/lib/xatkit-github-runtime-2.1.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-github-platform/xatkit-github-runtime-3.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-chat-platform/xatkit-chat-runtime-3.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-slack-platform/xatkit-slack-runtime-3.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-log-platform/xatkit-log-runtime-3.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-core-platform/xatkit-core-runtime-3.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-react-platform/xatkit-react-runtime-4.0.1-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/plugins/platforms/xatkit-rest-platform/xatkit-rest-runtime-2.0.0-SNAPSHOT.jar:/home/shailesh1998/xatkit/build/bin/xatkit-nodep-jar-with-dependencies.jar' com.xatkit.Xatkit '../examples/GreetingsBots/GreetingsBot/GreetingsBot.properties'
11:25:23.211 [pool-3-thread-1] INFO   - Starting Xatkit with the configuration file ../examples/GreetingsBots/GreetingsBot/GreetingsBot.properties
11:25:25.092 [pool-3-thread-1] INFO   - Loading Xatkit core libraries
11:25:25.210 [pool-3-thread-1] INFO   - 	CoreLibrary loaded
11:25:25.210 [pool-3-thread-1] INFO   - Loading Xatkit core platforms
11:25:25.559 [pool-3-thread-1] INFO   - 	GithubPlatform loaded
11:25:25.563 [pool-3-thread-1] INFO   - 	ChatPlatform loaded
11:25:25.573 [pool-3-thread-1] INFO   - 	SlackPlatform loaded
11:25:25.575 [pool-3-thread-1] INFO   - 	LogPlatform loaded
11:25:25.578 [pool-3-thread-1] INFO   - 	CorePlatform loaded
11:25:25.583 [pool-3-thread-1] INFO   - 	ReactPlatform loaded
11:25:25.593 [pool-3-thread-1] INFO   - 	RestPlatform loaded
11:25:25.594 [pool-3-thread-1] INFO   - Loading Xatkit custom libraries
11:25:25.601 [pool-3-thread-1] INFO   - 	GreetingsBotLibrary loaded
11:25:25.603 [pool-3-thread-1] INFO   - Loading Xatkit custom platforms
11:25:25.672 [main] WARN  org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory - --- xtext.common.types ---------------------------------------------------
11:25:25.672 [main] WARN  org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory - ASM library is not available. Falling back to java.lang.reflect API.
11:25:25.672 [main] WARN  org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory - Please note that no information about compile time constants is available.
11:25:25.672 [main] WARN  org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory - It's recommended to use org.objectweb.asm 5.0.1 or better (Maven group id: org.ow2.asm).
11:25:25.673 [main] WARN  org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory - --------------------------------------------------------------------------
11:25:26.109 [pool-3-thread-1] INFO   - Starting intent recognition monitoring
11:25:26.318 [pool-3-thread-1] INFO   - Registered REST handler  at URI /analytics/monitoring (method=GET)
11:25:26.318 [pool-3-thread-1] INFO   - Registered REST handler  at URI /analytics/monitoring/session (method=GET)
11:25:26.318 [pool-3-thread-1] INFO   - Registered REST handler  at URI /analytics/monitoring/unmatched (method=GET)
11:25:26.319 [pool-3-thread-1] INFO   - Registered REST handler  at URI /analytics/monitoring/matched (method=GET)
11:25:26.319 [pool-3-thread-1] INFO   - Registered REST handler  at URI /analytics/monitoring/sessions/stats (method=GET)
11:25:26.325 [pool-3-thread-1] INFO   - Starting RegExIntentRecognitionProvider
11:25:26.331 [pool-3-thread-1] INFO   - Loading RuntimePlatform for ChatPlatform
11:25:26.331 [pool-3-thread-1] INFO   - ChatPlatform is abstract, retrieving its binding from the configuration
11:25:26.332 [pool-3-thread-1] INFO   - Loading class com.xatkit.plugins.slack.platform.SlackPlatform
11:25:26.334 [pool-3-thread-1] INFO   - Constructing SlackPlatform with parameters (com.xatkit.core.XatkitCore@4eacb6d1,org.apache.commons.configuration2.PropertiesConfiguration@3ccefe1b)
11:25:28.423 [pool-3-thread-1] INFO   - Starting ChatProvider
11:25:28.424 [pool-3-thread-1] INFO   - Loading class com.xatkit.plugins.slack.platform.io.ChatProvider
11:25:28.427 [pool-3-thread-1] INFO   - Constructing ChatProvider with parameters (*SlackPlatform,org.apache.commons.configuration2.PropertiesConfiguration@3ccefe1b)
11:25:28.991 [pool-3-thread-1] ERROR  - An error occurred when starting the XatkitCore, trying to close started services
11:25:28.992 [pool-3-thread-1] INFO   - Stopping XatkitServer
11:25:28.993 [pool-3-thread-1] WARN   - Cannot stop the XatkitServer, the server is not started
11:25:34.231 [pool-3-thread-1] ERROR  - Cannot start Xatkit, see the attached exception
com.xatkit.core.XatkitException: java.lang.reflect.InvocationTargetException
	at com.xatkit.util.Loader.construct(Loader.java:203) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.util.Loader.construct(Loader.java:166) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.util.Loader.constructRuntimeEventProvider(Loader.java:276) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.core.platform.RuntimePlatform.startEventProvider(RuntimePlatform.java:174) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.core.XatkitCore.startEventProviders(XatkitCore.java:281) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.core.XatkitCore.loadExecutionModel(XatkitCore.java:234) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.core.XatkitCore.<init>(XatkitCore.java:175) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	at com.xatkit.Xatkit.main(Xatkit.java:93) ~[xatkit-nodep-jar-with-dependencies.jar:?]
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_252]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_252]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_252]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_252]
	at com.xatkit.util.Loader.construct(Loader.java:197) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	... 7 more
Caused by: java.lang.IllegalStateException: Failed to the RTM endpoint URL (error: not_allowed_token_type)
	at com.github.seratch.jslack.Slack.rtmConnect(Slack.java:125) ~[xatkit-twitter-runtime-1.0.1-SNAPSHOT.jar:?]
	at com.github.seratch.jslack.Slack.rtmConnect(Slack.java:100) ~[xatkit-twitter-runtime-1.0.1-SNAPSHOT.jar:?]
	at com.github.seratch.jslack.Slack.rtm(Slack.java:91) ~[xatkit-twitter-runtime-1.0.1-SNAPSHOT.jar:?]
	at com.xatkit.plugins.slack.platform.io.SlackIntentProvider.notifyNewInstallation(SlackIntentProvider.java:137) ~[xatkit-slack-runtime-3.0.1-SNAPSHOT.jar:?]
	at java.util.HashMap.forEach(HashMap.java:1289) ~[?:1.8.0_252]
	at com.xatkit.plugins.slack.platform.io.SlackIntentProvider.<init>(SlackIntentProvider.java:120) ~[xatkit-slack-runtime-3.0.1-SNAPSHOT.jar:?]
	at com.xatkit.plugins.slack.platform.io.ChatProvider.<init>(ChatProvider.java:26) ~[xatkit-slack-runtime-3.0.1-SNAPSHOT.jar:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_252]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_252]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_252]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_252]
	at com.xatkit.util.Loader.construct(Loader.java:197) ~[xatkit-nodep-jar-with-dependencies.jar:?]
	... 7 more

I can see a Caused by: java.lang.IllegalStateException: Failed to the RTM endpoint URL (error: not_allowed_token_type). What does that mean and how do I solve this? Please kindly help.

Thanks in advance!

@gdaniel
Copy link
Member

gdaniel commented Jul 3, 2020

Hi,

I think your issue is related to the new Slack app permissions, especially granular scopes that are not working fine with Xatkit.
For the moment the quick fix I can suggest is to create a classic Slack App (using this link, at the very bottom of the page there is a "Create a classic Slack App" button). The Oauth token you'll get should work fine.

@gdaniel gdaniel transferred this issue from xatkit-bot-platform/xatkit Jul 3, 2020
@gdaniel gdaniel self-assigned this Jul 3, 2020
@gdaniel gdaniel added bug Something isn't working documentation Improvements or additions to documentation labels Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants