Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.1k stars 1.21k forks source link

Azure Event Hubs Readme and Sample Issue #30555

Open Yionse opened 4 months ago

Yionse commented 4 months ago

link1 image link2 image link3 image link4 image link5 image

Reason:

  1. When running link1, link2, and link3 code. After running, there was no response. But when I no longer use the @Azure/identity verification in the sample, but instead use connection verification, it can run successfully.
  2. When running link4 code. AbortController is undefined.
  3. When packing link5 code. Webpack 5 no longer automatically includes polyfills for the Node.js core module.

@joheredi,@jsquire,@deyaaeldeen for notification.

github-actions[bot] commented 4 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kasun04.

deyaaeldeen commented 4 months ago

@Yionse for the first three issues, did you make sure to configure service principal correctly following the instructions in https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventhub/event-hubs/README.md#use-the-event-hubs-namespace-and-azure-identity? It would be helpful to share what you see in the logs, especially from @azure/identity.

For the forth one, the fix is to delete AbortController from the import statement because it is a global provided by NodeJS and the web API.

I'll take a look at the fifth one.

Yionse commented 3 months ago

@deyaaeldeen thank you for your reply. For the first three issues. I'm sure I configured it according to the instructions in the document.

deyaaeldeen commented 3 months ago

@Yionse thanks for confirming! Could you share the logs then so we can better diagnose the issue you are facing?

Yionse commented 3 months ago

@Yionse thanks for confirming! Could you share the logs then so we can better diagnose the issue you are facing?

@deyaaeldeen when using '@azure/identity', an error is reported. if 'ConnectString' is used, it will run successfully. The value of fullQualifiedNamespace is https://<eventhubname>.services.windows.net. Below is the running logs. image

deyaaeldeen commented 3 months ago

@Yionse The fully qualified namespace shouldn’t have the eventhub name in it, that is why you’re getting a not found error. It should have the namespace instead. I would encourage you to use the existing test resources arm template to create a resource and use the output variable EVENTHUB_FQDN as the environment variable for the sample.

Yionse commented 3 months ago

@Yionse The fully qualified namespace shouldn’t have the eventhub name in it, that is why you’re getting a not found error. It should have the namespace instead. I would encourage you to use the existing test resources arm template to create a resource and use the output variable EVENTHUB_FQDN as the environment variable for the sample.

@deyaaeldeen The value of fullQualifiedNamespace is <namespace>.services.windows.net. I have now received another error. Below is the running logs. image

deyaaeldeen commented 3 months ago

@Yionse this error indicates there is a problem with authentication and I can't know what exactly is the issue without looking at the logs. Could you share the logs?

Yionse commented 3 months ago

@Yionse this error indicates there is a problem with authentication and I can't know what exactly is the issue without looking at the logs. Could you share the logs?

I have added the Azure Event Hubs Data Owner permission for the resource in the portal, and it can now run normally. Also, how is the progress status of item5?

Yionse commented 2 months ago

@deyaaeldeen Hi, may I ask about the progress of item5?