Help

Invalid Hook Call error in scripting extension

Topic Labels: Extensions
Solved
Jump to Solution
1538 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Naca_Hitchman
5 - Automation Enthusiast
5 - Automation Enthusiast

I’m getting an invalid hook call error, but I’m unsure as to why. My extension is intending to list all the values in a specific field in a dropdown to then select one to filter buy

image
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (https://localhost:9000/__runFrame/bundle.js:79388:13)
    at Object.useContext (https://localhost:9000/__runFrame/bundle.js:79396:20)
    at useSdk (https://localhost:9000/__runFrame/bundle.js:25061:19)
    at useBase (https://localhost:9000/__runFrame/bundle.js:32768:41)
    at ./frontend/filter.tsx (https://localhost:9000/__runFrame/bundle.js:34:74)
    at webpack_require (https://localhost:9000/__runFrame/bundle.js:82174:41)
    at ./frontend/index.tsx (https://localhost:9000/__runFrame/bundle.js:130:65)
    at webpack_require (https://localhost:9000/__runFrame/bundle.js:82174:41)
    at runBlock (https://localhost:9000/__runFrame/bundle.js:82265:3)
    at https://static.airtable.com/js/by_sha/b9c14bce/block_frame-br.js:1:2313261
    at r (https://static.airtable.com/js/lib/regenerator-runtime.min.js:1:160)
    at Generator._invoke (https://static.airtable.com/js/lib/regenerator-runtime.min.js:4:58)
    at a. [as next] (https://static.airtable.com/js/lib/regenerator-runtime.min.js:1:339)
    at ie (https://static.airtable.com/js/by_sha/b9c14bce/block_frame-br.js:1:2307862)
    at i (https://static.airtable.com/js/by_sha/b9c14bce/block_frame-br.js:1:2308066)
1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

I appreciate your desire to solve this, but starting a new thread when you’ve already reported the issue in another thread just creates more confusion. I suggest deleting this thread (if you can) and focusing the conversation in the other one, which I’ll try to get back to as soon as I have the time to do so.

See Solution in Thread

2 Replies 2
Justin_Barrett
18 - Pluto
18 - Pluto

I appreciate your desire to solve this, but starting a new thread when you’ve already reported the issue in another thread just creates more confusion. I suggest deleting this thread (if you can) and focusing the conversation in the other one, which I’ll try to get back to as soon as I have the time to do so.

I was able to solve the issue thankfully, but I am running into another issue which I will detail in the original thread