Skip to content

[Bug] Unable to connect Notion Workspace properly #81

Open

Description

@devanshkansagra

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

Activity

  1. added
    bug
    on Feb 6, 2025
  2. devanshkansagra commented on Feb 6, 2025

    @devanshkansagra
    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?

  3. devanshkansagra commented on Feb 6, 2025

    @devanshkansagra
    Author

    I will research upon this and keep you posted

  4. devanshkansagra commented on Feb 7, 2025

    @devanshkansagra
    Author

    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

  5. devanshkansagra commented on Feb 7, 2025

    @devanshkansagra
    Author

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

  6. devanshkansagra commented on Feb 7, 2025

    @devanshkansagra
    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?

  7. Nabhag8848 commented on Feb 8, 2025

    @Nabhag8848
    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 ?

  8. Nabhag8848 commented on Feb 8, 2025

    @Nabhag8848
    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 ?

  9. devanshkansagra commented on Feb 8, 2025

    @devanshkansagra
    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..

  10. devanshkansagra commented on Feb 8, 2025

    @devanshkansagra
    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

  11. devanshkansagra commented on Feb 8, 2025

    @devanshkansagra
    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

  12. devanshkansagra commented on Feb 9, 2025

    @devanshkansagra
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions