Talk about features that would help Single Page Apps

braintree-web's design comes from a time when checkout flows generally used a <form> POST. This is no longer the case in 2015, where SPAs and JS-heavy checkout flows are common.
There are a couple things that keep braintree-web from working well in SPAs, the biggest of which is that braintree.setup can only be called once per page load.
I'm starting this thread to discuss what kinds of features would be useful for making braintree-web work better in JS-heavy checkout flows.
Related Issues:

setup() with different user #18
Ability to disable dropin form event handlers #4
paymentMethodNonceReceived callback doesn't get a new nonce after submitting and re-entering number #20
paypal support? https://github.com/jeffcarp/braintree-angular/issues/8

I have actually had a lot of success using Angular and braintree-web.  I didn't know that braintree-angular exists so I will need to take a look at that.  A couple things I would recommend are:

paymentMethodNonceReceived: function (event, nonce).  It would be nice if this function returned a creditcard object containing like last 4 of card etc so that we do not need to vault the customer/method to display it on a confirmation route.  Obviously no full informaiton for PCI.  Similar to how the paypal button returns shipping and email info

Obviously the event handlers on forms have been a problem.  I have my braintree.setup calls in a service and it seems like I can use JQuery to empty() the drop in container and call it again.  Would be nice to see this reworked so that we can call setup multiple times without any work arounds.

Need a bower install for braintree-data.  Also need a callback function on in the BraintreeData.setup call so that it returns the data instead of creating a DOM element in the form.

There are more that I ran into so I will update as I run into them.

@trainerbill regarding paymentMethodNonceReceived, as of v2.5.0 we added a new root level callback called onPaymentMethodReceived which returns more details for Credit Card transactions. Unfortunately, we have yet to release the official documentation, but you can read more about the callback here and I am happy to answer more any further questions you may have.

Awesome!  Thanks for the heads up on that.

:+1: for a quick resolution of this. These issues make it really difficult to integrate braintree in a SPA.

We appreciate a quick fix to ease integration.

:+1:

:+1:

We were experiencing an issue where loading the braintree widget (with braintree.setup()) for a second time on the same single page app (after removing the previous one, but without reloading the page), would make the widget use the client token with which braintree.setup() was called for the first time, effectively giving access to the vault of the first user.
This is a serious issue, since it could allow a user A access to the vault of a user B after user A logged out, if the page was not refreshed meanwhile.
After investigating the problem more thoroughly, we were able to work around the issue, but we had to resort to some nasty hacks and fragile solutions that might break with future releases of braintree-web.
We found that all the following steps are required for a proper cleanup and new setup of the widget:

remove the DOM element where the widget is attached;
remove the "braintree-dropin-modal-frame” iframe added to the body;
delete window.Braintree object;
delete various window.callback_json_xxxx functions (2 per setup());
remove various “on message” event listeners attached to the window object (5 per setup());
remove the script from the page (since we use require.js, we’re resorting to requirejs.undef('braintree’) to do this).

After all these steps are done, we can then require the braintree.js script again and invoke braintree.setup() with different parameters and user vaults and payments work as expected.
To remove the event listeners left hanging in the window object we resorted to monkey-patching the window.addEventListener method, which feels wrong and may lead to other issues.
A destroy() method implemented by braintree-web has the benefits that it doesn’t need to resort to nasty hacks and monkey-patches to keep track of callbacks and event handlers that are registered globally, since the module can keep track of its own references for easier removal.
If you could provide a braintree.destroy() (or similar) method that would do the steps described, integration in single page applications would be much easier and we wouldn’t have to fear that future upgrades of braintree-web could break our workaround solution.
Reloading of braintree.js should be left to consumers, since the method to do that depends on how the script is included, but all the other steps could be provided by your own cleanup mechanism.

wow @tnunes i was trying the same kind of workaround a couple of days ago, but missed the callbacks and event listeners on the window.  thanks for the info.  do you think the hosted fields would have the same issues?

Hi @imgntn,
I haven't used hosted fields, so I can't help you that. I know, however, that braintree-data also presents the same kind of issues, since to integrate it I also had to find out and clean what it leaves attached to the page.

Since github doesn't support voting for issues, I'm adding a comment: Please add braintree.destroy().

+1

We NEED braintree.destroy()!

Really need this. Stripe has it, but we don't want to give up on Braintree just because of this issue.

+1
@tnunes, Do you know if it's possible to target the braintree 'on message' events listener without deleting all others ? Any Ideas of their name ?

What I do is monkey-patch the window.addEventListener function right before I setup braintree.
In my implementation I accumulate all event listeners in an array before proxying to the real window.addEventListener.
Then, in my braintree.destroy, I use window.removeEventListener to remove all listeners I previously saved references to, right before I restore the original window.addEventListener function.
This is hackish and fragile, but as long as nothing aside from braintree adds listeners to the page from the moment you call setup until you destroy the widget, you should good.

We have the same problem @tnunes described, thank you for the hack. Still, I think we are going to do an full page reload until braintree.destroy (or something similar) is implemented by default.

Glad I stumbled upon this issue, was tearing my hair out trying to figure out why I was getting errors in my Ember app when I tried to add and remove paypal accounts. A teardown method would really help out for single page apps.

+1

+1 come on braintree, we're all waiting!

+1
Would be really helpful. Reloading the whole page seriously detracts from our whole checkout experience.

+1
Come on braintree, get your act together. Come live in the future with us. Everyone is designing single-page applications and it is extremely frustrating when we have to integrate with libraries designed by companies who think they use the latest tech, but actually have no clue.
This is CS 101 fundamentals; make your code self-contained; make it leave no trace on the system its running on. We thought we should use braintree because it would be easier to integrate, but it's taking the same amount to time, and same amount of nasty hacks as it takes to integrate with your parent company.
 Either way, it reflects poorly on your company.
Forgive my strong language; but this is exactly how I feel. If this were an open-source library, I would have fixed this by now. But now we're all trapped to writing shitty code, because either you guys don't care, or you guys just don't get it.
Wake up!!

Pretty much what he said. I've wasted hours and hours trying to make
something reasonable out of this technology. It doesn't seem like either
the default web integration or hosted fields will work for anything but a
multiple page click through experience. After earlier experiences where
braintree's support had been impeccably good, I am now finding that it is
not so responsive and technically they are not keeping up with the times.
Perhaps all the PayPal and eBay split noise is affecting the focus of the
team or confusing the priorities. I am seriously considering switching to a
competitor after my experience dealing with this mess, particularly sense
the communication from Braintree has mostly been either radio silence or
"uh sorry." they don't even seem to be aware of the reason this is such an
inconvenience.
 Come live in the future with us.
Everyone is designing single-page applications and it is extremely
frustrating when we have to integrate with libraries designed by companies
who think they use the latest tech, but actually have no clue.
This is CS 101 fundamentals; make your code self-contained; make it leave
no trace on the system its running on. We thought we should use braintree
because it would be easier to integrate, but it's taking the same amount to
time, and same amount of nasty hacks as it takes to integrate with your
parent company.
 Either way, it reflects poorly on
your company.
Forgive my strong language; but this is exactly how I feel. If this
were an open-source library, I would have fixed this by now. But now we're
all trapped to writing shitty code, because either you guys don't care, or
you guys just don't get it.
Wake up!!
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-116859911
.

Hey folks - I'm a Product Manager with the Braintree SDK and Developer Experience team.
We understand your frustration and the importance of providing an experience that works in a myriad of integration scenarios, including Single Page Applications.
We also recognize that this is an area in which we can improve our SDK. We're currently actively exploring the features we need to add and making considerations to preserve compatibility for all braintree.js users.
This is our best path forward for us to provide a more ideal and complete experience for all of our merchants. I'll keep you posted on the progress of this as I know that it is currently resulting in a less than ideal integration experience.
In the meantime, take a look at the docs for our advanced integration or feel free to contact me<EMAIL_ADDRESS>if you have further questions or concerns.

@rturumella There's no information in your documentation on how we can do custom integration with PayPal, other than this one line here:
https://developers.braintreepayments.com/javascript+dotnet/guides/paypal/overview
"Braintree offers a few options when accepting PayPal payments. First, you'll need to choose whether you would like to use our Drop-in UI or a custom integration. Learn more about differences between these integrations".

@rturumella Any chance you guys can publish the un-minified source of the JS client? Might just make it easier for us to workaround this issue.

@tastyeggs For each release of braintree.js we also have an accompanying unminified file. The pattern is as follows: https://js.braintreepgateway.com/js/braintree-<VERSION>.js.
That file is built from CommonJS modules and as such is not well suited for an open source release. I would recommend taking a look through the latest JS file and perhaps posting your specific issue here or emailing us to see if we can narrow down the exact problem you are facing with your integration.
I would also take a look at the following link:
https://developers.braintreepayments.com/javascript/guides/paypal/client-side

+1
Since the drop-ui doesn't work for single page apps, I'm trying to integrate using the advanced integration to tokenize the cards, but finding the documentation somewhat lacking in detail. Do you have some full docs for your JS API anywhere?
Right now it's the tokenizeCard() method that I'd like some more details on:

Can you provide more than just the postal code for address verification? If so how? Is it the same format as the server side deprecated CreditCard.create() function?
What validation is token by the tokenizeCard() method? Is it verifying the card number when it is called, or is that delayed until a payment is made?
Can you provide some documentation on the expected error formats returned from that API? None of the minimal examples for this show any error handling at all.

For your first question, the link
https://developers.braintreepayments.com/javascript+node/guides/credit-cards#tokenize-cardRohit
gave seems to have what you want, it shows several parameters to
tokenizeCard such as cvv, etc. As for when/if the validation happens, it
depends on a number of things. There is an option called verify_card that I
believe you can pass in there. It also depends on whether you have
configured the global verification settings for your account.
Braintree do document the error objects in their online docs, but you're
right that they don't show much in the way of error handling best
practices. :(
Now the bigger problem -- what Rohit hasn't mentioned here is that it's
unclear how much a custom integration actually helps us. With a custom
integration, customers are no longer able to qualify for SAQ-A PCI
compliance, which is why they are working on their "Hosted Fields" product.
The problem is that Hosted Fields has all the same problems with Single
Page Applications that the dropin integration has (and then some). Now way
to clear or reset it, or to accept a second payment entry after the first
one has been completed.
On Thu, Jul 2, 2015 at 2:16 PM, davidbryant<EMAIL_ADDRESS>wrote:

+1
Since the drop-ui doesn't work for single page apps, I'm trying to
integrate using the advanced integration to tokenize the cards, but finding
the documentation somewhat lacking in detail. Do you have some full docs
for your JS API anywhere?
Right now it's the tokenizeCard() method that I'd like some more details
on:

Can you provide more than just the postal code for address
verification? If so how? Is it the same format as the server side
deprecated CreditCard.create() function?
What validation is token by the tokenizeCard() method? Is it
verifying the card number when it is called, or is that delayed until a
payment is made?
Can you provide some documentation on the expected error formats
returned from that API? None of the minimal examples for this show any
error handling at all.

—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-118170886
.

+1 for this, I went down the route of manually trying to teardown braintree with limited success, seemed top fragile to risk it, so now using an angular directive I detect if braintree as already being initialised if so I add a target='_self' to any add card adding link thus reloading the page.  there's also a check in my card service  so if someone hits the back button it will reload the page.

@tnunes I am trying to set up braintree hosted fields more then once in a Drupal commerce type. So when user changes payment method hosted fields will be loaded via Ajax. The first time load always works, but not the second time. I am trying to reset Braintree by following your instruction above. But there is no avail. I cannot removeEventListener at all and I found this may be related to framebus. Could you show me the code to monkey patch window.addEventListener please? Much appreciated:D

+1
currently simply recreating the vault and manually filtering out already used nonces (but that doesn't circumvent a 2nd user having access to the 1st users vault)

@cityreader I'm not using hosted fields, so I do not know if they need any additional house keeping.
To monkey patch window.addEventListener you can use something like:
var realWindowAddEventListener = window.addEventListener,
    braintreeEventListeners = [];

window.addEventListener = function () {
    braintreeEventListeners.push(Array.prototype.slice.apply(arguments));
    realWindowAddEventListener.apply(window, arguments);
};

// setup braintree

// then to cleanup:
// - do the other described tasks;
// - remove listeners and restore `window.addEventListener`:
var listenerArgs;

while (var listenerArgs = braintreeEventListeners.pop()) {
    window.removeEventListener.apply(window, listenerArgs);
}

window.addEventListener = realWindowAddEventListener;

I gave up on hosted fields, fwiw. I've resigned myself to have to do the
more elaborate SAQ for a custom integration (which will require scanning).
On Thu, Jul 23, 2015 at 12:53 PM, Tiago Nunes<EMAIL_ADDRESS>wrote:

@cityreader https://github.com/cityreader I'm not using hosted fields,
so I do not know if they need any additional house keeping.
To monkey patch window.addEventListener you can use something like:
var realWindowAddEventListener = window.addEventListener,
braintreeEventListeners = [];
window.addEventListener = function () {
braintreeEventListeners.push(Array.prototype.slice.apply(arguments));
realWindowAddEventListener.apply(window, arguments);
};
// setup braintree
// then to cleanup:// - do the other described tasks;// - remove listeners and restore window.addEventListener:var listenerArgs;
while (var listenerArgs = braintreeEventListeners.pop()) {
window.removeEventListener.apply(window, listenerArgs);
}
window.addEventListener = realWindowAddEventListener;
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-124223081
.

Thanks @tnunes. This approved that I did right before according to your instructions. Sadly, that does not work for Hosted Fields.
It seems Hosted Fields script binds events in other places including form and submit buttons other than window. I cannot make multiple setup work unless hacking the braintree hosted fields script, but even in that way event still cannot be unbinded.
So in the last, we decided to reload page when user change a different payment method by clicking radio options. In order to achieve that, we still have to unbind form submit handler binded by Braintree.
This is no way to remove anonymous callback function, so we have capture all listener as well. Instead of monkey patching window.addEventListener, we make try to monkey patching Element.prototype.addEventListener:
var braintreeListener = function() {
  this.originalAddEventListener = Element.prototype.addEventListener;
  this.listeners = [];
  var self = this;

  Element.prototype.addEventListener = function (event, listener) {
    arguments = Array.prototype.slice.apply(arguments);
    // Apply original attach listener function
    self.originalAddEventListener.apply(this, arguments);
    // Include element data
    arguments.unshift(this)
    self.listeners.push(arguments);
  };

  return this;
}();

braintreeListener.undelegate = function (html) {
  arguments = Array.prototype.slice.apply(arguments);

  if (typeof html == 'string') {
    html = document.querySelector(html);
  }

  for (var key in this.listeners) {
    if (html == this.listeners[key][0]) {
      // Remove handler
      html.removeEventListener(this.listeners[key][1], this.listeners[key][2]);
    }
  }
}

So run this script right before Braintree Hosted Fields.js, when we want to unbind form submit handler we run
$form = $('#form-id');
braintreeListener.undelegate($form[0]);

I ended up "solving" this by using an iframe. It might not seem clean but it works perfectly fine and there are no left-overs.
I'm creating a new iframe, injecting html that includes the form and script setup for braintree with the Client Token using javascript:window["content"] .
Then every callback of braintree's drop-in (onPaymentReceived, onReady, onError) is handled by using Window.postMessage() on the main application window.
Every time you need to create a new drop-in with a different Client Token, you just remove the iframe, and re-create it. This is untested as far as older browsers go but it works perfectly fine on Firefox and Chrome.
Let me know what you think.

Same problem here missing a braintree.destroy method to remove it cleanly and reuse it later without page reload

This is extremely frustrating. Please, Braintree, give us a destroy() method. I have already wasted more than 10 hours on this and can't find a clean solution for hybrid mobile apps...

This is interesting, I ran this idea past Braintree's technical support a
while back and they said to me 'others have tried similar work-arounds to
little success', so I was put off the idea.  I wish you luck and hope to
hear you prove them wrong because it sounds like the most reliable method
I've heard so far.
On 29 Jul 2015 09:29, "Ioannis Karavas"<EMAIL_ADDRESS>wrote:

I ended up "solving" this by using an iframe. It might not seem clean but
it works perfectly fine and there are no left-overs.
I'm creating a new iframe, injecting html that includes the form and
script setup for braintree with the Client Token using
javascript:window["content"] .
Then every callback of braintree's drop-in (onPaymentReceived, onReady,
onError) is handled by using Window.postMessage() on the main application
window.
Every time you need to create a new drop-in with a different Client Token,
you just remove the iframe, and re-create it. This is untested as far as
older browsers go but it works perfectly fine on Firefox and Chrome.
Let me know what you think.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-125879973
.

+1 for destroy(), IMHO the most important feature to be implemented so far.

+1 for braintree.destroy()!

Hey @rturumella,
6 weeks or so ago you said you'd keep us posted. Do you have anything you
can share about plans to address our concerns? Like a specific date? It
strikes me that it is likely 6 days of work on your part to make
improvements, but there is no sign of any changes... Is it important?
On Aug 5, 2015 9:21 AM, "Mike"<EMAIL_ADDRESS>wrote:

+1 for braintree.destroy()!
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-128057014
.

+1 .destroy() is necessary.

@rturumella @jeffcarp  is there any plan to include destroy or an official workaround?

@tnunes  Funny, I was searching for a destroy() method and I couldn't find it.
I have the exact same issue. We need destroy().
This is a huge security flaw.

Hey folks,
I'm a Product Manager with the Braintree SDK and Developer Experience Team.
We're currently still actively working on this. There are a number of things to keep in mind in order to ensure a first class experience for all braintree.js users.
We understand the frustration around this and we know this is an area of improvement for our SDK. Please stay tuned for more updates.

Do you have a schedule?
On Tue, Aug 11, 2015 at 10:34 AM, rturumella<EMAIL_ADDRESS>wrote:

Hey folks,
I'm a Product Manager with the Braintree SDK and Developer Experience
Team.
We're currently still actively working on this. There are a number of
things to keep in mind in order to ensure a first class experience for all
braintree.js users.
We understand the frustration around this and we know this is an area of
improvement for our SDK. Please stay tuned for more updates.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-129981347
.

@rturumella that looks like the same response as a while ago, is there a schedule for this?

@rturumella I'm a frontend developer for Splice and we have a single page Angular app. Should we be switching away from Braintree now?

It seems so... Braintree seem unable to implement this functionality in any
reasonable timeframe, and equally incapable of even providing an estimate.
It's pretty sad.
On Aug 27, 2015 11:28 AM, "Zach Briggs"<EMAIL_ADDRESS>wrote:

@rturumella https://github.com/rturumella I'm a frontend developer for
Splice and we have a single page Angular app. Should we be switching away
from Braintree now?
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135514800
.

Have put live their Hosted Fields integration - while still in beta. Sure there are issues, but for what it's worth the company was just bought by PayPal. They're probably doing something right.
Their support team is both enthusiastic and helpful, both on the phone and via email. They've acknowledged the need for the above requested functionality, and apologies but 'reasonable timeframe' is utterly subjective and apparently ignorant of the realities of software development lifecycles. Not trying to have a dig, but patience is a virtue.

Thomas, thanks for the "not a dig". You're apparently unfamiliar with "
planning." It's completely sane and within the norms of professional
software development to ask for a timeframe other than "soon." Especially
when we've been told "soon" several times. Any developer who has ever
gotten paid for what they do would understand why getting information on
schedules is important.
You're right, their email support in general is very helpful. For things
that they have an answer to. Their support has been completely unhelpful,
both via web and via email on this topic. How patient do you think we
should be? If you look, you'll see that this discussion is many months old
already.
BTW, Paypal bought Braintree very nearly 2 years ago, and in any case
getting acquired is neither an excuse for not responding to your customers
nor an endorsement of "doing something right."
If you read the posters here, I think you'd get the sense that we all
like Braintree, which is why it's so frustrating that their stuff doesn't
work well, and they aren't responsive about it. You don't need to apologize
for them or question the merits of our complaints. Unless perhaps you work
there - I hope not.
 Sure
there are issues, but for what it's worth the company was just bought by
PayPal. They're probably doing something right.
Their support team is both enthusiastic and helpful, both on the phone and
via email. They've acknowledged the need for the above requested
functionality, and apologies but 'reasonable timeframe' is utterly
subjective and apparently ignorant of the realities of software development
lifecycles. Not trying to have a dig, but patience is a virtue.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135538610
.

Apologies, I should have been more detailed in my question. Is there a
means of using Braintree in a single page app that doesn't require any of
the following:

a full page refresh
an iFrame
monkey patching

Because we're currently evaluating Braintree and if the only means of using
their software is one of the three above approaches, then they literally do
not support single page apps.
On Thu, Aug 27, 2015 at 3:42 PM, Paul R. Nash<EMAIL_ADDRESS>wrote:

Thomas, thanks for the "not a dig". You're apparently unfamiliar with "
planning." It's completely sane and within the norms of professional
software development to ask for a timeframe other than "soon." Especially
when we've been told "soon" several times. Any developer who has ever
gotten paid for what they do would understand why getting information on
schedules is important.
You're right, their email support in general is very helpful. For things
that they have an answer to. Their support has been completely unhelpful,
both via web and via email on this topic. How patient do you think we
should be? If you look, you'll see that this discussion is many months old
already.
BTW, Paypal bought Braintree very nearly 2 years ago, and in any case
getting acquired is neither an excuse for not responding to your customers
nor an endorsement of "doing something right."
If you read the posters here, I think you'd get the sense that we all
like Braintree, which is why it's so frustrating that their stuff doesn't
work well, and they aren't responsive about it. You don't need to apologize
for them or question the merits of our complaints. Unless perhaps you work
there - I hope not.
 Sure
there are issues, but for what it's worth the company was just bought by
PayPal. They're probably doing something right.
Their support team is both enthusiastic and helpful, both on the phone
and
via email. They've acknowledged the need for the above requested
functionality, and apologies but 'reasonable timeframe' is utterly
subjective and apparently ignorant of the realities of software
development
lifecycles. Not trying to have a dig, but patience is a virtue.
—
Reply to this email directly or view it on GitHub
<
https://github.com/braintree/braintree-web/issues/29#issuecomment-135538610

.

—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135550135
.

Hi Theotherzach, thanks for your insight. I don't work for Braintree, and wouldn't have posted something so proselytising if I did. I take your points and admit that I was unaware that the takeover was quite so long ago.
Let's not and say we did, eh?

There isn't a way which I'm aware of which meets your requirements, and I've settled - for now - with refreshing. It isn't perfect, but our business requirements are met.

Fair enough - we can all agree it's a shame we're even having this
conversation, I'm sure.
FWIW, I eventually gave up on this approach after talking with Braintree's
PCI compliance company, who by the way were very responsive and helpful
too. Apparently the difference between the two levels of SAQ is not
actually that huge of a deal, so I just stuck with my custom integration
and decided I'll have to get my website scanned (by them, for free).
On Thu, Aug 27, 2015 at 1:51 PM, Thomas Clark<EMAIL_ADDRESS>wrote:

Hi Theotherzach, thanks for your insight. I don't work for Braintree, and
wouldn't have posted something so proselytising if I did. I take your
points and admit that I was unaware that the takeover was quite so long ago.
Let's not and say we did, eh?
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135552024
.

This is the worst

This is kind of ridiculous.  @tnunes pretty much laid out what needs to be done.  If they published the unobfuscated code, I am sure the community could knock this out in a day.

I entirely understand their desire to not open source code as a payment provider. However, it would be nice if they would put a warning in their docs that the hosted solutions are not designed to work in single page apps. Because the way I found out about it was when our QA team was reporting double purchases, thank goodness our QA team rocks and that didn't get out into production. I've got a bunch of guards in place now to prevent disaster, but I was expecting to come out here and read about how I was doing it wrong.
I was really hoping to come out here and read about how I was doing it wrong...

won't it be possible to create a custom integration in JS together which is designed for single page apps, hooks in just like drop-in?

Hi folks - I'm a Product Manager at Braintree.
The .destroy() (or similarly named API) functionality is coming next week. We’ll be pushing it as an edge branch so you all can at least kick the tires and see progress. Thanks for your patience.

Braintree seem unable to implement this functionality in any reasonable timeframe, and equally incapable of even providing an estimate. It's pretty sad.

Yes. We should have precisely communicated our expected timing, and we should have been transparent about what was going on here internally while you all have been waiting.
This change has been more challenging than we anticipated. Since this library supports a variety of integrations across many merchants, the change must not break currently-integrated merchants. Maintaining backward compatibility involved some major internal refactoring, particularly around messaging and iframe orchestration.
That's the explanation for the delay, but it's not an excuse. We did a poor job communicating about the work and the delays, and as a result we let you all down. For that, we apologize.
We're taking this thread and your feedback seriously. Once we've pushed .destroy(), we will hold an internal post-mortem on this issue so we can (a) understand what went wrong in both the delay and our communication about the change, and (b) improve our processes and transparency going forward.
Thank you for your honesty and directness on this issue, and for working with us as we improve the JS library to support the growing number of ways people want to accept payments.

@rturumella Rad, thanks!
For me, the biggest issue was not knowing there was a single page app issue when adding the drop-in to our page. I was lucky enough to see a nonce can only be used once message which tipped me off to the problem, but QA still caught other instances where our users could make double purchases.
I would really like to see .create throw AT LEAST a console.warn if it's called more than once, and ideally throw an error. I would also like to see your drop-in docs reflect the actual state of single page apps so users like me don't stumble onto the issue.

@theotherzach those are both great suggestions. Thanks for this feedback.

@rturumella We're dead in the water until .destroy() is released. Any news to share at this time?

They told us Friday I think that it'd be coming this week... not sure if you saw that already.
-P

On Aug 31, 2015, at 4:44 PM, Sherman Dickman<EMAIL_ADDRESS>wrote:
@rturumella We're dead in the water until .destroy() is released. Any news to share at this time?
—
Reply to this email directly or view it on GitHub.

@shermandickman The .destroy() (or similarly named API) functionality is coming next week. We’ll be pushing it as an edge branch so you all can at least kick the tires and see progress. Thanks for your patience.

@rturumella thanks very much for the explanation.
FWIW the worst part of this for us - the scariest part - was when we
realized that because that nonce was still present even after the user had
logged out, any other person could have used our app to make purchases with
the previous user's payment method if they got ahold of the device.
On 1 September 2015 at 01:56, rturumella<EMAIL_ADDRESS>wrote:

@shermandickman https://github.com/shermandickman The .destroy() (or
similarly named API) functionality is coming next week. We’ll be pushing it
as an edge branch so you all can at least kick the tires and see progress.
Thanks for your patience.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-136530674
.

As @rturumella mentioned last week, we are delivering a beta build of braintree.js that exposes the ability to tear down an integration and re-create a new one during a lifecycle of a single page view.
Right now this new version is deployed as a beta build and can be downloaded from here:

https://js.braintreegateway.com/js/braintree-2.13.0-beta.js
https://js.braintreegateway.com/js/braintree-2.13.0-beta.min.js

We will be adding full documentation in an accompanying production release in the coming weeks. In the meantime, we would love to take in some feedback on this new functionality. We know how important this is and we want to make sure when it goes out in production that the experience is rock solid.
Since version 2.7.0, the configuration object passed during braintree.setup has provided an onReady callback. As of this latest build the onReady callback will provide an integration object on which you can perform actions such as teardown.
});

This teardown method will go ahead and do the work necessary to destroy anything that braintree has created on your page including iframes and hidden input elements. It will also close any popups or modals that have been opened by our integration (PayPal). teardown will execute a callback when these operations have completed and you can safely proceed with your next steps.

@kyledetella @rturumella just tested this and it seems to be working fine. I added a $scope.$on('$destroy' bit in the code to call the teardown() and it seems to have nicely cleaned up the dropin. Thanks for the resolution in the end!

@rturumella Does this update also apply to hosted fields js?

@cityreader this update will apply to hosted-fields but that has not been released yet. We are aggressively working to provide teardown for hosted-fields integrations as well. That work lives in a separate beta build and there are a few things we need to reconcile first. I will keep you posted with updates on that.

@kyledetella How are we doing on the hosted fields integration?

@theotherzach the teardown functionality in hosted-fields will be available within 2 weeks. Again, we will make sure to drop the news here as soon as its ready.
Have you had a chance to try out teardown in your Drop-in integration? Is it working as expected for you?

@kyledetella sounds good - looking forward to the new beta.
Just to clarify: I'm currently testing out hosted fields on a React JS powered check out flow. I'm currently having a hard time getting my braintree.setup to fetch my form correct. I do get the onReady-callback (but with no arguments passed - guessing it's because the integration-argument isn't included in the newest hosted-fields beta build?). But for instance my placeholders and other options aren't applied to the input fields in question. Also the onFieldEvent isn't firing when changing value in input fields. When i try to submit a transaction, my onError-event fires with this msg:
message: "User did not enter a payment method"
type: "VALIDATION"

Also my onFieldEvent fires for all inputs on submit - but just after the error msg. They all appear to be empty according to the onFieldEvent, and the container is ".braintree-hosted-fields-invalid" - which obvously tells me something is wrong with my braintree init.
I'm guessing the above is caused by the way react is rendering js and markup. Will i be able to control this better, when the teardown-function is added to braintree?
And is it correct understood, that with the current build of hosted fields, it is not possible to load the hosted fields dynamically on a onpage javascript application?
Thanks for keeping us all updated through development!

@rbsmidt  the onReady callback will not pass any arguments until teardown is introduced into Hosted Fields, so that is expected.
As for the other issues you mentioned (placeholders and options not being applied), these sound unrelated to teardown. It will be easier for us to debug and help you out if we could get some more context on your integration. Would you be willing to post snippets of your setup? If you would rather not post them here, send us an email to<EMAIL_ADDRESS>and we can take this conversation there.
Regarding your last question, let me make sure I understand, are you asking if it is possible to setup hosted fields dynamically after page load? If so, yes you are able to do that. If I am misunderstanding the question, let me know.

Thanks for your reply @kyledetella
Yes i've been debugging a bit more, and it seems that you are right, my issue lies elsewhere. I'm happy to provide an example:
var Checkout = React.createClass({
  componentDidMount: function(){
    console.log('checkout mounted..');
    this.initPayment();
  },
  initPayment: function(){
    console.log('init payment', this);
    var options = {
      id: "payment-form",
      hostedFields: {
        onFieldEvent: function(event){
          console.log('field event triggerede', event);
        },
        number: {
          selector: '#card-number',
          placeholder: 'Kortnummer'
        },
        cvv: {
          selector: '#cvv',
          placeholder: 'CVV'
        },
        expirationDate: {
          selector: '#expiration-date',
          placeholder: 'Kortnummer'
        }
      },
      onReady: function(){
        console.log('braintree ready');
      },
      onError: function(error){
        console.log('an error occurred', error);
      },
      onPaymentMethodReceived: function(event, data){
        console.log('event', event, 'data', data);
      }
    }
    braintree.setup(this.props.state.token, "custom", options);
  },
  render: function(){
    console.log('render checkout', this);
    return(
        <div className="grid-checkout">
          <h3>Check ud</h3>
          <form id="payment-form">
              <input type="text" name="firstname" id="fistname" placeholder="Fornavn" />
              <input type="text" name="lastname" id="lastname" placeholder="Efternavn" />
              <input type="text" name="email" id="email" placeholder="Email" />
              <input type="text" name="tlf" id="tlf" placeholder="Telefon" />
              <p><img src="/images/icon_security.svg" height="15" width="auto" /> Sikker betaling <img<EMAIL_ADDRESS>width="auto" height="25"/></p>
              <input type="text" name="card-number" id="card-number"  />
              <input type="text" name="cvv" id="cvv" />
              <input type="text" name="expiration-date" id="expiration-date" />
              <button>Betal</button>
          </form>
        </div>
    );
  }
});

As stated in my last comment, i the onReady-event fires successfully after componentDidMount and the initPayment, but my placeholders doesn't show up, and the onFieldEvent doesn't fire either. When i press the submit-button, my three hosted fields gets the class braintree-hosted-fields-invalid. But before i press submit, the input-fields doesn't have a class. So it seems to me, that my braintree setup never "catches" the three input fields - until i try submitting, and somehow they are registered as empty fields by braintree.js.
The error message is still as stated in my last comment.
Any idea what could cause this setup issue?
Best regards,
Rasmus

@rbsmidt It looks like if you replace the 	input elements for card-number, cvv, and expiration-date with divs, everything works. Hosted Fields actually uses these div elements as containers in which we inject iframes which contain the "hosted fields". Take a look at the documentation and/or this blog post for more detailed information on setting up Hosted Fields.
Here is an example of the updated code for you to try out:
...
  render: function(){
    console.log('render checkout', this);
    return(
        <div className="grid-checkout">
          <h3>Check ud</h3>
          <form id="payment-form">
              <input type="text" name="firstname" id="fistname" placeholder="Fornavn" />
              <input type="text" name="lastname" id="lastname" placeholder="Efternavn" />
              <input type="text" name="email" id="email" placeholder="Email" />
              <input type="text" name="tlf" id="tlf" placeholder="Telefon" />
              <p><img src="/images/icon_security.svg" height="15" width="auto" /> Sikker betaling <img<EMAIL_ADDRESS>width="auto" height="25"/></p>

              <div id="card-number"></div>
              <div id="cvv"></div>
              <div id="expiration-date"></div>

              <button>Betal</button>
          </form>
        </div>
    );
  }
});
...

I hope this helps you out. Let us know if you have any more questions.

@lilaconlee Ahh you are totally right. I tested with divs instead of inputs, and it worked like a charm! Thanks a bunch.

@kyledetella we needed to change our drop-in solution out for hosted fields because of styling concerns.

Hi,
I've just been playing with the beta version and found that the onReady callback is not called in some cases, meaning that you aren't provided with the teardown function to clean it up. Specifically if the form is hidden at the time that setup() is called, onReady is not called until you that form becomes visible. If it never becomes visible then you never get the callback so cannot unregister the event handlers.
I've run into this because I have a multi-step check out process with the dropin UI on the second page, so I was loading it in the background since it can take a while to load.
Is this intentional? If so why?
Cheers,
Dave

@davidbryant thanks for bringing this up. You are correct that onReady will not fire in the case of Drop-in until the UI has fully rendered (including the completion of css transitions). When the container/form for Drop-in is hidden, that action will be delayed until the surrounding DOM is made visible.
This is by design since the integration is technically not "ready" until it has fully rendered and is capable of tokenizing payment methods.
The concept of wanting to "preload" the Drop-in is interesting and I am glad you brought it up. The semantics of onReady suit the original intention of the Drop-in UI, but hearing about interesting use cases like yours really help as we make considerations for our products and features. I will bring this issue up with the team and let you know where we end up.
To be honest though, it is unlikely we will change this pattern anytime soon, so in the case of your UI, I would recommend initializing Drop-in only after you have rendered the containing view and tearing it down prior to un-rendering that view.

So this would also imply that I need to prevent all navigation within a SPA from the time that I call braintree setup() until it fires its onReady event? Otherwise there's a chance that a navigation event in that timeframe will prevent onReady from being fired and so not provide me with the teardown callback?

@davidbryant that is correct.
It's not a convenient restriction, but in integrations such as dropin or hosted-fields there is a lot of cross-domain machinery being asynchronously set in motion; cutting it off halfway through with a navigation event could lead to dangling DOM nodes, event handlers, or an unusable integration.

This afternoon version 2.14.0 was released. As you will see in the CHANGELOG, this release takes Hosted Fields out of beta and introduces the teardown API into those integrations as well.
This thread was originally opened to engage a dialogue on this matter and it certainly served that purpose. Should you experience any specific issues with teardown or Hosted Fields, please open a separate issue so that we can address them accordingly.

@kyledetella how should we handle BraintreeData.setup() when using teardown()?
Right now I'm calling
braintree.setup(this.props.paymentToken, "custom", {
  onReady: function(integration) {
    Checkout.braintreeIntegration = integration;
  },
  id: "payment-method-form",
  hostedFields: {...});
BraintreeData.setup(this.props.merchantId, 'payment-method-form', 'production');

And then later using Checkout.braintreeIntegration.teardown() as needed.  It's working well, but will there be complications if I'm repeatedly calling BraintreeData.setup()?

@cheyner it doesn't sound as though you are experiencing issues when repeatedly calling BraintreeData.setup() so it should be fine. However, should you encounter any hiccups, feel free to open a new issue about this and we'll take a look.

@kyledetella Thank you, the teardown APi is working great for us.
Just one bug I encountered: the .bt-overlay doesn't seem to be removed after teardown, and an new one is created whenever the PayPal login screen is displayed. This results to the transluscent black overlay to get darker and darker every teardown/initialization cycle. I remedied it by removing .bt-overlay within the teardown callback. Not sure if this is happening to others, too.

@bezhermoso glad to hear teardown is working out!
Would you mind opening a separate issue regarding .bt-overlay not being removed? It will be easier to track and handle specific issues in more focused threads. In the meantime, we will take a look.

The primary concern for most participants in this thread has been addressed in last week's 2.14.0 release. In the interest of keeping the discussion as specific as possible, we're going to close this issue.
Please open new issues for any further Single Page App concerns or questions. Thanks!

Thanks for the functionality.  When will it be documented?  Can you now call .setup() then braintree.teardown() and .setup again?

@trainerbill we will provide full documentation once this release is hotlinked. That should happen sometime this week.
For now, the explanation and code provided above remains accurate.

Can you now call .setup() then braintree.teardown() and .setup again?

Yes, that is a core allowance with this new feature!

Some months ago we badly needed this teardown() feature. We were changing billing just now and it's great that it's now available! Thank you!

@parreirat glad to hear it helped out!
Also, good call on posting the documentation in this thread, that slipped my mind!


feat: adds support for supportedOrientations

fixes Landscape mode in BottomSheet fails accessibility test #223

Description

Fixes #223 (issue)
Type of Change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

How Has This Been Tested?

Checklist: (Feel free to delete this section upon completion)

[ ] I have included a changeset if this change will require a version change to one of the packages.
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have run all builds, tests, and linting and all checks pass
[ ] I have added tests that prove my fix is effective or that my feature works
[x] My changes generate no new warnings
[ ] Any dependent changes have been merged and published in downstream modules

the yarn scripts test and changeset seem to be missing, so I could not run these

the yarn scripts test and changeset seem to be missing, so I could not run these

Thanks for the PR.
We are still in the process of completing the migration to the monorepo, so those commands are not yet operational.


NaN occurs when building

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):a GNU/Linux system with Linux kernel 4.15.0 on 1 6-core 3.60GHz Intel Core CPU i7-6850K with 64 GB RAM equipped with a NVIDIA Corporation GP102 GPUs
TensorFlow installed from (source or binary):source
TensorFlow version (use command below):tensorflow2-GPU
Python version:3.6

Describe the current behavior
I got the NaN loss when I tried to train my model
Describe the expected behavior
The loss should be a number
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
batch_size = 112
epochs = 119
num_classes = 10
import os
save_dir = 'model'
model_name = 'test971_trained_model.h5'
import tensorflow.keras as keras
(x_train, y_train), (x_test, y_test) = keras.datasets.cifar10.load_data()
print('x_train shape:', x_train.shape)
print(x_train.shape[0], 'train samples')
print(x_test.shape[0], 'test samples')
img_rows, img_cols = x_train.shape[1], x_train.shape[2]
y_train = keras.utils.to_categorical(y_train, num_classes)
y_test = keras.utils.to_categorical(y_test, num_classes)
model = keras.models.Sequential()
model.add(keras.layers.BatchNormalization(momentum = 0.4639004933194679,epsilon=0.6515653837017596))
model.add(keras.layers.PReLU(alpha_initializer='Zeros'))

model.add(keras.layers.Flatten())
model.add(keras.layers.Dense(num_classes))
x_train = x_train.astype('float32')
x_test = x_test.astype('float32')
x_train /= 255
x_test /= 255
model.compile(loss=keras.losses.categorical_crossentropy,optimizer=keras.optimizers.Adadelta(), metrics=['accuracy'])
model.fit(x_train, y_train, batch_size=batch_size, epochs=epochs, verbose=1, validation_data=(x_test, y_test))
print('Test accuracy:', score[1])
model_path = os.path.join(save_dir, model_name)
model.save(model_path)

Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
Epoch 1/119

  112/50000 [..............................] - ETA: 37:05 - loss: nan - accuracy: 0.0804
  448/50000 [..............................] - ETA: 9:20 - loss: nan - accuracy: 0.0826
  784/50000 [..............................] - ETA: 5:22 - loss: nan - accuracy: 0.0778

@bugreporter450,
I did not observe any nan values on running the code with TF v2.3. Please find the gist of it here.
Could you please update TensorFlow to v2.3 and check if you are facing the same issue. Thanks!


"The main branch of Argo Workflows is currently tested on Kubernetes 1.21"

Summary
What change needs making?
We shouldn't be releasing against an unsupported version of k8s, this should be increased and merged back.

Message from the maintainers:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

https://github.com/argoproj/argo-workflows/blob/master/docs/releases.md#release-cycle


Stop downloading Gifs

Is ther any methode to stop downloading gifs?
Or just download mp4, mov ... and not all videos?

Is ther any methode to stop downloading gifs?
Or just download mp4, mov ... and not all videos?

Follow this example (the bottom part of it, blockedExtensions)


Add Fruit Stand image to DockerHub

From a user:
"I actually had a problem with my aws cluster setup.  Dug around the codebase a little and figured out what I was doing wrong.  I'm running pachyderm remotely on AWS and realized that the "fruit stand" image isn't on docker hub, but found the job-shim image instead."
Even though it identical to job-shim, there isn't a good reason not to have the fruit stand image on DockerHub too. In addition to removing a minor hiccup for users, it also encourages the right idea that building your own image for a specific pipeline includes from job-shim -- in this case thats "all_ it includes.
@sjezewski This should be just a one line addition to the deployment scripts you've built.

Closing in favor of #559.


feat:add enum

fix it already

Hi @guaguaguaxia @gasolin i think there is value to expose the enums for all supported formats at a library level so that when someone is using the add method they can use these enums instead of writing strings.

I like the idea, but we need to solve merge conflicts and check if we have added new types since this PR was started.

We do want the data type to be self-detected at some point, but this is a good stepping stone and is still good, even if it is detected at some point.

because my code behind the main branch too much,i need some time to restart the pr

@cachho  hi,pls review this pr when u r free


Problem: Upgrade 2.2.7 to 2.3.0

After upgrading from 2.2.7 to 2.3.0 my scheduler fails with the following error:
FunctionClauseError) no function clause matching in GenServer.whereis/1

The stack trace:
exit: ** (exit) :function_clause
  File "lib/gen_server.ex", line 1007, in GenServer.whereis/1
  File "lib/gen_server.ex", line 824, in GenServer.call/3
  File "lib/task/supervisor.ex", line 363, in Task.Supervisor.async/6
  File "lib/quantum/executor.ex", line 139, in Quantum.Executor.run/4
  File "lib/enum.ex", line 737, in Enum."-each/2-lists^foreach/1-0-"/2
  File "lib/enum.ex", line 737, in Enum.each/2
  File "lib/quantum/executor.ex", line 73, in Quantum.Executor.execute/5
  File "lib/task/supervised.ex", line 88, in Task.Supervised.do_apply/2
  Module "Elixir.Quantum.Executor", in anonymous fn/0 in Quantum.Executor.start_link/2

@barkerja I‘m going to need some more detail to figure this one out. How is quantum configured? Could you please turn on debug logging and share this log?

@barkerja I found the problem and will create a PR for a fix shortly.


OnGroupExpandListener & OnChildClickListener

How i get the OnGroupExpandListener() & OnChildClickListener() ?

In order to set the click listener, just do it as you normally would in a recycler adapter.
There isn't a way to set an expand/collapse handler right now, I would need to add it. How about a virtual method in HeaderViewHolder that you can override? That's probably how I will do it.

I done the click listener but now i am facing the issue in onChildItem position.

With the position you can get access to the data. See for example https://github.com/grennis/ExpandableRecyclerView/blob/master/app/src/main/java/com/innodroid/expandablerecyclerdemo/PeopleAdapter.java#L65 where the people adapter gets the  name of the person.

To know when groups are expanding or collapsing, just override expandItems and collapseItems in your adapter. The position is passed in as an argument.


Standardize formatting of manifests/x/xanderfrangos/twinkletray/1.15.3

Microsoft Reviewers: Open in CodeFlow

@wingetbot run


Breaking issue: No visible @interface for 'OIDAuthorizationResponse' declares the selector 'tokenExchangeRequestWithAdditionalParameters:'

Yesterday my Xcode app and Simulator got updated automatically to the latest version, Xcode 15.3 and IOS 17.4.
After that i tried to run one of my project and it started to fail, i thought it was xcode being xcode and it should be an issue with my project and configuration.
After many research i decided to updated all of my packages. my project include Firebase and GoogleSignIn and some other packages. starting to update one by one i was still getting the same error, then when i reached the GoogleSignIn it was still the same version 7.0.0, i decided to remove it and its implementation from my project.
then all of a sudden the error disappeared! i add it again to my project and then i got a different error inside that library!
the error was:
No visible @interface for 'OIDAuthorizationResponse' declares the selector 'tokenExchangeRequestWithAdditionalParameters:'

i dont know what to do right now, my app depend highly on google sign in and this is breaking that authentication state.
i tried to decrease firebase version and deployment version but none worked so far!

What version of AppAuth are you seeing pulled in? If it's 1.7.0, then you can use this method and pass nil to the additionalHeaders parameter.
https://github.com/openid/AppAuth-iOS/blob/master/Source/AppAuthCore/OIDAuthorizationResponse.h#L123

the AppAuth that i see is indeed 1.7.0, as its shown in the provided image.
i just added GoogleSignIn library and that issue appears.

Gotcha. Please take a look at my previous comment and update your method call. This will unblock you for now while I work on a patch release to add back the method that was removed.

thanks, i checked the previous comment and its code, not sure what you meant by updating my method call.
but this is the code that i use to call the googleSignIn:
`import Foundation
import GoogleSignIn
import GoogleSignInSwift
final class GoogleSignInHelper {
@MainActor
func signIn() async throws -> GoogleSignInResultModel{
    guard let topVC = Utilities.shared.topViewController() else { throw URLError(.cannotFindHost) }

    let gidSignInResult = try await GIDSignIn.sharedInstance.signIn(withPresenting: topVC)

    guard let idToken = gidSignInResult.user.idToken?.tokenString else { throw URLError(.badServerResponse) }

    let accessToken = gidSignInResult.user.accessToken.tokenString
    let name = gidSignInResult.user.profile?.name
    let email = gidSignInResult.user.profile?.email

    let tokens = GoogleSignInResultModel(idToken: idToken, accessToken: accessToken, name: name, email: email)

    return tokens
}

}`
and i wanted to mention that the build fails to run, i am not sure how to update the library code. further assistance is appreciated.
[
https://github.com/google/GoogleSignIn-iOS/assets/40316130/7b275980-b61c-48ef-9c5f-446b9ada07a7
](url)

I apologize. Yes, this problem needs to be fixed here and not with you. AppAuth 1.7.0 is breaking Google Sign-In iOS. I am working on a fix right now.

okay so should i just update my packages to the latest version and it should work fine, right?

You will have to wait on a fix for AppAuth. I am working on it right now. Google Sign-In iOS (GSI) depends upon AppAuth, and a version of AppAuth released that broke GSI. Please stay tuned. Sorry for this disruption.

@RebinX1 would you mind testing again? https://github.com/openid/AppAuth-iOS/releases/tag/1.7.1 should fix the problem you were seeing.
If you're using Swift Package Manager, this patch release is live and Google Sign-In iOS should pull in AppAuth 1.7.1. If you're using CocoaPods, we are pushing the patch release as I type this...and I just got the email that it succeeded.
Please me know if this error or any other error is present. Thanks and sorry for the trouble!

Thanks,
I was having the same error, so thanks for the help!
I added a new https://github.com/openid/AppAuth-iOS.git .in SwiftPackagemanager and the error was resolved😭

Issue is fixed. thank you for the quick support @mdmathias.

Thanks for reporting and your patience!

I ran into similar build issues due to the missing method. Thank you for the quick fix @mdmathias .

is there a fix for this?

@acwints I believe that method was added back in https://github.com/openid/AppAuth-iOS/pull/826, which was included in the 1.7.1 patch release. Please make sure that the version you're using is 1.7.1. Please also let me know if you're seeing any other issue.


Merge up qa-beta with main

Description

Checklist (Definition of Done)

[ ] Unit and integration tests added
[ ] Added test description under Test manual
[ ] Documentation added if necessary
[ ] CI and all relevant tests are passing
[ ] Add the ticket number to the PR title if available, i.e. ROX-12345: ...
[ ] Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.

Test manual
TODO: Add manual testing efforts
# To run tests locally run:
npm run test

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4dd19a2) 7.96% compared to head (a47801b) 8.02%.
 Consider uploading reports for the commit c99d38d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           qa-beta    #161      +/-   ##
==========================================
+ Coverage     7.96%   8.02%   +0.05%
==========================================
  Files           37      37
  Lines          565     561       -4
  Branches       113     111       -2
==========================================
  Hits            45      45
+ Misses         481     477       -4
  Partials        39      39

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Updating schema

Updates the schemas with the latest types.
I made changes with the goal of least disturbance, but would love additional guidance on how to better deal with types (a lot of union types before are now just one type).  I think we could in some cases or not export the types.  I'll flag a couple examples further down

Closing in favor of https://github.com/covid-projections/covid-projections/pull/1064


Could not find a command named "doc".

Greetings!
I know this may be quite trivial,, but when following this guide:
https://dart.dev/tools/dart-doc
to generate dartdoc for my flutter app,
what i get on the terminal when running dart doc .
from the root directory of my flutter app
is just Could not find a command named "doc".
my dart version is
Dart SDK version: 2.15.1 (stable) (Tue Dec 14 13:32:21 2021 +0100) on "linux_x64",
and i have ran dart pub get successfully on the project beforehand.
I also did install and globally activate
https://pub.dev/packages/dartdoc,
but running dart doc . or dartdoc . neither work.
running dart help doc throws the same command,
and running dart help shows me the available commands, none of which is doc.

This seems more like a help/support request than a bug report about the api.dart.dev. For support, go to https://dart.dev/community.


update

Hello @yutiansut! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file QATRADER/trader.py:

Line 91:9: E265 block comment should start with '# '
Line 93:9: E265 block comment should start with '# '
Line 172:21: E265 block comment should start with '# '
Line 228:9: E265 block comment should start with '# '
Line 229:9: E265 block comment should start with '# '
Line 331:80: E501 line too long (84 > 79 characters)
Line 332:13: E265 block comment should start with '# '
Line 349:9: E265 block comment should start with '# '
Line 416:80: E501 line too long (99 > 79 characters)
Line 425:80: E501 line too long (99 > 79 characters)
Line 446:46: W292 no newline at end of file

In the file QATRADER/webhandler.py:

Line 38:80: E501 line too long (124 > 79 characters)
Line 39:80: E501 line too long (137 > 79 characters)
Line 44:80: E501 line too long (153 > 79 characters)
Line 45:80: E501 line too long (80 > 79 characters)
Line 47:80: E501 line too long (82 > 79 characters)
Line 48:80: E501 line too long (82 > 79 characters)
Line 51:17: E722 do not use bare 'except'
Line 63:80: E501 line too long (158 > 79 characters)
Line 71:80: E501 line too long (126 > 79 characters)
Line 72:80: E501 line too long (115 > 79 characters)
Line 75:80: E501 line too long (149 > 79 characters)
Line 89:80: E501 line too long (108 > 79 characters)
Line 94:80: E501 line too long (118 > 79 characters)
Line 97:80: E501 line too long (195 > 79 characters)
Line 103:80: E501 line too long (202 > 79 characters)
Line 117:80: E501 line too long (102 > 79 characters)
Line 118:80: E501 line too long (98 > 79 characters)
Line 120:80: E501 line too long (102 > 79 characters)
Line 121:80: E501 line too long (95 > 79 characters)
Line 127:80: E501 line too long (102 > 79 characters)
Line 128:80: E501 line too long (98 > 79 characters)
Line 149:9: E265 block comment should start with '# '
Line 165:80: E501 line too long (102 > 79 characters)
Line 166:80: E501 line too long (95 > 79 characters)
Line 168:80: E501 line too long (102 > 79 characters)
Line 169:80: E501 line too long (98 > 79 characters)
Line 196:80: E501 line too long (96 > 79 characters)
Line 215:80: E501 line too long (102 > 79 characters)
Line 216:80: E501 line too long (95 > 79 characters)
Line 218:80: E501 line too long (102 > 79 characters)
Line 219:80: E501 line too long (98 > 79 characters)
Line 231:80: E501 line too long (96 > 79 characters)
Line 234:13: E265 block comment should start with '# '
Line 254:80: E501 line too long (94 > 79 characters)
Line 255:25: E265 block comment should start with '# '
Line 290:80: E501 line too long (118 > 79 characters)
Line 291:80: E501 line too long (111 > 79 characters)
Line 303:80: E501 line too long (116 > 79 characters)
Line 321:80: E501 line too long (119 > 79 characters)
Line 343:80: E501 line too long (123 > 79 characters)
Line 368:80: E501 line too long (111 > 79 characters)
Line 375:80: E501 line too long (102 > 79 characters)
Line 376:80: E501 line too long (95 > 79 characters)
Line 378:80: E501 line too long (102 > 79 characters)
Line 379:80: E501 line too long (98 > 79 characters)
Line 386:80: E501 line too long (96 > 79 characters)
Line 403:80: E501 line too long (102 > 79 characters)
Line 404:80: E501 line too long (95 > 79 characters)
Line 406:80: E501 line too long (102 > 79 characters)
Line 407:80: E501 line too long (98 > 79 characters)
Line 419:80: E501 line too long (96 > 79 characters)
Line 432:80: E501 line too long (102 > 79 characters)
Line 433:80: E501 line too long (95 > 79 characters)
Line 443:80: E501 line too long (100 > 79 characters)


fix(accessibility): swap unnecessary html to button to match core carbon

Swap div role="button" to organic button

Thanks for this! I feel like Carbon has flipped between a div and a button a few times now 😆

Not sure why they are flipping but yeah we should stick with as much inherit utility from browsers as we can imo


Olmarkers with html and angular events into the message

feat(olMarker): Add compiled angularjs html and events in label message
I added compile directive to the project and change message template. Now you can send html and angular directives inside the message.
I use it for make closable markers

Hi,
Any example on that one ?

@mfilotto with this code you can create a marker with custom html and in this popup you can use ng-click events.
// Javascript
var html = "
Hello!
 ";
var marker = {};
marker.projection = 'EPSG:3857';
marker.lat = lat;
marker.lon = lon;
marker.style = {};
marker.label = {};
marker.label.message = html;
$scope.markers.push(marker);

// HTML
<openlayers ol-center="position" ol-defaults="defaults" ol-controls="controls" custom-layers="true" height="100%">

</openlayers>


DateTimeInterval support for negative duration (remove precondition checks)

The fixed issue #468 revealed incorrect implementation or misprint in the implementation of - operator which is declared as:
public func - (lhs: Date, rhs: Date) -> TimeInterval {     return DateTimeInterval(start: lhs, end: rhs).duration }
It seems lhs and rhs values are mixed, because lhs one is expected to be bigger by default, especially taking into account #468 agreements. So it must be passed as value to end parameter instead of start.
Right now it leads to crash in release builds because of unexpected behavior in optimistic case.

I've added support for negative intervals in DateTimeInterval. Is now valid to use which end date occurs earlier in time than the start date (it means negative duration).
All comparison and intersects functions adjust bounds (by switching them) if needed.

I don't think the issue is in supporting negative intervals anymore.
The - operator is also implemented backwards. I guess it was working fine before because DateTimeInterval.duration was also backwards before #468.
public func - (lhs: Date, rhs: Date) -> TimeInterval {
	return DateTimeInterval(start: lhs, end: rhs).duration
}

The current implementation is saying that in a - b, a is the start and b is the end time, which is incorrect.

We are facing the same crash with this.

Okay fixed.
Now you a-b remove b absolute time from a (if b is more recent than a you will get negative results).
Also fixed unit tests.


chore: Remove redundant widget icons

Description
Removes all references to WidgetIcons, as the icons now come from the individual widget folders.
Today, we have redundant references to the SVGs which are used to show the widget icons. One in the assets/icons/widget folder and another in the `icon.SVG file within each widget folder.
This PR removes the global list and makes use of the widget configs to render widget icons when needed.
Type of change

Bugfix (non-breaking change which fixes an issue)

How Has This Been Tested?
No new tests are necessary, as this PR intends to remove redundancy.
If all the existing tests pass, we can consider this a success.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented on my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

/ok-to-test sha=ccd5020

/ok-to-test sha=16f57ef


Figure out plugin point to publish to CDN

We need to figure out how consumers of this library should publish chunks to CDNs or other locations and ensure that all project files are still properly linked.
This might be a doc task but might require code changes.

Released in 1.0.0


Select2 v4.* selected, text option not shown

Hi every one,
I have select2 multiple with some initial selected values. Below my code
Html:
<select name="category_id[]" id="category-edit" multiple class="form-control">
  <option value="7" selected>First</option>
  <option value="8" selected>Second</option>
 </select>

Js:
$('#category-edit').select2({
            ajax: {
                url: '/some/ajax/url',
                dataType: 'json',
                delay: 250,
                data: function(params) {
                    return {
                        q: params.term,
                        page: params.page
                    };
                },
                processResults: function(data, page) {
                    return {
                        results: data
                    };
                },
                cache: true
            },
            escapeMarkup: function(markup) {
                return markup;
            },
            multiple: true,
            allowClear: true,
            placeholder: 'Type for search company categories',
            minimumInputLength: 2,
            templateResult: function(company) {
                if (company.name !== undefined)
                    return company.name;
            },
            templateSelection: function(company) {
                // return repo.full_name || repo.text;
                if (company.name !== undefined)
                    return company.name;
            }
        });

But in front view, I have initial selected values without it's text.

This is my code in jsbin https://jsbin.com/gixotequge/edit?html,js,output
Environment
Browsers

[x] Google Chrome
[ ] Mozilla Firefox
[ ] Internet Explorer

Operating System

[x] Windows
[x] Mac OS X
[ ] Linux
[ ] Mobile

Libraries

jQuery version: 2.1.4
Select2 version: 4.0.2

Never mind,
My code should be like this. Problem ini templateResult and templateSelection
$('#category-edit').select2({
            ajax: {
                url: '/some/ajax/url',
                dataType: 'json',
                delay: 250,
                data: function(params) {
                    return {
                        q: params.term,
                        page: params.page
                    };
                },
                processResults: function(data, page) {
                    return {
                        results: data
                    };
                },
                cache: true
            },
            escapeMarkup: function(markup) {
                return markup;
            },
            multiple: true,
            allowClear: true,
            placeholder: 'Type for search company categories',
            minimumInputLength: 2,
            templateResult: function(company) {
                return company.name || company.text;
            },
            templateSelection: function(company) {
                return company.name || company.text;
            }
        });

Thank you very much @fathur ! We had the same problem and I searched hopelessly in StackOverflow until I find this one.

Wow tyvm for the tip, I was gettin crazy trying to find a way to solve this problem, thx man. Peace

@fathur tnx. we have the same problem. i've been stuck for hours.

@fathur Thank you, helped me to solve my problem after 3 hours of debugging in 2021 :D

Helped me in 2022 :)

Thanks @fathur

After a lot of search on Stackoverflow, this was the only solution that worked. Thanks @fathur for saving many many hours for me. May you have all your wishes fulfilled :)

Thanks @fathur it also saving many hours.


Punctuation moved to the next line in Traverse/Parent dialog

<nobr> or whitespace: nowrap? although I'd be really surprised if either is supported in Swing/IntelliJ 🤔


Separate function to create a plane

Current code creates the airplane sprite in-line.  Factor out the airplane creation code into a separate function. Instead of a global airplane variable, use an array, since when we get this working as a game there will be more than one airplane active at a time and we need to keep track of all of them.

Create the airplane sprite and set the registration point:
        const airplane = new createjs.Bitmap(loader.getResult("airplane"));
        airplane.regX = airplane.image.width * 0.5;
        airplane.regY = airplane.image.height * 0.5;
        airplane.angle = 0;
        arrayOfPlanes.push(airplane);

Completed in #6

Completed in #6


[SQL History extension] Add the ability to double click on a history entry

The ADS SQL History extension currently does not have the ability to double click on a history entry.
Proposed feature
Enable the ability for the user to double click on a history entry, to either open the SQL statement(s) in a new window (prefered option in my opinion - other opinions welcome) or execute the SQL directly.

I prefer, on double click, to restore the query directly to editor on cursor position.
For me, opening a new window is a bad thing, because mostly of the time I have several queries at same editor, pivoting between them just selecting the query and running. By that, opening a new window would be not practical.
Plus, if opening at new window, it will opened connected or not? Which connection will be opened? And if the previous window was disconnected?
For the last, if we take any snippet tool as sample, they all paste the snippet at cursor position.
My 2 cents.

@Peter-Msft I just updated the Insiders gallery with a version of the extension that add double-click support, try it out and let me know what you think! You can configure whether it'll open or run the query on double click in the user settings.
Thank you for your feedback!


add Zone of Trust property

Describe what problem your feature request solves
In Rapid Threat Model Prototyping, you have to define a zone of trust level for each element/node. This property can then be used by the threat engine to suggest STRIDE threats, or be used manually by the user. (eg DoS from zone 0 to any other zone, Information Disclosure form higher trust zones to lower trust zones, etc).
Describe the solution you'd like
Add a "zone of trust" property in each element we place on the diagram. It should allow for numerical values between 0 and 9.
Additional context
See also:
https://resources.infosecinstitute.com/topic/rapid-threat-model-prototyping-introduction-and-overview/
https://github.com/geoffrey-hill-tutamantic/rapid-threat-model-prototyping-docs

Labelling this as version 2.0 because version 1.6 is the last version for functional development on versions 1.x

Closing this because we use trust boundaries rather than a numerical zone of trust, and do not want to complicate the lightweight Threat Dragon tool (otherwise we start trying to compete with Microsoft TMT)


⚠ ClamAV has degraded performance

In a978fb4, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 88 ms

Resolved: ClamAV performance has improved in 8cddb84.


Bug on Line 281 on Component Toolbar.react.js

I just remove the line cause it will fire up a not a function on backButtonListener.remove();

Can you tell me something more? :) Why you have this issue? How can I reproduce it? I can't just remove this line, because it has to remove listener when the search is closed :)

it breaks with not a function.

I think its for IOS specific Android Device is Good on removing the listener.

My Bad Its android specific I was tired debugging I just wrap it with (Platform.OS !== 'ios') 👍

Yeah, you're right.
We have a problem with ios. I see now what did you mean.
There is this code:
const addBackButtonListener = (callback) => {
    if (Platform.OS !== 'ios') {
        return BackAndroid.addEventListener('closeRequested', callback);
    }

    return () => {};
};

Don't know why it return's empty function. Better it will return { remove: () => {} }. And the best - don't care about it, it's already done in RN - see https://github.com/facebook/react-native/blob/9ee815f6b52e0c2417c04e5a05e1e31df26daed2/Libraries/Utilities/BackAndroid.ios.js
Should look like this:
const addBackButtonListener = (callback) =>
    BackAndroid.addEventListener('closeRequested', callback);


docs: fixed highlight in docs

Description
Fix highlight when selected and hovered in docs of modelina 😃
Related Issue
Fixes https://github.com/asyncapi/modelina/issues/1719
Checklist

[x] The code follows the project's coding standards and is properly linted (npm run lint).
[ ] Tests have been added or updated to cover the changes.
[ ] Documentation has been updated to reflect the changes.
[x] All tests pass successfully locally.(npm run test).

Additional Notes

@jonaslagoni Please take a look : )

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 92.364%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5869

Relevant Lines:
6193

💛  - Coveralls

Hi @officialasishkumar, can you check why the tests are failing?

Hi @officialasishkumar, can you check why the tests are failing?

PR title. Can you re-run the test

@devilkiller-ag can you take another look 🙂

Seems good to me!

/rtm


Added convenience to TagAny for testing against erased type.

Helps with filtering tags relevant for a particular Kernel.

Thanks!


read.me change

Adding a language

[ ] The code displays "Hello World" (tio.run may help for testing)
[ ] I have no association with the language
[ ] There are no copyright issues with this code
[ ] The language has not been added prior to this pull request
[ ] I have updated the README

Link to programming language:

believe in god


Added Tslint to Botframework-WebChat.

Added ts-linting to the botframework webchat. This change only introduces devDependencies to the project. This change only includes minor changes to address equality and sameness. Two scripts have also been included into the package.json to run ts-lint and fix ts-lint errors.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: adeogunsamuel sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from  to before v5.10.79",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=86d4aedcbc69c0f84551fb70f953c24e396de2d7"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "86d4aedcbc69c0f84551fb70f953c24e396de2d7",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "isofs: Fix out of bound access for corrupted isofs image\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.10.79 by commit 86d4aedcbc69c0f84551fb70f953c24e396de2d7. For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1002073


RxSwift dependency includes deprecated UIWebView API

RxSwift dependency contains references to UIWebView which is now deprecated. Apple starts to reject new applications with references to UIWebView.
RxSwift has a branch swift5.1 without this reference to UIWebView.
NetworkStack should use this branch.

I created a fork to add the possibility to use swift5.1 branch of RxSwift but, as this version is not yet officialy released, we cannot declare this dependency directly in NetworkStack podspec.
https://github.com/QuentinArnault/NetworkStack/tree/feature/upgrade_RxSwift

Hi @QuentinArnault , this issue must be fixed with the new 0.1.7 (which use rxSwift and RxCocoa 5.1)


Fix crash on iOS

Describe your changes
This fixes the following crash on iOS: https://stackoverflow.com/questions/55361057/this-copy-of-libswiftcore-dylib-requires-an-os-version-prior-to-12-2-0
Issue ticket number and link
Checklist before requesting a review
For each PR

[ ] Add Copyright if it missed:
- "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

[ ] I have performed a self-review of my code.
Optional:

[ ] I have checked readme and add important infos to this PR.
[ ] I have added/adapted some tests too.

For core/new feature PR

[ ] I have checked readme and add important infos to this PR.
[ ] I have added thorough tests.

why need /usr/lib/swift, axmol not use swift

We use CocoaPods and some pods use Swift, for example Firebase. "/usr/lib/swift" is added by the pods xcconfig file to fix this issue, but CMAKE_INSTALL_RPATH set by Axmol sets this at the target level and inserts the "@executable_path/Frameworks" before the pod xcconfig.


Issues with peer dependencies found

There is a warning message after npm install:
 WARN  Issues with peer dependencies found
.
└─┬ vite-plugin-svg-icons
  └─┬ svg-baker
    └─┬ postcss-prefix-selector
      └── ✕ unmet peer<EMAIL_ADDRESS>|| 8.x": found 5.2.18

+1

+1

WARN  Issues with peer dependencies found
packages/dt-ebeca-manual
└─┬ vite-plugin-svg-icons
  └─┬ svg-baker
    └─┬ postcss-prefix-selector
      └── ✕ unmet peer<EMAIL_ADDRESS>|| 8.x": found 5.2.18 in svg-baker

https://github.com/RadValentin/postcss-prefix-selector/pull/95

Looking at the messages posted above and at this, I see that svg-baker has a dependency on<EMAIL_ADDRESS>and on<EMAIL_ADDRESS>In the latest versions of postcss-prefix-selector I've limited the versions of postcss that the prefixer supports to 7 and 8 which was causing the errors to show up.
I tested running the prefixer with postcss@5 and the unit tests ran fine so I think it's ok to loosen the version restriction, changed it to "postcss": ">4 <9" in<EMAIL_ADDRESS>TL;DR This should be fixed now, on npm install, svg-baker will pull in the latest prefixer with the new dependency range and it will stop complaining :D

Looking at the messages posted above and at this, I see that svg-baker has a dependency on<EMAIL_ADDRESS>and on<EMAIL_ADDRESS>In the latest versions of postcss-prefix-selector I've limited the versions of postcss that the prefixer supports to 7 and 8 which was causing the errors to show up.
I tested running the prefixer with postcss@5 and the unit tests ran fine so I think it's ok to loosen the version restriction, changed it to "postcss": ">4 <9" in<EMAIL_ADDRESS>TL;DR This should be fixed now, on npm install, svg-baker will pull in the latest prefixer with the new dependency range and it will stop complaining :D

thanks for your time, Sir! and good luck with your library as well.

@JackieCheung this issue is solved, checked it - now it's all gone.


Augmented Backus–Naur Form

ABNF Metalanguage

I merged your definition with a few additional fixes. To not repeat myself I'll just refer to the commit messages: bf61fef, c0a9d80. Feel free to discuss them right here, if needed.
As a bonus, if you could make the test snippet small enough to fit in the code window on https://highlightjs.org/, I'd be happy to add ABNF into rotation.
Thanks for you contribution!


BUG: edit rooms page stuck on loop when there are no rooms

edit rooms page stuck on loop when there are no rooms, its show message "please wait.." and seem that it trying to loading something but there ar no rooms

fixed in this commit


feat(bezier-icons): update icons

Please check the changed part!
This Pull Request was generated by bezier-figma-plugin.

https://github.com/channel-io/bezier-react/actions/runs/7650754086/job/20847359401 pr description업데이트에서 에러가 떴네요.. 확인해보겠습니다


Add CSS class to day name

Implements https://github.com/Hacker0x01/react-datepicker/issues/440
Added a CSS class for days name.

Current coverage is 95.49%

Merging #441 into master will not affect coverage as of 3e656ac

@@            master    #441   diff @@
======================================
  Files            9       9
  Stmts          222     222
  Branches        45      45
  Methods         91      91
======================================
  Hit            212     212
  Partial          2       2
  Missed           8       8

Review entire Coverage Diff as of 3e656ac

Powered by Codecov. Updated on successful CI builds.

See #443


Add configuration option to adjust host and port for websocket server

Is your feature request related to a problem? Please describe.
I am running the bropat/eufy-security-ws docker container. The docker network IP addresses are not static and are prone to change when the container or host are rebooted. When the IP address changes, there is currently no way to update the host IP config (other than manually adjusting the core.config_entities file).
Describe the solution you'd like
There should be an option in the integration config to adjust the host IP.
Describe alternatives you've considered
Manually update the host IP config in the core.config_entities file. This is not user friendly or obvious to most users.
Additional context
Can add this option to the top of the existing configuration options:

Why don't you set a static ip or name to container?

Fair. If we can't add a config option on the front end, maybe a note in the docs to use a static IP?

This is actually much bigger problem exists in home assistant world, i just want to unblock you but i am not against their request.
Until this is done, at least you have a solution in your hands, right?

One more thing, why don't you use host.docker.internal if all containers are running on the same machine, this should work for you given that port 3000 is accessible over host system

Still a docker newbie 😛
But that didn't work unfortunately. The integration wasn't able to connect to the websocket container.


EmbeddedDocument @id changes after every merge()

I'm seeing a strange behaviour atm. I have a document with embedded document. I want to have an id for every EmbeddedDocument. Ids get generated after the document gets flushed initially. But every time I merge() the document to update it, every EmbeddedDocument gets assigned new ids. This is not what I expect. Is it a bug? If now, how do I keep the same Ids after merge()?
/**
 * @MongoDB\Document
 */
class Post
{
    /* ... */

    /**
     * @MongoDB\EmbedMany(targetDocument="Item")
     */
    protected $items = array();
}

/**
 * @MongoDB\EmbeddedDocument
 */
class Item
{
    /**
     * @MongoDB\Id(strategy="AUTO")
     */
    protected $id;

    /* ... */
}

After this action every Item has new $id:
class PostsController extends FOSRestController
{
    /**
     * [PUT] /posts/{slug} "put_post"
     *
     * @ParamConverter("post", converter="fos_rest.request_body")
     * @Rest\View()
     */
    public function putPostAction(Post $post) {

        $dm = $this->get('doctrine_mongodb')->getManager();
        $dm->merge($post);
        $dm->flush();

        return $post;
    }
}

@websirnik could you please create a failing test case?

ping @websirnik

This should be fixed in 1.1.0 thanks to #1424


windows error

python fid_metrics/main.py paths=[C:\Users\prana\OneDrive\Desktop\Synthetic evaluation\videos,C:\Users\prana\OneDrive\Desktop\Synthetic evaluation\synthetic videos]
no viable alternative at input '[C:\Users\prana\OneDrive\Desktop\Synthetic'
See https://hydra.cc/docs/1.2/advanced/override_grammar/basic for details
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
(synt) PS C:\Users\prana\OneDrive\Desktop\Synthetic evaluation>
i ran the code its not working

There is a space in your path. You should wrap it in quotes, e.g., python main.py paths=['xxx xxx', xxx].


issue: the element moving is delay when dragging

vedio are as follow
https://github.com/eeeeeeeason/dailybug/blob/main/BAQIS Cloud development - Google Chrome 2021-07-06 18-02-10.mp4

finally ,i guest this was something wrong with my css but not  js. after i deleted the css attribute "transition: transform .5s; "  i find that everything is ok; and i begin to read through the repo; can i add an filter to prevent the trasition attribute copy from the origin element? if it is ok  , i would like to commit a pr. i'm looking forward to hearing from you

thanks this great repo .

Thanks for the PR!


Ideas for blog content

As we will have a blog soon :partying_face: (see: expressjs.com #1483), it's time to start thinking about the content.
Here are some ideas about recent events that might be good candidates for blog posts:

[x] Blog entry about how to make a blog entry in the expressjs.com blog (lead by @crandmck)
[ ] Blog entry about adopting the OSSF Scorecard in the organization (lead by @inigomarquinez )
[ ] Blog entry for Express 5.0 (inspiration1, inspiration2) (@UlisesGascon )
[ ] Blog entry about the last security releases, see: GHSA-rv95-896h-c2vc (inspiration)
[ ] Blog entry about the Express Forward initiative (see: expressjs/discussions #160) (lead by @import-brain )
[ ] Blog entry about the new Security Working Group (see: expressjs/discussions #165)
[ ] Blog entry about the Revive the Triage Team (see: expressjs/discussions #227) (lead by @CBID2 )
[ ] Blog entry about small tricks to make Express more performance (lead by @carpasse )

If you are interested in working on these items, please let us know. Also, feel free to suggest more topics and ideas (cc: @expressjs/express-tc @expressjs/triagers).

I'll do an entry about the triage team revival @UlisesGascon

As we will have a blog soon 🥳 (see: expressjs.com #1483), it's time to start thinking about the content.
Here are some ideas about recent events that might be good candidates for blog posts:

[ ]  Blog entry for Express 5.0 (inspiration1, inspiration2)
[ ]  Blog entry about the last security releases, see: GHSA-rv95-896h-c2vc (inspiration)
[ ]  Blog entry about the Express Forward initiative (see: expressjs/discussions #160)
[ ]  Blog entry about the new Security Working Group (see: expressjs/discussions #165)
[ ]  Blog entry about the Revive the Triage Team (see: expressjs/discussions #227)

If you are interested in working on these items, please let us know. Also, feel free to suggest more topics and ideas (cc: @expressjs/express-tc @expressjs/triagers).

I can take the Express Forward initiative article!

Fantastic! Thanks for your support @CBID2 and @import-brain. I will add you a leaders for those blog entries :heart:
Please let me know if you have any question (feel free to DM me in Slack or put a comment in #express-triage-team). As the blog structure is not yet ready, my suggestion is try to use a markdown format, so later on it will easy to integrate :+1:

Thanks for kicking this off, @UlisesGascon ... These are all excellent suggestions for posts!
My suggestion is super boring, and could come in with the PR (when it's ready) to add the blog capability itself, and that's a very short post that explains HOW to write a blog post... So meta ;-) Even though it will be pretty simple, it would still be good to have it all laid for contributors ...

I think that is a brilliant idea @crandmck! I added it to the list in bold, let see who wants to lead it :+1:

I would like to take the lead on the first item--and I suggest that it be slightly broader in scope and be something like "Welcome to the Express blog" and just a quick summary of some of the discussion at the last TC meeting:

The initial purpose of the blog will be primarily a communication channel for the TC.
We will also consider posts on select topics nominated by the TC (e.g. as in this issue) to communicate important topics of interest to the Express community.
In the future, we may open up the blog to more general (unsolicited) community contributions when we feel like we have the bandwidth to review them.  Right now, our focus is on on releasing 5.x, fixing errors in the existing docs and generally attending to deferred maintenance on the project.
Simple instructions to write a post: where files go, naming conventions, formatting, etc.

It would be good to have a topic about open-source packages based on "express".


Sea pressure plugin

This PR introduces the following features -

Addition of Sea Pressure sensor plugin in ROS 2 jazzy and gazebo harmonic
Updated SDF with added  Sea Pressure sensor Plugin.

Documentation on how to use the plugin can be found here.

@GauravKumar9920 I've confirmed all fixed and it runs fine :) You may click merge :D


Fix s2n_tls13_support_test and add more validaiton into version extension

Issue # (if available):
Description of changes:
Stuffer blob size is the amount of memory allocated for stuffer, not the amount of written data. Passing it as is causes extesnion parsing to go through uninitialized memory, which sometimes causes extension parsing to succeed, which fails the test.
While in there, changed s2n_extensions_client_supported_versions_process to validate the size of versions list before parsing.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

:exclamation: No coverage uploaded for pull request head (fix-s2n_tls13_support_test@e6a09b7). Click here to learn what that means.
The diff coverage is n/a.


IdentityServer4.Storage Dependency on Microsoft.AspNetCore.Authentication.Abstractions

Question
I'm implementing custom storage using SQL Server (without EF) and I notice that the IdentityServer4.Storage nuget package is carrying a dependency on Microsoft.AspNetCore.Authentication.Abstractions. Because of the dependency it makes any of my libraries that deal with the storage interfaces have to also reference a bunch of ASP.NET Core libraries that are completely unnecessary. I looked through the code and could not find where this package is being referenced.
Is there any reason this dependency can not be removed from the IdentityServer4.Storage library?

I think that's an oversight - feel free to remove it in a PR.


Trying to play rosbag with pyrealsense but get the error: Invalid file format, file does not contain topic "/file_version

Hello! I've recorded a rosbag using the intel realsense depth camera D455. I'm playing the rosbag in one terminal on loop and trying to initialize a pyrealsense2 pipeline but I get the following error:
RunTimeError: Failed to resolve request. Request to enable_device_from_file("testBag.bag") was invalid, Reason: Failed to create ros reader: Invalid file fromat, file does not contain topic "/file_version" nor "/FILE_VERSION"
Here's a code snippit from where the error occours:
import rospy
import cv2
import pyrealsense2 as rs
from sensor_msg.msg import Image
from cv_bridge import CvBridge

def process_image(msg):
    pipeline = rs.pipeline()
    cfg = rs.config()
    cfg.enable_device_from_file("testBag.bag")
    profile = pipeline.start(cfg)

Thanks in advance for any help I can get!

Hi @IcookTacos   If you recorded the rosbag in a ROS terminal then it may not be entirely compatible with being read by the RealSense SDK (librealsense).  The reasons for this are described in the discussion in the link below, which is about a RealSense Python user who experienced the same error.
https://github.com/IntelRealSense/librealsense/issues/3020

Thanks for the response!