Prisma-client-js: Photon Zeebe bug (prototype pollution?)

Created on 17 Nov 2019  路  10Comments  路  Source: prisma/prisma-client-js

Hi. I am using Zeebe (https://zeebe.io/) along with Photon and I am facing an issue when running them together (I guess Photon is polluting the prototype as per the discussion I had with Zeebe community). Zeebe works well without Photon but when the @generated files from Photon are imported, Zeebe fails with an error.

To demonstrate this issue, I have created a minimal repo where you can see this: https://github.com/tvvignesh/prisma-zeebe-bug

bu2-confirmed kinbug

Most helpful comment

Thanks a lot for reporting 馃檹
This issue is fixed in the latest alpha version of prisma2.
You can try it out with npm i -g prisma2@alpha.

In case it鈥檚 not fixed for you - please let us know and we鈥檒l reopen this issue!

All 10 comments

I can confirm this bug.

@tvvignesh Do you have a link to your discussion with the zeebe community?

@divyenduz Sure. Though I am not sure how relevant that would be.

Link to slack thread: https://zeebe-io.slack.com/archives/C6WGNHV2A/p1573742151247900

In case you don't want to join their slack channel, I have put the same in a gist here: https://gist.github.com/tvvignesh/0e095d0005b17faa3e8c2b3442d9fb24

Related issue: creditsenseau/zeebe-client-node-js#106

The commit made saying the issue was fixed was for something different though. This issue still exists even after the commit.

static async scanBpmnObjectForTasks(bpmnObject) {

Printed the object passing into the function that is failing, with and without Photon, looks like Photon is removing empty strings from any object once imported (or something), investigating further.

https://www.diffchecker.com/FgTyC3bl (left is with Photon)

I found (sub part) the part of Photon that is causing this, it is most likely the residue from some dependency. I will leave this for @timsuchanek to comment on as he has more context of all the dependencies:

https://divyendu.s3-eu-west-1.amazonaws.com/photonjs-296.mp4

P.S. I could confirm this with the latest version of Photon

divyendusingh [introspection-engine-output]$ prisma2 --version
[email protected], binary version: e7579bd35e0938dbf773f1706c098a0d14a5a038

You could compare the package.json with Photon installed and not. We found another issue where installing kafka-node alongside zeebe-node pulls in an older version of long that breaks gRPC functionality.

Thanks a lot for reporting 馃檹
This issue is fixed in the latest alpha version of prisma2.
You can try it out with npm i -g prisma2@alpha.

In case it鈥檚 not fixed for you - please let us know and we鈥檒l reopen this issue!

@timsuchanek Great! Will check and get back to you if there are issues!

Was this page helpful?
0 / 5 - 0 ratings