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

SDK (0.2.9-2) reactToMessages break in RocketChat 3.8.0 #122

Open
felipetomm opened this issue Nov 18, 2020 · 32 comments
Open

SDK (0.2.9-2) reactToMessages break in RocketChat 3.8.0 #122

felipetomm opened this issue Nov 18, 2020 · 32 comments

Comments

@felipetomm
Copy link

SDK Version: 0.2.9-2

As related in RocketChat repo, that issues 19566, 19567 and 19433, the last stable version of RocketChat (3.8.0), has break the SDK.
Two points are related above. Firstly, the message param of reactToMessages has changed from Object to Array. This cause an exception:
image
And, the second point is the message of undefined value in room. This point has logged in the first line of this print ^.

A propose resolution:
For first point, add this line in driver.js (line 351):

message = Array.isArray(message) ? message[0] : message;

Like this, at line 358:
image

For second point, add an new access to args.
image

felipetomm pushed a commit to felipetomm/Rocket.Chat.js.SDK that referenced this issue Nov 18, 2020
@mose
Copy link

mose commented Nov 25, 2020

Tested it and it works great. Are you going to make it a PR?

@felipetomm
Copy link
Author

@mose , i can make.
But, i think that repo are "non official" discontinued. Because of this, i need urgently apply that fix in a fork of SDK and publish them to npm.

@ataraxus
Copy link

So, rocket.chat doesnt revert their breaking change? and everybody has to somehow patch their infrastructure?

@felipetomm
Copy link
Author

@ataraxus , our RC has updated from 3.8.0 to 3.8.1 and the problem persist.

@mose
Copy link

mose commented Nov 28, 2020

@felipetomm : Make the PR, we can nag @timkinnane and @Sing-Li on bbot channel on rocket.chat rocketchat and even discuss about the future of this repo.

@benwick
Copy link

benwick commented Jan 9, 2021

So, the SKD is practically dead with new versions of Rocket.Chat server? :(

@suranc
Copy link

suranc commented Jan 15, 2021

I submitted #127 which resolves this issue. It contains @benwick's fix, a fix to reactToMessages as well as a build of the new version.

@benwick
Copy link

benwick commented Jan 28, 2021

@suranc Nice. But it seems that nobody cares for the SDK or our bots for automation... 😢

@ataraxus
Copy link

yes this is quite a bummer, breaking a lot of users software and now workable way out ...

@suranc
Copy link

suranc commented Jan 28, 2021

Yeah seems like the contributions are getting ignored @benwick. Hopefully we can get something merged, but it feels like there's enough users to justify a fork if this repo itself is truly dead.

@timkinnane
Copy link
Contributor

Hello - I'm the original creator of the SDK. Unfortunately not here to offer a solution, but to encourage the idea of a community fork. AFAIK the Rocket.Chat team's objectives for the SDK are more around livechat agent support than custom bots, so it's hard to get or coordinate support - which is partly the reason I stopped working on it (two years ago).

If you have a resolution for the issue and are interested in maintaining this and engaging with the RC bot community, I think a community fork would be awesome and allow it to continue as a pure utility for RC-bot integration.

@benwick
Copy link

benwick commented Jan 28, 2021

Then they should close this project... But it is still here and officially documented. The most important issue now is a working npm package for integration. Is a community fork helping with this?

@timkinnane
Copy link
Contributor

A lot of the documentation is open source. It's there because it was contributed by the community. The core team don't have the resources to maintain or respond to every contribution or join every conversation and in my experience they'll avoid getting involved if it's not related to features in their next release.

I'm not making a judgement on that, but trying to give some context so people here don't wait around and expect a resolution that might not ever happen. If someone can fork and publish a new package to npm, that would be great. If you don't have that capacity but you have commercial interest in it being done, I'd suggest posting a bounty or offering commission to open source devs on the Rocket.Chat forum.

@suranc
Copy link

suranc commented Jan 29, 2021

I'd be willing to add people as collaborators to my fork at https://github.com/suranc/Rocket.Chat.js.SDK, or create a new GitHub organization for the purpose even. In the meantime I can work on getting a build of my fix published to npm since it seems not having that is pretty universally the biggest blocker for people.

Does that sound good to everyone? If so and you want to be a collaborator, let me know.

@benwick
Copy link

benwick commented Jan 29, 2021

I think a working npm package is the most important important issue right now.

@ataraxus
Copy link

@suranc count me in, i'll try to support you guys.
Either we get this fixed or we need to switch to mattermost.... always sad to see projects to abandon community which helped for free

@Sing-Li
Copy link
Member

Sing-Li commented Jan 30, 2021

The core team don't have the resources to maintain or respond to every contribution or join every conversation and in my experience they'll avoid getting involved if it's not related to features in their next release.

@timkinnane Great to see you in action again! Welcome back 👋 Rocket.Chat has grown and changed a lot since we last met and worked together. And while what you described might have been the case for the past number of years, it is about to change completely.

@suranc @benwick and @ataraxus there is no need to incur the extra overhead of a remote fork which will have to be kept synchronized with core anyways. Please rest assured that there has never been an intention to abandon this very important project.

Let me introduce you to @tiagopaixao - he has joined us in IT governance, and will have direct influence over project governance / management, core team resource allocation, and our ongoing collaboration with community right here. Please work with Tiago to make the JS SDK project work for you.

Thanks again for all your support.

@benwick
Copy link

benwick commented Jan 30, 2021

Well @tiagopaixao, somebody needs to merge #127 and release a new version and npm package - to get all our precious bots working again.

@tiagopaixao
Copy link

Hi @benwick! I'll put this in my next meeting agenda! Just after that, I'll make you know. Tks for your contribution.

@suranc
Copy link

suranc commented Feb 1, 2021

@Sing-Li glad to hear that maintenance will resume on this SDK project! I would definitely prefer to not have to maintain a fork, and it's better for the code to exist close to the project and in the same GitHub organization.

@tiagopaixao nice to meet you! Looking forward to hear the outcomes of your meeting, but especially looking forward to getting a working fix (PR #127 or equivalent) merged and new npm package deployed. I know personally, for our use case this also breaks the 2.0.0 version of the hubot-rocketchat connector, and I will be anticipating/contributing a fix there as well once a fixed npm package of the SDK is deployed to npm.

@ggazzo
Copy link
Member

ggazzo commented Feb 1, 2021

hi guys, there is no good explanation for this kind of problem, sorry, the truth is that we started a development in another branch, and we deal with it as an experimental, but we are using it has been a few years (but we never merged to master to not disturb you). We have plans to combine everything we have learned and finally release an official version 1.0. We would love to use the sdk together with the web client, so in fact we would guarantee a continued support, for the time being we still have some priority issues.

it hurts me to believe that it would be better to maintain a side project than an official one, maybe we had our disagreements along the way, i would prefer to resume alignment and have more healthy libraries (we started doing this in the fuselage package)

I promise i will review and merger the PRS that guarantee compatibility with the latest versions. But I'll tell you in advance: some things were deprecated/disabled (we didn't inform the bots anymore for channels don't belong and few more other details ... I know this is not ideal, but it brought us a more performance)...

the new SDK aims (at least until now) to give greater support to chat clients (like web/mobile/livechat), for bots we strongly suggest to use apps ecosystem.

@ataraxus
Copy link

ataraxus commented Feb 1, 2021

I dont get what you are trying to say? What I am understanding that there will be no fix for this issue?

@benwick
Copy link

benwick commented Feb 1, 2021

Same here. Is it discouraged to implement a chat bot with this SDK? Is it possible to implement a chat bot with the app API? I think there should be some clear answers.

@ggazzo
Copy link
Member

ggazzo commented Feb 1, 2021

sorry, trying to be more direct: we will accept and launch the proper fix for this problem and for other things related to bugs (BUT this does not mean that this behavior will be valid for all occasions) we have no plans for a development focused on bots ( not so far).

Today the most robust and encouraged way is via apps.

@ggazzo
Copy link
Member

ggazzo commented Feb 1, 2021

ps: everything I have written so far is the current state, but there is nothing written in stone, we will raise and discuss the current situation, and try to promote a better outcome.

@ggazzo
Copy link
Member

ggazzo commented Feb 1, 2021

@benwick me as a developer (not as a rocket.chat developer) knowing platform limitations and possibilities/resources, I would suggest you to use the app platform.

Is it discouraged to implement a chat bot with this SDK?

@benwick
Copy link

benwick commented Feb 1, 2021

@ggazzo as a developer, I try to automate many things. To have the bot code and the server for various automation requests in the same place and repo makes my live easy. With an app most of these things wouldn't work out.

@suranc
Copy link

suranc commented Feb 12, 2021

@tiagopaixao do you have any update and timeframe around this? This is still blocking a very large amount of people.

@tiagopaixao
Copy link

Hi! @ggazzo can you help us?

@benwick
Copy link

benwick commented Feb 13, 2021

I thought the critical and breaking character of this bug was clear enough. I think, a temporary and working npm module should be on the table again, if the rocket.chat devs are not able or willing to release a fix...

@benwick
Copy link

benwick commented Feb 13, 2021

On a broader note: to deploy your bot with a Rocket.Chat app is a very limited experience. You even can't use npm packages... See this issue. As long as this limitation persists I don't see the app engine as a real alternative to the SDK. Please consider this when planning the future of this repo...

@suranc
Copy link

suranc commented Feb 15, 2021

@benwick I agree, going down the community fork road is looking like the most viable again. I realize that @Sing-Li promises greater support around this, and a community fork is not ideal, but nothing seems to have changed. Thankfully we can simply hold back on updating Rocket.Chat as we're not already on the breaking version, but if we're compelled to update Rocket.Chat before this is fixed it would completely break all of our ChatOps. The app platform is not robust enough for our us as an alternative either.

Before we go down that road, is there really no timeline around getting this fix (PR #127) merged and a new module published to npm @tiagopaixao and @ggazzo ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants