-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cannot create subscription inside topic in Azure Service Bus (JavaScript) #30979
Comments
Hi @jeremymeng, thanks for quick response. What is the workaround or proposed solution? Our project's functionality relies on this API's method. |
The CORS issue need support from the service team. But since you were able to send requests that means you already have a way around it? Do you have to run the service bus code in the browsers? One alternative is to have a NodeJS backend to do that. |
@CezaryBD there's an untested and unsupported way to switch to use cat '.\patches@azure+core-xml+1.4.3.patch' diff --git a/node_modules/@azure/core-xml/dist/browser/index.js b/node_modules/@azure/core-xml/dist/browser/index.js
index e3caeef..595f7fb 100644
--- a/node_modules/@azure/core-xml/dist/browser/index.js
+++ b/node_modules/@azure/core-xml/dist/browser/index.js
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
-export { stringifyXML, parseXML } from "./xml.js";
+export { stringifyXML, parseXML } from "../esm/xml.js";
export { XML_ATTRKEY, XML_CHARKEY } from "./xml.common.js";
//# sourceMappingURL=index.js.map
\ No newline at end of file``` |
I currently have no CORS issues whatsoever, but I do have issues that e.g. in the Microsoft Edge the payload generated looks like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entry
xmlns="http://www.w3.org/2005/Atom">
<updated>2024-09-03T06:39:22.891Z</updated>
<content type="application/xml">
<SubscriptionDescription
xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AutoDeleteOnIdle>PT1H</AutoDeleteOnIdle>
</SubscriptionDescription>
</content>
</entry> whereas generated for Firefox looks like in the original ticket. Will there be a tested and supported way or do you completely stop supporting browsers? Yes, I need to run Service Bus subscription creation code on our browser side, this is a critical part of our project's architecture. If I move it to our backend, what's the point of existence for this library? |
This package supports both browsers and NodeJS. I'd thought I linked to this above but apparently, I linked to the same issue twice... Yes, this is a bug on only FireFox. We will look into it. #11655 |
…31021) Chrome-based browsers are more error-tolerant when the XML namespace ("xmlns:...") was set via attribute, but that doesn't work on Firefox, which requires using of `createElementNS()` to create element with XML namespace. This PR adds special handling of the "xmlns" attribute. ------- ### Packages impacted by this PR @azure/core-xml ### Issues associated with this PR #11655 #30979
This has been fixed in @azure/core-xml 1.4.4 |
Describe the bug
The bug is happening on Mozilla Firefox browser only (so far).
It seems that while executing subscription creation, there is a problem with xml payload created only on Mozilla Firefox browser.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Fix ASAP Mozilla Firefox integration with your library or provide a workaround.
Screenshots
n/a
Additional context
XML faulty payload generated by Firefox:
Response:
400 BAD_REQUEST
Body:
The text was updated successfully, but these errors were encountered: