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

[Bug] Unable to connect Notion Workspace properly #81

Open
devanshkansagra opened this issue Feb 6, 2025 · 11 comments
Open

[Bug] Unable to connect Notion Workspace properly #81

devanshkansagra opened this issue Feb 6, 2025 · 11 comments
Labels
bug Something isn't working

Comments

@devanshkansagra
Copy link

What happened?

As a Apps.Notion developer
I found that after adding the client ID and secret in the app settings, executing the /notion connect command, and clicking on Connect to Workspace the page shows Workspace Connected Successfully. However, on the Rocket.Chat side, it displays the error Something went wrong.

Steps to reproduce

  1. Go to your rocketchat instance after inserting client id and secret key
  2. Execute /notion connect command, a button Connect to Workspace will show up, click on that
  3. You will get redirected for authenticating RocketChat with Notion and you will see Connected to notion workspace page
  4. Go to your rocketchat instance you will see the error of something went wrong

Relevant ScreenShots

Screencast.from.06-02-25.03.37.04.PM.IST.webm

Version

v7+ (I am currently on v7.3.0)

What browsers are you seeing the problem on?

Chrome

@devanshkansagra devanshkansagra added the bug Something isn't working label Feb 6, 2025
@devanshkansagra
Copy link
Author

devanshkansagra commented Feb 6, 2025

Hey @Nabhag8848, I have recently raised a pr in Apps.Github22 repo regarding updating the methods which were deprecated and due to the deprecated methods some elements like modals were not functioning properly. I observed that due to older apps engine version and newer version of rocketchat was causing this. So in this case also might be some deprecated methods are causing this issue.

the pr was #150

So..What are your thoughts on this?

@devanshkansagra
Copy link
Author

I will research upon this and keep you posted

@devanshkansagra
Copy link
Author

devanshkansagra commented Feb 7, 2025

Hey @Nabhag8848, I came to know from where this bug came. It came from

Image

this connectPreview code 👆 also I found one thing by logging that code, see this

Image

in this log blockId and thumb are undefined and when I modified to add a simple notification like connect to notion workspace instead of connect preview, the Something went wrong, contact to your administrator error which I mentioned in this issue description was gone

@devanshkansagra
Copy link
Author

@Spiral-Memory, what are your thoughts on this?

@devanshkansagra
Copy link
Author

Also I have added a simple notification when RocketChat gets connected to Notion it was resolved for temporary purposes, idk why due to a preview it was getting failed might be it was deprecated method. But some more bad news have arrived see this

Screencast.from.07-02-25.10.11.42.PM.IST.webm

executing other commands were failing and also when executing /notion workspace the GUI got crashed 😢 this is also occured on the main branch? I mean on apps-engine v1.39.1

so Do I raise another issue for this or append that?

Also I have added a simple notification when RocketChat gets connected to Notion it was resolved for temporary purposes

Also what are your points in this too?

@Nabhag8848
Copy link
Collaborator

Hey Devansh! Thanks for taking up! Can you ask community / apps engine channel

  1. what were the updates on newest apps engine?

  2. why it crashes when we have blockUI but works in simple message send ?

@Nabhag8848
Copy link
Collaborator

Hey @Nabhag8848, I have recently raised a pr in Apps.Github22 repo regarding updating the methods which were deprecated and due to the deprecated methods some elements like modals were not functioning properly. I observed that due to older apps engine version and newer version of rocketchat was causing this. So in this case also might be some deprecated methods are causing this issue.

the pr was #150

So..What are your thoughts on this?

that could be the reason can you try running on older versions and see it this works completely ?

@devanshkansagra
Copy link
Author

Hey Devansh! Thanks for taking up! Can you ask community / apps engine channel

  1. what were the updates on newest apps engine?
  2. why it crashes when we have blockUI but works in simple message send ?

Okay sure I will ask in the community..

@devanshkansagra
Copy link
Author

Hey @Nabhag8848, I have recently raised a pr in Apps.Github22 repo regarding updating the methods which were deprecated and due to the deprecated methods some elements like modals were not functioning properly. I observed that due to older apps engine version and newer version of rocketchat was causing this. So in this case also might be some deprecated methods are causing this issue.
the pr was #150
So..What are your thoughts on this?

that could be the reason can you try running on older versions and see it this works completely ?

Earlier I have tried when we first discussed about this, I have tried on the exact apps engine version mention in the latest commit of this repo and also I have found out that rocketchat server version which was released at that time ig it was 6.13 or 6.10 maybe but on those versions of rocketchat server also it was crashing.

No worries I will go through even older versions and try them

@devanshkansagra
Copy link
Author

Hey Nabhag! check this,

Image

Docs: https://developer.rocket.chat/docs/building-blocks

I found that we are currently using these types PreviewBlockBase | PreviewBlockWithThumb and in this documentation, it is not mentioned regarding to add a thumbnail. I am not sure but might be this is causing issue. And when I removed the thumb and footer from the part where we are creating a preview, the empty preview was shown up

@devanshkansagra
Copy link
Author

devanshkansagra commented Feb 9, 2025

Hey @Nabhag8848, after lots of debugging I finally came to know exactly why this was getting crashed. The reason for getting crashed is I haven't set my notion workspace icon and due to that the workspace icon was not getting passed in the PreviewBlock as thumbnail and due to that only it was getting crashed

I have tested again by adding and removing my workspace icon and everytime I was getting the expected result like it was not getting crashed if notion workspace icon exists and was getting crashed if notion workspace icon does not exists

Ig we would have to handle this accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants