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

message.messageId is not a function #385

Closed
remcocats opened this issue Nov 15, 2023 · 6 comments · Fixed by #387
Closed

message.messageId is not a function #385

remcocats opened this issue Nov 15, 2023 · 6 comments · Fixed by #387
Labels
bug Something isn't working

Comments

@remcocats
Copy link

Describe the bug

When using the template with older version of the api contract I get the fault message.messageId is not a function.

when I look in de message.js I see the problem:
// check typeof as fallback for older version than 2.4.0`
const messageId = typeof message.messageId === 'function' && message.messageId();
const headers = message.headers();
const payload = message.payload();
const correlationId = message.correlationId();
const contentType = message.contentType();
const externalDocs = message.externalDocs();
const showInfoList = contentType || externalDocs;

let header = 'Message';
if (message.title()) {
header += ${message.title()};
}
const id = message.messageId() || message.name() || message.id();
if (id) {
header += \${id}`; }

When the const id is set the function message.messageId() is called this has to be messageId.

@remcocats remcocats added the bug Something isn't working label Nov 15, 2023
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.

@abhikt48
Copy link

abhikt48 commented Nov 20, 2023

We are blocked by this issue. I am hoping to get fixes for this issue soon, so we can procedd further.

@SolomidHero
Copy link

i encountered same issue

@abhikt48
Copy link

@remcocats Do we know when PR can be approved?

@abhikt48
Copy link

Hey @jonaslagoni , Can you please suggest why I am getting this issue in Ubantatu system and not in alpine or windows system? It was working fine earlier and suddenly it's start to fail. We are really clueless for this issue. It will be great if you can give us some insight on this. We are blocked due to this issue.

@jonaslagoni
Copy link
Member

@abhikt48 until #387 is fixed, there is not much you can do but downgrade 🙂

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

Successfully merging a pull request may close this issue.

4 participants