extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[HubSpot] "Something went wrong" for all commands except "List communications"

Open scoop opened this issue 3 years ago • 8 comments

Extension

https://www.raycast.com/harisvsulaiman/hubspot

Description

Error:

TypeError: Cannot read properties of null (reading 'value')

lk:index.js:6:32649


index.js:6:32496
    at Array.map (<anonymous>)
pi:index.js:6:32489

Full back trace was too long. Gist here: https://gist.githubusercontent.com/scoop/2847b096d01f59aab66e8fd25c2cd238/raw/32f397322f135a2d00b54f4a14907211653bfee5/gistfile1.txt

Steps To Reproduce

  1. Created Private App
  2. Configured Access Token in Extension
  3. Ran any command (I don't even get to specify a search string for "Search contacts" for example)
  4. The only command that works and lists content is the "List communications" command. CleanShot Arc Private Apps  HubSpot 2023-01-26 Hq1AGywz

We're on a CRM Hub Professional plan, the instance is set to German in case that changes anything. I have not seen any change in API behavior with our other integrations though.

Current Behaviour

HubSpot results are shown

Expected Behaviour

An error message is shown. Happy to help troubleshoot this with dev builds etc.

scoop avatar Jan 26 '23 08:01 scoop

Thank you for opening this issue!

🔔 @harisvsulaiman @pernielsentikaer you might want to have a look.

PS: You can close this issue once resolved by posting @raycastbot close this issue.

raycastbot avatar Jan 26 '23 08:01 raycastbot

@harisvsulaiman do you have a clue here?

pernielsentikaer avatar Jan 31 '23 08:01 pernielsentikaer

@pernielsentikaer I'm a bit busy right now. I'll take a look at it soon

harisvsulaiman avatar Jan 31 '23 10:01 harisvsulaiman

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊

raycastbot avatar Mar 22 '23 10:03 raycastbot

This issue has been automatically closed due to inactivity.

Feel free to comment in the thread when you're ready to continue working on it 🙂

You can also catch us in Slack if you want to discuss this.

raycastbot avatar Apr 06 '23 00:04 raycastbot

I found the root cause. I had a call in my HubSpot instance originating from a Zoom meeting. This particular call didn't have a number associated with it. To safeguard against this situation you can use the following patch in your extension:

commit 703225a39c9d11e6d1979dc9b2b2de436fdcbf43
Author: Patrick Lenz <[email protected]>
Date:   Wed Sep 27 14:14:04 2023 +0200

    Safeguard calls without a phone number

diff --git a/src/calls.tsx b/src/calls.tsx
index 5934da7..506927e 100644
--- a/src/calls.tsx
+++ b/src/calls.tsx
@@ -29,7 +29,7 @@ export default function Command() {
                       <List.Item.Detail.Metadata.Label title="Title" text={hs_call_title} />
                       <List.Item.Detail.Metadata.Label title="Status" text={hs_call_status} />
                       <List.Item.Detail.Metadata.Label title="Created" text={new Date(createdate).toLocaleString()} />
-                      <List.Item.Detail.Metadata.Label title="To Number" text={hs_call_to_number} />
+                      <List.Item.Detail.Metadata.Label title="To Number" text={hs_call_to_number || ''} />
                     </List.Item.Detail.Metadata>
                   }
                 />

scoop avatar Sep 27 '23 12:09 scoop

@scoop Can you submit a pr?

harisvsulaiman avatar Sep 27 '23 14:09 harisvsulaiman

@scoop Can you submit a pr?

Done. https://github.com/raycast/extensions/pull/8594

scoop avatar Sep 27 '23 14:09 scoop