# Fatal error: Protocol error (Runtime.callFunctionOn): Object reference chain is too long

**URL:** https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591
**Category:** p5.js
**Created:** [November 21, 2020, 2:28pm UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591 "2020-11-21T14:28:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ankit1029](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@ankit1029](https://discourse.processing.org/u/ankit1029)
#### Post date: [November 21, 2020, 2:28pm UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591/1 "2020-11-21T14:28:02Z")

</div>

i was trying to set up the dev environement for p5.js  
i followed the instructions on this site [https://p5js.org/contributor-docs/#/](https://p5js.org/contributor-docs/#/)

after navigating into the p5.js folder ,npm ci worked fine

but when i tried to run the command  
npm run grunt  
i get this error message

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/903db38f121480acae56432c19283542a8227cd1.png)  
kindly help me in sorting this issue tried redoing it a bunch of times to no avail

[i’m running it on pop-os (linux) node v15.2.0 npm v7.0.8]

---

<div class="post-metadata">

### Author: ![Pr0tonX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pr0tonx/32/2590_2.png) [@Pr0tonX](https://discourse.processing.org/u/Pr0tonX)
#### Post date: [November 22, 2020, 10:39am UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591/2 "2020-11-22T10:39:20Z")

</div>

Hi @ankit1029,  
I followed the instructions you mentionned and faced the same issue as you.  
It seems to be an issue from a package of `puppeeter` as mentionned in the thread here : [https://github.com/puppeteer/puppeteer/issues/2746](https://github.com/puppeteer/puppeteer/issues/2746).

But as far as I know this kind of issues (caused generally because a `catch()` is missing in a promise chain, it isn’t a blocking error. On my side, it could pursue the script until the end actually.  
But I remember that nodejs has been notifying for awhile that an unhandled rejection may become abort the script in the future, it is maybe true today.

Which npm version do you have ?

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 22, 2020, 11:55am UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591/3 "2020-11-22T11:55:42Z")

</div>

> <https://github.com/processing/p5.js/issues/4913>
>
> Most appropriate sub-area of p5.js?
> Accessibility (Web Accessibility)
> Build tools and processes
> Color
> Core/Environment/Rendering
> Data
> DOM
> Events
> Friendly error system
> Image
> ...

---

<div class="post-metadata">

### Author: ![ankit1029](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@ankit1029](https://discourse.processing.org/u/ankit1029)
#### Post date: [November 22, 2020, 7:11pm UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591/4 "2020-11-22T19:11:02Z")

</div>

@Pr0tonX i see i’m using npm v7.0.8 , is there some particular npm or node version for which this works properly? since in the p5js webeditor project they mentioned a node version but no such info was mentioned for p5.js

---

<div class="post-metadata">

### Author: ![Pr0tonX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pr0tonx/32/2590_2.png) [@Pr0tonX](https://discourse.processing.org/u/Pr0tonX)
#### Post date: [November 30, 2020, 3:23am UTC](https://discourse.processing.org/t/fatal-error-protocol-error-runtime-callfunctionon-object-reference-chain-is-too-long/25591/5 "2020-11-30T03:23:34Z")

</div>

Sorry for the delay.

Actually you use a really old one ! They are currently up to the 14 or 15 ; you should update your package manager !  
I am currently working with the 13 and it isn’t a blocking issue, so I don’t since which version it is, but in any case, you shouldn’t keep an so old version at least for security reasons, and you might have some troubles with other packages than p5

I could at least confirm that there is no issue since the 11, because I never see this error when I used p5 with this version

@GoToLoop you found the ticket I opened to notice it to the mainteners 🙂
