-
Notifications
You must be signed in to change notification settings - Fork 45
Need browser friendly versions of node.js iot modules - client can't connect to iot hub #11
Comments
Hi @rricart , at this point the Azure IoT Hub service doesn't support CORS (Cross-Origin Resources Sharing), which I think will anyways prevent the code running in the browser client to establish the TCP connection with IoT Hub. |
I was afraid that was the issue. I looked in the portal and there was no setting for CORS. We have developed the following in AWS and tried to do it in Azure but encountered the putative CORS issues. The clients are very interested in Azure. These apps are POCs and demos that we use for sales. Is there any way to expedite this? An IoT device should be anything.
The scenario is one where we need to have the ability to send synchronous HTTP requests to an order processing system and be able to receive order updates asynchronously via the IoT Hub. The browser application plays the role of an IoT device that receives messages to it from the order processing center. There is a counterpart at the order processing center that receives asynchronous messages as well from the order processing system. The latter plays the role of an IoT device that updates the order processing app. The order processing app receives device-to cloud messages.
Rick Ricart
Azure Cloud Lead
[http://accenture.emsecure.net/images/2012/signatures/signature-logo.jpg]
Email: richard.ricart@accenture.com<mailto:richard.ricart@accenture.com>
Cell: +1 321-544-4000
Lync: +1 727-897-7038
From: Olivier Bloch [mailto:notifications@github.com]
Sent: Wednesday, January 11, 2017 6:00 PM
To: Azure/azure-event-hubs-node <azure-event-hubs-node@noreply.github.com>
Cc: Ricart, Richard <richard.ricart@accenture.com>; Mention <mention@noreply.github.com>
Subject: Re: [Azure/azure-event-hubs-node] Need browser friendly versions of node.js iot modules - client can't connect to iot hub (#11)
Hi @rricart<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rricart&d=DgMFaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=oziDXjlMTg8HMAHyrTWkifQfnij4CzBHstxCKRgtMXw&m=n8NoStrn8HdXNgmuWyX1smvfpJRjI-Az3kK5aVgJqJQ&s=UHV7IOou8Cu7uY722q8NqzX45wx5-rRM5PYctZ2J7h0&e=> , at this point the Azure IoT Hub service doesn't support CORS (Cross-Origin Resources Sharing), which I think will anyways prevent the code running in the browser client to establish the TCP connection with IoT Hub.
This feature is in our plan of record but we don't have an ETA for it yet.
To help out prioritize the feature and help unblock you with an alternative, can you please share what the scenario is that you are trying to implement?
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Azure_azure-2Devent-2Dhubs-2Dnode_issues_11-23issuecomment-2D272023302&d=DgMFaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=oziDXjlMTg8HMAHyrTWkifQfnij4CzBHstxCKRgtMXw&m=n8NoStrn8HdXNgmuWyX1smvfpJRjI-Az3kK5aVgJqJQ&s=FYCEoBbuloTzDJzfjiuQz9c-s2EYj4irXK_9wBymrXQ&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAojZV9VEtedkAQg3ShWS2AVNRLBK-2DQ2ks5rRV71gaJpZM4LeRY7&d=DgMFaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=oziDXjlMTg8HMAHyrTWkifQfnij4CzBHstxCKRgtMXw&m=n8NoStrn8HdXNgmuWyX1smvfpJRjI-Az3kK5aVgJqJQ&s=G0jMZwOpMBvqVTfivkfkTF9Fa_FMIK4vJn9ptwqGQqw&e=>.
…________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
______________________________________________________________________________________
www.accenture.com
|
Hi, I too, have been struggling with the node libraries in the browser. I abandoned it and decided to try REST which I now find out is not possible. This would be a great feature. Write a web site and send data to the cloud. I hope this will be possible soon. I believe it would speed up adoption and creativity! At least, add the CORS support. That should be real quick. Thanks, |
Trying to implement a device-to-cloud receiver on browser. Console code in "Get started with IoT Hub (Node)" documentation works fine. Encountered following errors on browser:
• we changed reference of crypto to crypto-browserify in this file and installed crypto-browserify node module in root directory, which resolve that error.
• we changed reference of tls to tls-browserify in this file and installed tls-browserify node module in root directory, which resolve the error.
• we changed reference of net to net-browserify and installed the module in root directory, which solved the problem.
client.open() <---- error thrown here
.then(client.getPartionIds.bind(client)
.then(function(partitionIds){ .....
Note: we will then try to implement a simulated device on the browser and must have browser friendly versions of azure-iothub, azure-iot-device, and azure-iot-device-amqp or mqtt
The text was updated successfully, but these errors were encountered: