Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whisks.v2.1.0/packages-public view function logs 'new TypeError("doc.binding is not an object", "undefined", 3)' #5507

Open
dorbae opened this issue Sep 7, 2024 · 0 comments

Comments

@dorbae
Copy link

dorbae commented Sep 7, 2024

Environment details:

  • local deployment / ubuntu
  • couchdb 2.3.1 and 3.3.3

Steps to reproduce the issue:

You can find this log when whisk.v2.1.0/packages-public view re-build index. In my case, I reproduce it on Web Console followed by below steps.

  1. Upsert entity docs(action or trigger) on whisk entity db.

  2. Click 'Save Document and then Build Index' button.

  1. Check CouchDB container logs
docker logs -f <YOUR_CONTAINER_NAME> 2>&1 | grep -i "os process"

Provide the expected results and outputs:

There is no exception log.

Provide the actual results and outputs:

dorbae@dorbae-ubuntu:~$ docker logs -f whisk-couch 2>&1 | grep -i "os process"

[info] 2024-09-07T02:25:38.312234Z nonode@nohost <0.1292.0> -------- OS Process #Port<0.8249> Log :: function raised exception (new TypeError("doc.binding is not an object", "undefined", 3)) with doc._id whisk.system/user25868/TEST
[info] 2024-09-07T02:25:38.321479Z nonode@nohost <0.11150.0> -------- OS Process #Port<0.8738> Log :: function raised exception (new TypeError("doc.binding is not an object", "undefined", 3)) with doc._id whisk.system/playground-userpackage
[info] 2024-09-07T02:25:38.321606Z nonode@nohost <0.11148.0> -------- OS Process #Port<0.8737> Log :: function raised exception (new TypeError("doc.binding is not an object", "undefined", 3)) with doc._id whisk.system/playground-run
[info] 2024-09-07T02:25:38.321991Z nonode@nohost <0.11150.0> -------- OS Process #Port<0.8738> Log :: function raised exception (new TypeError("doc.binding is not an object", "undefined", 3)) with doc._id whisk.system/playground-fetch
[info] 2024-09-07T02:25:38.322312Z nonode@nohost <0.11150.0> -------- OS Process #Port<0.8738> Log :: function raised exception (new TypeError("doc.binding is not an object", "undefined", 3)) with doc._id whisk.system/playground-delete

Additional information you deem important:

I reproduced the error on standalone environment and local machine and the version of CouchDB was 2.3.1. And also, I found it on my product environment with 3.3.3 version.

This issue occurs when execute view function since action and trigger entities have no 'binding' field on their doc. It doesn't affect the creation of the index.

Nevertheless, I think it's better to fix this function. This is because CouchDB makes unnecessary logs whenever entities are updated.

It can be fixed by modifying isPublicPackackage function and I already tested it. I would like to contribute if I have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant