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

Error Message from repository.getComponentInfo logged with [Object object] #789

Closed
bassettsj opened this issue Dec 15, 2017 · 6 comments
Closed

Comments

@bassettsj
Copy link

Who is the bug affecting?

Registry maintainers

What is affected by this bug?

The error message is not very helpful.

When does this occur?

  1. when repository.geComponentInfo's callback is called with a non error object from a storage error it does not give a helpful message
  2. observed in the preview window:
    "component not available: [object Object]"

Where on the platform does it happen?

api

How do we replicate the issue?

https://demo-oc-registry.herokuapp.com/tommys-component/1.0.1/~preview

Expected behavior (i.e. solution)

Expected to give the actual error message which is:

{ code: 'file_not_valid', msg: 'File "components/tommys-component/1.0.0/package.json" not valid' }

What version of OC, Node.js and OS are you using?

{ http_parser: '2.7.0',
  node: '9.3.0',
  v8: '6.2.414.46-node.15',
  uv: '1.18.0',
  zlib: '1.2.11',
  ares: '1.13.0',
  modules: '59',
  nghttp2: '1.25.0',
  openssl: '1.0.2n',
  icu: '60.1',
  unicode: '10.0',
  cldr: '32.0',
  tz: '2017c' }

[email protected]

OSX 10.13.1
arch: 'x64',
platform: 'darwin',

Other Comments

@matteofigus
Copy link
Member

Thanks for the issue @bassettsj - I am investigating.

@bassettsj
Copy link
Author

@matteofigus I added a failing unit test showing the error. I will open the PR, sorry if this duplicating work.

bassettsj pushed a commit to bassettsj/oc that referenced this issue Dec 15, 2017
…bject]

- add new test case reproducing the error
@matteofigus
Copy link
Member

No problem at all @bassettsj I was looking at the code but didn't write any code yet. If you would want to attempt a PR for the tests and a fix, that would super fantastic, want to give it a go?

bassettsj pushed a commit to bassettsj/oc that referenced this issue Dec 15, 2017
…bject]

- add new test case reproducing the error
bassettsj pushed a commit to bassettsj/oc that referenced this issue Jan 2, 2018
matteofigus added a commit that referenced this issue Jan 4, 2018
Add test for issue #789 showing error message [Object object]
@catt231
Copy link
Member

catt231 commented Jan 22, 2018

Hi I've been trying to use the starter kit to create my first registry but I'm only seeing the JSON not valid error above - could you point me in any direction of what's going wrong?

See example oc-client error which occurs on standard example of starter kit deployment

https://starter-kit-itrqyqhfdt.now.sh/oc-client/0.42.16/~info

@matteofigus
Copy link
Member

@catt231 we managed to reproduce and now it should be fixed by #811 and available on the latest version (0.42.18) - can you try to upgrade OC and retry?

@catt231
Copy link
Member

catt231 commented Jan 29, 2018

fixed thanks!

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

3 participants