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

TypeError: message.id is not a function #438

Closed
muenchhausen opened this issue Aug 31, 2023 · 4 comments · Fixed by #439
Closed

TypeError: message.id is not a function #438

muenchhausen opened this issue Aug 31, 2023 · 4 comments · Fixed by #439
Labels
bug Something isn't working released

Comments

@muenchhausen
Copy link

muenchhausen commented Aug 31, 2023

Describe the bug

TypeError: message.id is not a function

How to Reproduce

Use asyncapi.yml with the following content

asyncapi: '2.6.0'
info:
  title: Account Service
  version: 1.0.0
  description: This service is in charge of processing user signups
channels:
  user/signedup:
    subscribe:
      message:
        $ref: '#/components/messages/UserSignedUp'
components:
  messages:
    UserSignedUp:
      payload:
        type: object
        properties:
          displayName:
            type: string
            description: Name of the user
          email:
            type: string
            format: email
            description: Email of the user

run

npm install  @asyncapi/generator
ag asyncapi.yml @asyncapi/html-template -o out

Something went wrong:
TypeError: message.id is not a function
    at /Users/derk/node_modules/@asyncapi/generator/node_modules/@asyncapi/react-component/src/containers/Sidebar/Sidebar.tsx:51:64
    at Array.map (<anonymous>)
    at Sidebar (/Users/derk/node_modules/@asyncapi/generator/node_modules/@asyncapi/react-component/src/containers/Sidebar/Sidebar.tsx:44:35)
    at processChild (/Users/derk/node_modules/@asyncapi/generator/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
    at resolve (/Users/derk/node_modules/@asyncapi/generator/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/Users/derk/node_modules/@asyncapi/generator/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/Users/derk/node_modules/@asyncapi/generator/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
    at Object.renderToString (/Users/derk/node_modules/@asyncapi/generator/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at Context.renderSpec (/Users/derk/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template/filters/all.js:165:25)
    at eval (eval at _compile (/Users/derk/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:527:18), <anonymous>:38:97)
    at Context.generateBase64Favicon (/Users/derk/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template/filters/all.js:105:12)
    at Template.root [as rootRenderFunc] (eval at _compile (/Users/derk/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:527:18), <anonymous>:21:40)
    at Template.render (/Users/derk/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:454:10)
    at Environment.renderString (/Users/derk/node_modules/@asyncapi/generator/node_modules/nunjucks/src/environment.js:313:17)
    at /Users/derk/node_modules/@asyncapi/generator/lib/renderer/nunjucks.js:32:14
    at new Promise (<anonymous>)

Expected behavior

no error

I use node v18.16.0 and ag version 1.10.14, but this occurs since yesterday also on other versions!

@muenchhausen muenchhausen added the bug Something isn't working label Aug 31, 2023
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@M3lkior
Copy link
Contributor

M3lkior commented Aug 31, 2023

Same issue here since this morning with node16, and generator in v1.9.0 with no codebase changes

@pioneer2k
Copy link

For us as well with the GitHub Action of the generator

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.28.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants