EXC_BAD_ACCESS in node::EmitAsyncDestroy

Hi,
I'm occasionally hitting an error in the destructor for AsyncResource. Sorry I don't have a minimal reproduction example yet. I've just started hitting this since migrating js-platform/node-webrtc to AsyncResource. I've got a graph of objects, some of them just ObjectWrap instances and some of the ObjectWrap + AsyncResource instances. The AsyncResource instances wrap libuv's uv_default_loop(). I call Ref when constructing these and Unref in the uv_close_cb. The graph looks like this:
RTCPeerConnection (ObjectWrap, AsyncResource)
  |
  |
  +--> RTCRtpReceiver (ObjectWrap)
         |
         |
         |    MediaStream (ObjectWrap)
         |      |
         |      v
         +--> MediaStreamTrack (ObjectWrap, AsyncResource)

In my tests, I'm only seeing the issues in ~MediaStreamTrack, and then, only occasionally. I'm also not seeing the destructor fire twice or anything like that. Interestingly, if I comment out the node::EmitAsyncDestroy call, I don't see crashes. I'm using Node v9.8.0.
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000100009322 node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) + 18
node`node::EmitAsyncDestroy:
->  0x100009322 <+18>: movq   (%rax), %rax
    0x100009325 <+21>: movq   0x37(%rax), %rax
    0x100009329 <+25>: movq   0x10f(%rax), %rdi
    0x100009330 <+32>: movsd  -0x8(%rbp), %xmm0         ; xmm0 = mem[0],zero
Target 0: (node) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000100009322 node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) + 18
    frame #1: 0x000000010491cbe0 wrtc.node`Nan::AsyncResource::~AsyncResource(this=0x0000000102a02e88) at nan.h:514
    frame #2: 0x00000001049536f6 wrtc.node`node_webrtc::MediaStreamTrack::~MediaStreamTrack(this=0x0000000102a02e70) at mediastreamtrack.cc:44
    frame #3: 0x00000001049539c5 wrtc.node`node_webrtc::MediaStreamTrack::~MediaStreamTrack(this=0x0000000102a02e70) at mediastreamtrack.cc:40
    frame #4: 0x0000000104953a39 wrtc.node`node_webrtc::MediaStreamTrack::~MediaStreamTrack(this=0x0000000102a02e70) at mediastreamtrack.cc:40
    frame #5: 0x0000000104923fbb wrtc.node`Nan::ObjectWrap::WeakCallback(info=0x00007fff5fbf5b48) at nan_object_wrap.h:126
    frame #6: 0x00000001004f3384 node`v8::internal::GlobalHandles::DispatchPendingPhantomCallbacks(bool) + 180
    frame #7: 0x00000001004f36b1 node`v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector, v8::GCCallbackFlags) + 49
    frame #8: 0x0000000100509085 node`v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) + 2533
    frame #9: 0x000000010050800d node`v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) + 733
    frame #10: 0x00000001004c9c92 node`v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) + 82
    frame #11: 0x0000000100774125 node`v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) + 101
    frame #12: 0x00000c0326b842fd
    frame #13: 0x00000c0326c842ab
    frame #14: 0x00000c0326c3d196
    frame #15: 0x00000c0326c09cfc
    frame #16: 0x00000c0326b84239
    frame #17: 0x00000c0326b84101
    frame #18: 0x00000001004bf669 node`v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Handle<v8::internal::Object>, v8::internal::Execution::MessageHandling) + 633
    frame #19: 0x00000001004bf893 node`v8::internal::Execution::TryCall(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Execution::MessageHandling, v8::internal::MaybeHandle<v8::internal::Object>*) + 227
    frame #20: 0x00000001005e1c9e node`v8::internal::Isolate::PromiseReactionJob(v8::internal::Handle<v8::internal::PromiseReactionJobInfo>, v8::internal::MaybeHandle<v8::internal::Object>*, v8::internal::MaybeHandle<v8::internal::Object>*) + 654
    frame #21: 0x00000001005e273c node`v8::internal::Isolate::RunMicrotasksInternal() + 1180
    frame #22: 0x00000001005e15e8 node`v8::internal::Isolate::RunMicrotasks() + 56
    frame #23: 0x000000010497d872 wrtc.node`node_webrtc::PromiseFulfillingEventLoop<node_webrtc::PeerConnection>::Run(this=0x0000000101ff7700) at promisefulfillingeventloop.h:34
    frame #24: 0x00000001049822c0 wrtc.node`node_webrtc::EventLoop<node_webrtc::PeerConnection>::EventLoop(this=0x0000000104982270, handle=0x0000000101ff77a0)::'lambda'(uv_async_s*)::operator()(uv_async_s*) const at eventloop.h:49
    frame #25: 0x0000000104982288 wrtc.node`node_webrtc::EventLoop<node_webrtc::PeerConnection>::EventLoop(handle=0x0000000101ff77a0)::'lambda'(uv_async_s*)::__invoke(uv_async_s*) at eventloop.h:47
    frame #26: 0x00000001019e77cb libuv.1.dylib`uv__async_io + 331
    frame #27: 0x00000001019fa41d libuv.1.dylib`uv__io_poll + 2061
    frame #28: 0x00000001019e7d43 libuv.1.dylib`uv_run + 371
    frame #29: 0x0000000100034b75 node`node::Start(v8::Isolate*, node::IsolateData*, int, char const* const*, int, char const* const*) + 661
    frame #30: 0x0000000100031e83 node`node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) + 435
    frame #31: 0x0000000100031988 node`node::Start(int, char**) + 536
    frame #32: 0x00000001000012c4 node`start + 52

I'm opening this in case there's something obvious here I'm missing. The async hooks functionality is very new to me. If it's not obvious, I'll try to create a minimal repro.
Thanks,
Mark

@ofrobots Any idea what could be up with this?

I built Node 9.8.0 locally and got a more detailed backtrace:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x000000010000c3fc node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) [inlined] void* v8::internal::Internals::ReadEmbedderData<void*>(context=0x0000000000000000, index=32) at v8.h:9183
[opt]
   9180   V8_INLINE static T ReadEmbedderData(const v8::Context* context, int index) {
   9181     typedef internal::Object O;
   9182     typedef internal::Internals I;
-> 9183     O* ctx = *reinterpret_cast<O* const*>(context);
   9184     int embedder_data_offset = I::kContextHeaderSize +
   9185         (internal::kApiPointerSize * I::kContextEmbedderDataIndex);
   9186     O* embedder_data = I::ReadField<O*>(ctx, embedder_data_offset);
Target 0: (node) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x000000010000c3fc node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) [inlined] void* v8::internal::Internals::ReadEmbedderData<void*>(context=0x0000000000000000, index=32) at v8.h:9183 [opt]
    frame #1: 0x000000010000c3fc node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) [inlined] v8::Context::GetAlignedPointerFromEmbedderData(this=0x0000000000000000, index=32) at v8.h:10331 [opt]
    frame #2: 0x000000010000c3fc node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) [inlined] node::Environment::GetCurrent(v8::Local<v8::Context>) at env-inl.h:289 [opt]
    frame #3: 0x000000010000c3fc node`node::EmitAsyncDestroy(v8::Isolate*, node::async_context) [inlined] node::Environment::GetCurrent(isolate=<unavailable>) at env-inl.h:284 [opt]
    frame #4: 0x000000010000c3f7 node`node::EmitAsyncDestroy(isolate=<unavailable>, asyncContext=(async_id = 288081, trigger_async_id = 0)) at async_wrap.cc:801 [opt]
    frame #5: 0x00000001022cf13b addon.node`addon::Foo::~Foo() at nan.h:513 [opt]
    frame #6: 0x00000001022cf124 addon.node`addon::Foo::~Foo() [inlined] addon::Foo::~Foo(this=0x0000000104c412d0) at foo.h:10 [opt]
    frame #7: 0x00000001022cf11f addon.node`addon::Foo::~Foo() [inlined] addon::Foo::~Foo(this=0x0000000104c412d0) at foo.h:10 [opt]
    frame #8: 0x00000001022cf11f addon.node`addon::Foo::~Foo(this=0x0000000104c412d0) at foo.h:10 [opt]
    frame #9: 0x00000001004e3fac node`v8::internal::GlobalHandles::DispatchPendingPhantomCallbacks(bool) [inlined] v8::internal::GlobalHandles::PendingPhantomCallback::Invoke(v8::internal::Isolate*) at global-handles.cc:853 [opt]
    frame #10: 0x00000001004e3f7d node`v8::internal::GlobalHandles::DispatchPendingPhantomCallbacks(this=0x00000001024052e0, synchronous_second_pass=<unavailable>) at global-handles.cc:818 [opt]
    frame #11: 0x00000001004e42e1 node`v8::internal::GlobalHandles::PostGarbageCollectionProcessing(this=0x00000001024052e0, collector=SCAVENGER, gc_callback_flags=<unavailable>) at global-handles.cc:874 [opt]
    frame #12: 0x00000001004f9d9d node`v8::internal::Heap::PerformGarbageCollection(this=0x0000000103000c20, collector=<unavailable>, gc_callback_flags=kNoGCCallbackFlags) at heap.cc:1548 [opt]
    frame #13: 0x00000001004f8d87 node`v8::internal::Heap::CollectGarbage(this=0x0000000103000c20, space=<unavailable>, gc_reason=<unavailable>, gc_callback_flags=<unavailable>) at heap.cc:1169 [opt]
    frame #14: 0x00000001004bb572 node`v8::internal::Factory::NewFillerObject(this=0x0000000103000c00, size=376, double_align=<unavailable>, space=NEW_SPACE) at factory.cc:88 [opt]
    frame #15: 0x0000000100778c35 node`v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [inlined] v8::internal::__RT_impl_Runtime_AllocateInNewSpace(v8::internal::Arguments, v8::internal::Isolate*) at runtime-internal.cc:322 [opt]
    frame #16: 0x0000000100778bea node`v8::internal::Runtime_AllocateInNewSpace(args_length=<unavailable>, args_object=<unavailable>, isolate=0x0000000103000c00) at runtime-internal.cc:315 [opt]
    frame #17: 0x00000ecf4ad842fd
    frame #18: 0x00000ecf4ae37e43
    frame #19: 0x00000ecf4af08129
    frame #20: 0x00000ecf4ae38016
    frame #21: 0x00000ecf4ae09cfc
    frame #22: 0x00000ecf4ad84239
    frame #23: 0x00000ecf4ad84101
    frame #24: 0x00000001004b07ff node`v8::internal::(anonymous namespace)::Invoke(isolate=0x0000000103000cc8, is_construct=<unavailable>, target=<unavailable>, receiver=<unavailable>, argc=5, args=0x00007fff5fbf5de0, new_target=<unavailable>, message_handling=<unavailable>) at execution.cc:145 [opt]
    frame #25: 0x00000001004b0a05 node`v8::internal::Execution::TryCall(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Execution::MessageHandling, v8::internal::MaybeHandle<v8::internal::Object>*) [inlined] v8::internal::(anonymous namespace)::CallInternal(callable=Handle<v8::internal::Object> @ r13, argc=5, argv=0x00007fff5fbf5de0, message_handling=kReport) at execution.cc:181 [opt]
    frame #26: 0x00000001004b0988 node`v8::internal::Execution::TryCall(isolate=0x0000000103000c00, callable=Handle<v8::internal::Object> @ r13, receiver=<unavailable>, argc=5, args=0x00007fff5fbf5de0, message_handling=kReport, exception_out=<unavailable>) at execution.cc:233 [opt]
    frame #27: 0x00000001005c763f node`v8::internal::Isolate::PromiseReactionJob(this=0x0000000103000c00, info=<unavailable>, result=0x00007fff5fbf5ee0, maybe_exception=0x00007fff5fbf5ee8) at isolate.cc:3436 [opt]
    frame #28: 0x00000001005c80b4 node`v8::internal::Isolate::RunMicrotasksInternal(this=0x0000000103000c00) at isolate.cc:3509 [opt]
    frame #29: 0x00000001005c6ffa node`v8::internal::Isolate::RunMicrotasks(this=0x0000000103000c00) at isolate.cc:3489 [opt]
    frame #30: 0x00000ecf4af06587
    frame #31: 0x00000ecf4af097c2
    frame #32: 0x00000ecf4ad84239
    frame #33: 0x00000ecf4ad84101
    frame #34: 0x00000001004b07ff node`v8::internal::(anonymous namespace)::Invoke(isolate=0x0000000103000cc8, is_construct=<unavailable>, target=<unavailable>, receiver=<unavailable>, argc=0, args=0x0000000000000000, new_target=<unavailable>, message_handling=<unavailable>) at execution.cc:145 [opt]
    frame #35: 0x00000001004b052c node`v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [inlined] v8::internal::(anonymous namespace)::CallInternal(message_handling=kReport) at execution.cc:181 [opt]
    frame #36: 0x00000001004b04bd node`v8::internal::Execution::Call(isolate=0x0000000103000c00, callable=Handle<v8::internal::Object> @ r12, receiver=<unavailable>, argc=0, argv=0x0000000000000000) at execution.cc:191 [opt]
    frame #37: 0x0000000100177bf0 node`v8::Function::Call(this=0x0000000103058ce0, context=<unavailable>, recv=<unavailable>, argc=0, argv=0x0000000000000000) at api.cc:5385 [opt]
    frame #38: 0x0000000100025787 node`node::InternalCallbackScope::Close(this=0x00007fff5fbf6320) at node.cc:1316 [opt]
    frame #39: 0x000000010002592b node`node::InternalMakeCallback(env=0x00007fff5fbfea18, recv=<unavailable>, callback=<unavailable>, argc=<unavailable>, argv=0x00007fff5fbf6410, asyncContext=<unavailable>) at node.cc:1351 [opt]
    frame #40: 0x0000000100025ab9 node`node::MakeCallback(isolate=<unavailable>, recv=<unavailable>, callback=<unavailable>, argc=<unavailable>, argv=<unavailable>, asyncContext=<unavailable>) at node.cc:1405 [opt]
    frame #41: 0x00000001022ce077 addon.node`addon::Bar::Run() [inlined] Nan::AsyncResource::runInAsyncScope(this=<unavailable>, target=(val_ = 0x0000000103048628), method=<unavailable>, argc=1, argv=0x0000000103048620) at nan.h:551 [opt]
    frame #42: 0x00000001022ce04a addon.node`addon::Bar::Run(this=0x00000001051bfc80) at bar.cc:35 [opt]
    frame #43: 0x00000001008e8e96 node`uv__async_io(loop=0x0000000101583960, w=<unavailable>, events=<unavailable>) at async.c:118 [opt]
    frame #44: 0x00000001008f8aab node`uv__io_poll(loop=<unavailable>, timeout=<unavailable>) at kqueue.c:0 [opt]
    frame #45: 0x00000001008e9330 node`uv_run(loop=0x0000000101583960, mode=UV_RUN_DEFAULT) at core.c:368 [opt]
    frame #46: 0x00000001000318d2 node`node::Start(isolate=0x0000000103000c00, isolate_data=<unavailable>, argc=<unavailable>, argv=<unavailable>, exec_argc=0, exec_argv=0x0000000102403ed0) at node.cc:4751 [opt]
    frame #47: 0x000000010002f52e node`node::Start(event_loop=0x0000000101583960, argc=2, argv=0x0000000102404500, exec_argc=0, exec_argv=0x0000000102403ed0) at node.cc:4822 [opt]
    frame #48: 0x000000010002f1a4 node`node::Start(argc=<unavailable>, argv=0x0000000102404500) at node.cc:4879 [opt]
    frame #49: 0x0000000100001634 node`start + 52

I ran out of time today, and couldn't take a deeper look; but looking at just the stack, I don't think it is safe to 'do JS or VM operations' from a weak callback (i.e. from GC). GC callbacks do not guarantee that a V8 context is attached when the weak callback is called.

@ofrobots

I ran out of time today, and couldn't take a deeper look; but looking at just the stack, I don't think it is safe to 'do JS or VM operations' from a weak callback (i.e. from GC). GC callbacks do not guarantee that a V8 context is attached when the weak callback is called.

So the weak callback here is the "pending phantom callbacks" invoked by DispatchPendingPhantomCallbacks, which includes the destructor for Foo? Since the context may not be attached, can we just check before calling EmitAsyncDestroy? e.g.,
--- nan.h	2018-05-16 10:24:36.000000000 -0700
+++ nan.h	2018-05-16 10:24:45.000000000 -0700
@@ -510,7 +510,9 @@
   ~AsyncResource() {
 #if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
     v8::Isolate* isolate = v8::Isolate::GetCurrent();
-    node::EmitAsyncDestroy(isolate, context);
+    if (!isolate->GetCurrentContext().IsEmpty()) {
+      node::EmitAsyncDestroy(isolate, context);
+    }
 #endif
   }

In my testing, this seems to work, although I haven't looked to see if it passes existing nodejs/nan tests.

@markandrus that's probably not the right fix – it would work around the issue, but you would potentially leak if there is anything in the application that is keeping track of async resources. You're never calling the destroy hook on the resource in these cases.
My suggestion would be to defer this work to a microtask you post to run later. More elegant solutions might be possible if somehow you can decouple the async resource from the lifetime of your ObjectWrap instance.
@kkoopa

I thought something similar based on the stack trace, but then the documentation needs updating, since it cannot be used with ObjectWrap.

You're right. This might be a common gotcha people run into, and the documentation is worth updating, or perhaps this indicates that there might be a missing abstraction needed here. I'll try to do this once I have some bandwidth available to think. Feel free to go ahead if you have time / motivation, however.

@ofrobots thanks for your response. When you say

My suggestion would be to defer this work to a microtask you post to run later.

Do you mean the work of calling node::EmitAsyncDestroy in the AsyncResource destructor or the work of calling Unref on my ObjectWrap instance?

This might be a common gotcha people run into, and the documentation is worth updating, or perhaps this indicates that there might be a missing abstraction needed here.

I think others may run into this if/when they start heeding the deprecation warning on Nan::MakeCallback, since ObjectWrap + Nan::MakeCallback worked previously, but ObjectWrap + AsyncResource may not (at least if you use the Ref/Unref APIs).

More elegant solutions might be possible if somehow you can decouple the async resource from the lifetime of your ObjectWrap instance.

Hmm, I will think on it. Maybe I could have some AsyncResource* member on my ObjectWrap instance, and then delete it before calling Unref. It feels awkward, though.


Disallow variable redeclaration

This turns on a lint rule for a common, likely error: the redeclaration of a variable.
In a few of the fixes of the existing rules, you'll see that I used let.
Block scope is one of the great features in ES6. It allows the programmer to limit a variable's scope to the block in which it's defined. var is always function-scoped for compatibility with ES5, while const and let are always block-scoped. Using const or let is preferable to using var, since they match the semantics expected by programmers accustomed to C-style languages. Not only do they prevent these accidental re-use errors, they also eliminate the need for an IIFE.
let and const have been enabled by default since the release of Node 4 (which came out about 18 months ago). The server is running 5.10 so we're in good shape.
For safety it would be good to get the CI into parity with the server. Will open a patch for that when I have a moment.

Thanks a lot!
We'll have to do a full sed -i 's/\bvar\b/let/g' *.js lib/*.js at some point.


Campy and psychopy

Hello,
I am using this package to record video using 2 Basler cameras at the same time and it works very well in the win cmd prompt (using 'campy-acquire ./configs/campy_config.yaml’). I would like to integrate this (if possible) in a psychopy experiment (builder).
Do you know if this is possible? And how can I do it? (what should I write in the builder?)
Thanks for your help

You could potentially wrap campy into a PsychoPy plugin (https://www.psychopy.org/usingplugins.html).


Hubot doesn't join channels if NICKSERV_PASSWORD is set

If im setting HUBOT_IRC_NICKSERV_PASSWORD hubot authenticates with nicserv properly but doesn't join any channels afterwards.
changing this line https://github.com/nandub/hubot-irc/blob/master/src/irc.coffee#L187 from
client_options['channels'] = options.rooms unless options.nickpass to client_options['channels'] = options.rooms fixes this for me

Are you forgetting about setting HUBOT_IRC_ROOMS as well?
Closing for now. Will re-open if it's again an issue.

Same issue here but with SASL lol
so this solution is best

changing this line https://github.com/nandub/hubot-irc/blob/master/src/irc.coffee#L187 from
client_options['channels'] = options.rooms unless options.nickpass to client_options['channels'] = options.rooms fixes this for me

than
      bot.addListener 'notice', (from, to, text) ->
        if from is 'NickServ' and text.toLowerCase().indexOf('identify') isnt -1
          bot.say 'NickServ', "identify #{identify_args}"
        else if options.nickpass and from is 'NickServ' and
                (text.indexOf('Password accepted') isnt -1 or
                 text.indexOf('identified') isnt -1)
          for room in options.rooms
            @join room

My solution for SASL

        else if from is 'SaslServ' and text.indexOf('Last login from') isnt -1
          for room in options.rooms
            @join room


Card block authoring compatablity

Fixed the Cards block to work with "two up, three up, four up, five up" section-metadata styles so it operates the same as all the other blocks in two-five up sections.

Adding any of the style tokens "two up, three up, four up, five up" work for all blocks in a section EXCEPT the Card block. The Card block only works with "2 up, 3 up, 4 up" etc. The Card block also gets auto columns if nothing is specified (3 columns).
Having two different naming conventions for this creates a lot of confusion and questions from authors.
Resolves: MWPW-129763
Test URLs:

Before: https://main-card--milo--adobecom.hlx.page/drafts/rparrish/columns-test?martech=off
After: https://rparrish-card--milo--adobecom.hlx.page/drafts/rparrish/columns-test?martech=off

The before is broken, do you just want to compare it to the main branch or main-card?

@mokimo - I've added those extra 'four-up' & 'five-up' examples in the doc and fixed the link on the 'before'.
Thanks for the feedback.


Add example implementation of access control

New interface (issue #10249) and new implementation (issue #10250).
Implementation is all in-memory and uses only static storage and stack
(no heap).
Some details missing (e.g. CAT support) but most is here, though not yet
hooked up to other code.
Comes with unit tests.

Fast track: change made by domain owner,  had significant feedback that was addressed, has several checkmarks


Resize the rendered sprite alone

Is there a way to resize/scale the sprite alone without scaling the area() collider?
When I try to dynamically set player.width = 16 inside update(), it doesn't resize the sprite (it actually does nothing) but it modified the width field in the game object.
Weird thing is that,
when I use rect() instead of sprite(), the player.width = 16 actually works!

you can use https://kaboomjs.com/#scale and a specific area size...

yes, scale() also resizes the area() collider, when I again resize the area() collider with the original size, it messes up the collisions, and sometimes the object clips through other solid()s


Show version that enables the feature if not supported in currently selected version

Problem you would like to solve
When using properties that are not supported in the currently selected platform version (e.g. Camunda Platform 8.0), the only statements I get from error messages is that the field is not supported (by Camunda 8):

Proposed solution
I would like to see the version which makes the desired property available. The error message could state something like:
"Not supported in current version, but in Camunda Platform 8.1"
or
"Not supported in current version, but in a future release"
This would give me some insight on the evolution of the capabilities I have available to design and enhance my process.
Also, marking properties that are not available in the current version would help to sort out quickly what I can actually do.
Alternatives considered
As an alternative, not available options could be filtered out.
Pro: Cleaner working environment
Con: No awareness of features in newer versions.
Additional context
With regards to the evolution of Camunda 8, it would make sense to raise awareness of feature evolution and not leaving a user with a simple "Not supported" which is frustrating.

Makes sense to have a clear message around "how to fix the error". In this case, it would be "upgrade to newer version".
I will move this to the backlog. Thank you for reporting!

CC @christian-konrad We'll not immediately follow up on this.

Options for messaging to consider:

Dedicated Supported in Camunda Platform >= 8.1 appendix.
[...] is supported from Camunda Platform >= 8.1 only

Frameworks, IDEs etc. show things like
 is only available in iOS 13 or newer
so what about
[...] is only supported by Camunda Platform 8.1 or newer

Perfect. Let's take that one.

Moving to ready. If there is capacity, let's act on it soon, otherwise Wintersweep candidate.

Based on discussions in https://github.com/bpmn-io/internal-docs/issues/644, we should differentiate between two situations/type of messages:

A supported version is already released or known: A <ElementType> is only supported by Camunda Platform 8.1 or newer
We don't know yet when to support it:  A <ElementType> is not supported by <Platform version>

@philippfromme

Based on discussions in bpmn-io/internal-docs#644, we should differentiate between two situations/type of messages:

A supported version is already released or known: A <ElementType> is only supported by Camunda Platform 8.1 or newer
We don't know yet when to support it:  A <ElementType> is not supported by <Platform version>

@philippfromme

This is what I intend to implement. Either the user can choose a different execution platform version that will fix the error (supported by Camunda X or newer) or there is no execution platform version that would fix the error (_not supported by Camunda X).


Demo for inferencing

Hey!
Thank you very much for your great work and the corresponding repository.
Will there soon be a demo for inferencing available?

Hi, thanks a lot for the interest in our work!
We are working on an inference demo based on Lab Collab, hopefully we'll get it ready by end of this week. I'll update this issue as soon as we get it ready
Thanks,
Shahar

Hi!
I'm happy to update that we've just uploaded a lab collab demo, please check it out here:
https://colab.research.google.com/github/amazon-science/glass-text-spotting/blob/master/demo/glass_demo.ipynb
😄

Hi Shahar,
thank you for uploading a demo. I appreciate it a lot.
I'll give it a try in the new year.
All the bests,
Stephan


chore: minor version bumps

CI failed..

Yep, still have to test if the website examples are working so I left it at that for now, PR isn't complete 😅


feat: autopopulate GCF metadata

Fixes: #91

This needs the functionality of PR #278 to be able to add execution_id support.

This PR is no longer needed since @google-cloud/logging PR #400 correctly adds metadata, and console.log on GCF can be used to print messages that show up in the GCP Logs Viewer with the execution_id populated.

@DominicKramer I thought this PR was about entryMetadata.labels. https://github.com/googleapis/nodejs-logging/pull/400 is about serviceContext.

My mistake, I meant to say @google-cloud/logging PR #436 instead of PR #400.


Feature request: add option to disable logs generated by the warmup lambda

Hi there!
First of all, I want to say that I really like this plugin, and it has been helping me to reduce lots of cold starts on some of the projects I've been working on.
But recently, I've been facing some extra costs related to some console.logs set up on the warmup lambda. The cost has been increasing as much as we deploy and create new environments.
I have two proposals to sort this out:

Start using the debug package. This approach would be really good for projects that already use debug because it would only log to the console if the project is with the variable DEBUG=serverless-plugin-warmup:*. Besides, would be easier to get used to projects that do not use debug.

Set a variable only related to the warmup plugin. Something like DISABLE_WARMUP_LOGS. This way, we could implement this function on the warmup lambda code:
const logger = str => if (process.env.DISABLE_WARMUP_LOGS !== 'true') console.log(str);

And replace all the other console.logs with that function. It would be a lighter way because it does not need any extra dependency on our plugin :smile:.

Either way, I think the default behavior for this plugin shouldn't have any logs. This might have been generating extra costs for other projects, and could be good to only turn on the logs for debugging reasons. Maybe creating the logger function like this:
const logger = str => if (process.env.ENABLE_WARMUP_LOGS === 'true') console.log(str);

I am going to submit a PR for this issue.

Took long enough but... feature added in v7.1.0

@juanjoDiaz any plans to support this in a version that works with serverless v2?
Thanks


FR: Diverse Lore to add -2 as an option to Roll Dialogue

It would be nice if the diverse lore feat added a -2 check box for skill checks for thaumaturges that have diverse lore as a feat.
the feat should grant this option in the roll dialogue.
https://2e.aonprd.com/Feats.aspx?ID=3699

this is the fix for that.


how to rsync running machine?

i have running EC2 started by vagrant aws.
i've done update to my application and i want to rsync changes to EC2 with keeping the same url provided by aws.
how?
the documentation:
Upon vagrant up, vagrant reload, and vagrant provision, the AWS provider will use rsync (if available) to uni-directionally sync the folder to the remote machine over SSH.

is misleading as none of the commands is implemented.

It appears that vagrant provision still does not trigger a sync, though vagrant up and vagrant reload do (per the docs). It would be pretty handy to have a command to run the rsync against a running instance!

And that command is - wait for it - vagrant rsync. :)
From the docs. As vagrant supports this, I expect this issue can be closed.


Feature Request: Render LaTeX in articles

Example article:  https://blog.plover.com/math/freyd-theory.html

The article pane is rendered entirely by WebKit, and there’s not much we can do to make WebKit render LaTeX. (Well, we could, but it would probably take six months while we stop work on NetNewsWire itself, and even then there’s no guarantee it would be accepted into WebKit).
I recommend submitting a feature request to the WebKit folks that they add LaTeX rendering.


Improvements to random octonion generation

The docstring of Base.@irrational warns that it should not be used outside of Base. Since we don't need it anyways, this PR stops using it.
It also deprecates octorand([rng]) in favor of randn([rng,] OctonionF64)

The docstring of Base.@irrational warns that it should not be used outside of Base.

Oh, I did not know that! Thanks!
x-ref: https://github.com/JuliaLang/julia/pull/47103, https://github.com/JuliaLang/julia/issues/46531


Home page is not mobile responsive

Need to change styling in home page for better UI.

I would like to work on it.


AltID

Motivation
Many identity provider has both username-like and user_id-like identifier. We need to record both in case username is changed by the user after vaildator.Validate().
To make this new system do a minimal impact on current behaviour, here's a modest change to start.
In the future, some of the user_id-based identifier should be put in Identity field, like twitter, github, discord and minds.
Checklist

[x] Models

[x] Proof
[x] ProofChain

[x] validators

[x] validator.Base

LGTM


Use click command line to start demo service

Description
Use click to write a command line to start demo service.
http://click.pocoo.org/

This is done by #14.


There is no option to pass opts

Never used ex_machina without Ecto under the hood. Today faced with a case when I want to pass Shared options to my Repo's insert function. Barely reviewing the code I found that the "core"  in insert!call doesn't use opts parameter
record
|> cast
|> repo.insert!

and seems there is no way to pass it
So I am looking for something like this
defmodule MyApp.Factory do
  use ExMachina.Ecto, repo: MyApp.Repo, opts: [foobar: :enable]
  ...
end

where later this opts will be passed as a part of the insert

Hi @mojidabckuu I think what you're looking for has an open PR, and we're looking for someone to add tests to it, if you're up for it! https://github.com/thoughtbot/ex_machina/pull/377

I just pushed v2.6.0 of ExMachina which includes passing Repo options to insert/3. Hope that helps with this issue!


adding explicit output for error stream

Fixes the issue discussed in #13.
nohup: redirecting stderr to stdout
This issue occasionally crash git and mess the lock file of a repository.

Looks good, thanks for this :+1: Merging


firefox: 97.0.1 -> 97.0.2; firefox-esr: 91.6.0esr -> 91.6.1esr

Motivation for this change
https://www.mozilla.org/en-US/firefox/97.0.2/releasenotes/
https://www.mozilla.org/en-US/firefox/91.6.1/releasenotes/
https://www.mozilla.org/en-US/security/advisories/mfsa2022-09/
Fixes: CVE-2022-26485, CVE-2022-26486
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Tested firefox-wayland and firefox-esr-wayland on x86_64-linux with sway/wlroots and pipewire.

[x] YouTube (including live)
[x] Webcam
[x] Microphone
[x] Screensharing
[x] WebGL

In title: firefox -> firefox{,-bin} because I thought this didn't bump firefox-bin?

It is like that because I was lazy when creating the PR, it was late at night and ultimately both firefox and firefox-bin ship "Firefox" while firefox-esr ships "Firefox ESR".

Well, for merge-commit message I went much simpler.


Title tab is very large, don't auto scale size

Environment
Windows build number: [run "ver" at a command prompt]
Windows Terminal version (if applicable):

Any other software?

Steps to reproduce
Title tab is very large, don't auto scale size. If I open many tab, i can't click "x" to close this tab (use exit command to exit)
There is many tab but can't see three tab

Expected behavior
Auto scale size title tab as chrome

Actual behavior
Hidden title tab

This is something we're tracking as part of #1375


Use different vaults defined in .ansible.cfg to encrypt variables

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description
I maintain a large set of host_vars containing various variables, some encrypted and some not. Each of these host_vars has variables encrypted with a separate vault password since some teams need access to certain hosts and not others. In my .ansible.cfg I have
vault_identity_list = my_first_vault@~/ansible/passwords/my_first_vault, my_second_vault@~/ansible/passwords/my_second_vault

with each <vault_name>@<password_file> pair being unique for each file. Then, when I go to encrypt a file I simply select which vault ID I want to use to encrypt that file, and get a result like:
secret_key: !vault |
            $ANSIBLE_VAULT;1.2;AES256;my_first_vault
<PHONE_NUMBER>3036663732613030303238663931343336383865323262396330373631393239356530
<PHONE_NUMBER>626136353939333062373333626665383066630a616263633538393132323530633364

When I run ansible-playbook or go to decrypt that file, Ansible will find that vault ID and password combo and decrypt it without prompting me. At present, this works in the plugin!
My feature request is this: allow users to be prompted when encrypting a variable to select from the defined vaults in your .ansible.cfg and encrypt it with that vault ID.
This would also be an alternative nice solution for https://plugins.jetbrains.com/plugin/14353-ansible-vault-integration/tutorials/vault-file-as-script as you could just encrypt your dev/qa/prod variables with different vault IDs.
References
A VScode version of this: https://gitlab.com/wolfmah/vscode-ansible-vault-inline#experimental-vault-id
https://docs.ansible.com/ansible/latest/user_guide/vault.html#encrypting-individual-variables-with-ansible-vault
https://plugins.jetbrains.com/plugin/14353-ansible-vault-integration/tutorials/vault-file-as-script

Hello @BojanOro,
first thank you for using my plugin and the feature request.
That sounds like a really neat feature and a great alternative to the custom script, i will just need some time how to do it. Parsing seems to be very easy, what might take sometime is to figure out which UI to build and how to do it (the docs are very bad here).

Will be available with 2.2.0 (via popup for context menu/unvault intention).
If you encounter any problems, feel free to leave a comment and i will reopen this ticket :)
Short feedback would be highly appreciated, when the new version is available (~ 2-3 days).

Hi Timo, any idea when 2.2.0 will be out? I'm eager to test this out for you!

Sorry, i messed up the ci config and it didn't publish sorry for that. 2.2.0 is currently releasing and will be available at Friday at least.


RANGER-3938: Fix for ranger audits in case of an alias

Fixes RANGER-3938
Lets say for ranger audit, we configure an elasticsearch alias(rollover alias). And if there are 2 or more indices for an alias then audit API doesn't work. Because while fetching the records, ranger uses multi get request on an alias.
It results in below error:
Alias [alias-name] has more than one indices associated with it [[index-000002, index-000001]], can't execute a single index op

Code snippet:
        MultiGetRequest multiGetRequest = new MultiGetRequest();
        for (SearchHit hit : hits) {
            MultiGetRequest.Item item = new MultiGetRequest.Item(index, null, hit.getId());
            item.fetchSourceContext(FetchSourceContext.FETCH_SOURCE);
            multiGetRequest.add(item);
        }

So there can be 2 possible approaches to resolve this:

Approach 1(Quick and fast) [THIS MERGE REQUEST HAS THIS FIX]:

Use hit.getIndex() instead of index(in this case its has alias) for a MultiGetRequest.Item object.
So that all the documents can be get by id with its index only instead of alias.

Approach 2(Change the MultiGet to search) [NOT PART OF THIS MERGE REQUEST]:

POST /_search
{
    "query": {
        "ids" : {
            "values" : ["id1", "id2"]
        }
    }
}

Please review.

@mneethiraj @pradeepagrawal8184 Please review.

@acharneski - will you be able to review this fix in Elasticsearch audit module?


'openssl_pkey_get_private' not found or invalid function name

Hi everybody,
It's my first time using LexikJWTAuthentication and I try to mix it with FosUserBundle. I followed perfectly your documentation but I got an error when I try to POST on /login_check.
Here the error :
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'openssl_pkey_get_private' not found or invalid function name in vendor\lexik\jwt-authentication-bundle\Services\KeyLoader\OpenSSLKeyLoader.php at line 25
The user is correctly logged by the way :
[2016-11-03 15:16:04] security.INFO: User has been authenticated successfully.
You can find my config below:
config.yml
fos_user:
    db_driver: orm
    firewall_name: api
    user_class: ApiBundle\Entity\User

fos_rest:
    routing_loader:
        default_format: json

doctrine_migrations:
    dir_name: "%kernel.root_dir%/migrations"
    namespace: migrations
    table_name: migration_versions
    name: Application Migrations

lexik_jwt_authentication:
    private_key_path: "%kernel.root_dir%/../var/jwt/private.pem"
    public_key_path:  "%kernel.root_dir%/../var/jwt/public.pem"
    pass_phrase:      ''
    token_ttl:        86400

nelmio_cors:
    paths:
        '^/api/':
            allow_origin: ['*']
            allow_headers: ['*']
            allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
            max_age: 3600

security.yml
security:
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username_email

    firewalls:
        login:
            pattern:        ^/api/login
            anonymous:      true
            stateless:      true
            form_login:
                check_path:               /api/login_check
                username_parameter:       username
                password_parameter:       password
                success_handler:          lexik_jwt_authentication.handler.authentication_success
                failure_handler:          lexik_jwt_authentication.handler.authentication_failure
                require_previous_session: false
        api:
            pattern:        ^/api
            anonymous:      false
            stateless:      true
            guard:
                authenticators:
                    - lexik_jwt_authentication.jwt_token_authenticator

    access_control:
        - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/api, roles: IS_AUTHENTICATED_FULLY }

routing.yml
api:
    prefix:     /api
    resource<EMAIL_ADDRESS>api_login_check:
    path:       /api/login_check

I tried many different configurations and I still got this error... any advices ?
Thanks !

Same problem for me. )=

Hi guys,
My guess is that you don't have the OpenSSL extension  (i.e. ext-openssl, see http://php.net/manual/en/book.openssl.php).
A quick way to verify that is to run:
var_dump(extension_loaded('openssl'));

If it returns (bool) false, then you need to install it for using the default encoder with openssl as crypto engine.
Btw, if you want to use phpseclib instead of installing and using openssl, you can with only one config option: See https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/1-configuration-reference.md#crypto_engine

See also this thread http://stackoverflow.com/questions/13121185/system-has-been-disabled-error-message showing that sometimes openssl_* functions are explicitly disabled, you may need to enable them.

Thanks a lot for ur fastest reply ! I forget php had modules sorry :/

Finally ! You had the correct answer. The problem was the module... I don't know why yet but I fixed it.

Thanks a lot mate ! Cya


Fix chunk issue for sherpa

Following :

https://github.com/k2-fsa/icefall/pull/1131
https://github.com/k2-fsa/sherpa/issues/490#issuecomment-1767360266

Replace all .chunk(..., dim=-1) to avoid issue in sherpa (gpu)

Thanks for your contribution!


Possible bug in --trim-file-names implementation

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

[X] I'm reporting a bug unrelated to a specific site
[X] I've verified that I'm running yt-dlp version 2022.11.11 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood
I was using the flag --trim-file-names
I have to say first that current code works, but on a private modification of yt-dlp slightly modified on my side,
the current use of rsplit() shows up as a bug and it doesn't work leaving a long filename not trimmed as soon as it has an extra  '.' (dot) in it's basename (i.e. beside the dot of the extension)
YoutubeDL.py (lines 1327-1331)
            # https://github.com/blackjack4494/youtube-dlc/issues/85
            trim_file_name = self.params.get('trim_file_name', False)
            if trim_file_name:
                no_ext, *ext = filename.rsplit('.', 2)
                filename = join_nonempty(no_ext[:trim_file_name], *ext, delim='.')

if we want to take off the extension, trim the path, and then put the extension back we should use 1 as parameter, rather than 2,
that is:
                no_ext, *ext = filename.rsplit('.', 1)

Hope it helps.
Regards
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
Sorry the bug doesn't show up if I just run yt-dlp on the public implementation, so the output wouldn't give any useful information.
I truly hope you don't block me for this. Thanks.

if we want to take off the extension, trim the path, and then put the extension back we should use 1 as parameter, rather than 2, that is:
                no_ext, *ext = filename.rsplit('.', 1)

The issue with that is that subtitles, infojson etc have 2 extensions, like .info.json/.en.srt etc

Thank you for the quick answer.
Best.

The issue itself is a duplicate of https://github.com/yt-dlp/yt-dlp/issues/2314

Sorry the bug doesn't show up if I just run yt-dlp on the public implementation, so the output wouldn't give any useful information.

In the future, even if you don't think there is no "usefull" information in the logs, provide it anyways. If the issue were not already known, the issue description lacks enough information which the verbose log would actually provide

Okay, I will. Even if coming from my personal implementation.

Even if coming from my personal implementation.

wdym? The bug is known to exist in yt-dlp

wdym? The bug is known to exist in yt-dlp

The problem I was having with my personal implementation forked from your version 2022.10.04
has now disappeared with the version 2022.11.11 in the test case I was using.
I reported here because I felt there still was a problem not understanding that 2 on the instruction filename.rsplit('.', 2)
By a short debugging I see that the filename is still split on the 'unwanted' dot on the basename, but then the the line
               filename = join_nonempty(no_ext[:trim_file_name], *ext, delim='.')
seems to work a bit differently than before, so that the filename gets shortened enough for the file to be downloaded.

Maybe a general fix could be that if in the variable force_ext in the line
                   filename = replace_extension(filename, force_ext, info_dict.get('ext'))
appear n dots, then when later trimming we do could use
               no_ext, *ext = filename.rsplit('.', n+1)
And similarly do the same in the code
if tmpl_type in ('', 'temp'):
    final_ext, ext = self.params.get('final_ext'), info_dict.get('ext')
    if final_ext and ext and final_ext != ext and filename.endswith(f'.{final_ext}'):
        filename = replace_extension(filename, ext, final_ext)

A bit cumbersome but probably the problem would then appear very rarely. Just an idea.

Maybe a general fix could be that if in the variable force_ext in the line
 filename = replace_extension(filename, force_ext, info_dict.get('ext'))
appear n dots, then when later trimming we do could use
 no_ext, *ext = filename.rsplit('.', n+1)

That sounds good. Will you make a PR?

I've never done a pull request (blush). But I can learn it and do in the next 10 days or less (I'm extremely busy these days
Would that be good for you?

sure, take your time

if we want to take off the extension, trim the path, and then put the extension back we should use 1 as parameter, rather than 2, that is:
                no_ext, *ext = filename.rsplit('.', 1)

The issue with that is that subtitles, infojson etc have 2 extensions, like .info.json/.en.srt etc

hi I was using yt-dlp and I came across this bug I see that it has not been fixed yet and you mention that the proposed solution was not accepted because of .info.json/.en.srt extensions.
But if you know about this type of extensions, couldn't you see which is the biggest extension of characters and put it as a condition in an if? I know that maybe it is not ideal but isn't it better than not working?
I mean something like this
           if trim_file_name:                 no_ext, *ext = filename.rsplit(".", 2)                 if len(ext[0]) >= 4:                     no_ext, *ext = filename.rsplit(".", 1)                 filename = join_nonempty(no_ext[:trim_file_name], *ext, delim=".")


Fix unable to backup namespaced resources

The kube-resources-autosave script is unable to find the list of namespaces
and so it tries to backup resources from null namespace.
Log from kube-resources-autosave-dumper:
(...snip...)
++ jq -r .metadata.name
+ for ns in '$(jq -r '\''.metadata.name'\'' < ${DUMP_DIR}/namespaces.json)'
+ echo 'Searching in namespace: null'
+ mkdir -p /kube-resources-autosave/tmp/2017-05-09_15-18-57/null
Searching in namespace: null
(...snip...)

@cheungpat Nice find 👍 LGTM

Codecov Report

Merging #632 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #632   +/-   ##
=======================================
  Coverage   38.26%   38.26%
=======================================
  Files          51       51
  Lines        3316     3316
=======================================
  Hits         1269     1269
  Misses       1845     1845
  Partials      202      202

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6b5d5e...9eb24c0. Read the comment docs.

Good catch 👍 Thanks for the fix @cheungpat!


steal/buildjs exit code on fail

Running ./js steal/buildjs package/package.html returns an exit code of 0 even if an error is encountered. It is suggested that an error code of 1 should be returned if a build fails.

True, but when I checked how to do this, I couldn't find out (the problem is Rhino/Java related - JS doesn't know about exit codes). Do you have any ideas?

There's got to be a way for Rhino to exit with an error code. I know you can in Java.

Could this be (part of) the solution? https://github.com/jupiterjs/steal/pull/73

That looks like a start. Though exit status of the java command is still 0 following error.

I've managed to mock up a working version with correct error codes by adding quit(1) in a couple of places in setTimeout of steal/rhino/env.js. It's not pretty, or the right way to put a fix in. I guess the best way would be to find the highest throw/catch or to have the equivalent of if(hasErrors){ quit(1) } somewhere.


Add methylDackel

This PR includes methylDackel.
Installation sequence for tool-installers

[ ] Test using @galaxybot test this
[ ] Inspect CI output for expected changes
[ ] Deploy using @galaxybot deploy this if test install was successful
[ ] Merge this PR

@galaxybot make fix

This is what you mean @mvdbeek?

@galaxybot test this

@galaxybot deploy this


Upload whereabouts binary as release asset

The binaries (built for amd64, arm64 and arm) are uploaded using a
Github workflow every time a new Github release is created. This
simplifies consumption of these binaries by other projects, and creates
an "official" build.
Signed-off-by: Antonin Bas<EMAIL_ADDRESS>

I created a test release in my fork to validate this workflow: https://github.com/antoninbas/whereabouts/releases/tag/v0.5.0-alpha.1 (notice the assets).
$ wget -q https://github.com/antoninbas/whereabouts/releases/download/v0.5.0-alpha.1/whereabouts-amd64
$ chmod +x whereabouts-amd64
$ ./whereabouts-amd64
whereabouts v0.5.0-alpha.1 linux/amd64

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 40.786%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
436

Relevant Lines:
1069

💛  - Coveralls


optional graph parameter to create the database

optional graph parameter to create the database, also refactored mutable futures from graph init

Any updates on this or did you decide to abandon the effort?

its sort of on pause at the mo. I completely abandoned scarango and using rest api since I need to push live soon. but planning to come back and change many things

I'm sorry to hear that you've had to go directly to REST.  When you're ready to come back to Scarango let me know and I'd be happy to help work through the problems with you.

Closing this PR as I've just added complete database management functionality to the driver.


Fix broken comments

Thanks for catching this, @pasin.  This must be AndroidStudio's code formatter.
Let me know if you notice anything else like this.  Happy to fix it.
-blake

Coverage increased (+0.2%) to 77.765% when pulling c732949e42218e8a7bdecbd8991b331f3eefa4f1 on feature/fix-comments into 6cc59fa7a50e79c8b96be6eda716c0d4885a2e36 on master.


Customize scrollbar to fit the theme colors

Issue
Closes #4727: Sidebar's transient scrollbar doesn't fit in the Dark Theme
Approach
The 'webkit' API works on Chrome, but Firefox ignores it and uses it's own fancy scrollbar when 'webkit' is used (can't seem to change any properties). It's better than the current look, but still doesn't fit our theme, plus it makes the product look different on different browsers.
Firefox now supports the new 'scrollbar' API, so we can now tweak the scrollbar, but the API only provides limited attributes.
Don't wanna complicate things by using Javascript, so we'll use Firefox's limited attributes as the common denominator and just live with a plain, rectangle scroll bar BUT with better color to match the theme.
I think this color works for both lbry.tv and Odysee (both light and dark on each platform).

This looks great! I think this should only happen on windows/linux though.

@seanyesmunt, ah yes, forgot to mention that I didn't test on mac.
Is there an easy way to not include _scrollbar.scss globally when mac is detected?

@seanyesmunt. Ah, I found it ... in ui\index.jsx

@seanyesmunt  Hm ... it didn't work.  Was hoping to do something like the following, but import only works at the top level.
Is there an easy way to not include _scrollbar.scss globally when mac is detected?
// Import our app styles
// If a style is not necessary for the initial page load, it should be removed from `all.scss`
// and loaded dynamically in the component that consumes it
import 'scss/all.scss';

// Apply global scrollbar customization
const IS_MAC = process.platform === 'darwin';
if (IS_MAC) {
  import 'scss/component/_scrollbar.scss';
}

Update
Assuming I understand the change-request correctly, the second commit covers it.  See commit message for details.

Sorry I missed these messages. Was trying to get an app release out last week but have been having some build issues so this is going in too! Your solution looks great.


[firebase_messaging]: Firebase service worker gets re-registered with default URL even though previous, custom registration took place

Is there an existing issue for this?

[X] I have searched the existing issues.

Which plugins are affected?
Messaging
Which platforms are affected?
Web
Context
From what I understand of the web service worker documentation, even after flutter_service_worker.js has been registered with the top level scope /, firebase-messaging-sw.js, which is the default service worker URL of the Firebase JS SDK and Flutterfire, will not be downloaded through flutter_service_worker.js. I understand that all service workers are downloaded either regularly or through the browser cache. Because of this, firebase-messaging-sw.js may be cached and updated versions may be ignored by web clients. And because of this, the developer needs to append a version number to force the browser to fetch the updated version : firebase-messaging-sw.js?v=VERSION.
Expected results
Flutterfire automatically registers firebase-messaging-sw.js for the developer.
The following documentation explains how to perform custom registration of the Firebase service worker:
https://firebase.google.com/docs/cloud-messaging/flutter/receive#web
From there, it is theoretically possible to append a v=VERSION query string parameter to the URL.
Actual results
Even though the following code is executed:
<script src="flutter_bootstrap.js" async>
  if ('serviceWorker' in navigator) {
    window.addEventListener('load', function () {
      navigator.serviceWorker.register('firebase-messaging-sw.js?v=VERSION', {
        scope: '/firebase-cloud-messaging-push-scope',
      });
    });
  }
</script>

Flutterfire and/or the Firebase JS SDK seems to re-register 'firebase-messaging-sw.js' afterwards, with the same scope. Therefore, the previous registration is lost and of no use.
Reproducing the issue

create a Flutter application and set up Flutterfire
make sure you create a firebase-messaging-sw.js in your web folder (even an empty file)
open your browser dev tools, Network pane, and run your application.
firebase-messaging-sw.js is either downloaded or obtained from the browser cache. It is not obtained from flutter_service_worker.js.
now perform custom registration. as indicated above. You will see that the custom registration code is executed successfully, the Firebase JS SDK seems to override things and re-register the service worker with the default URL 'firebase-messaging-sw.js', with no appended version number.

Firebase Core version
3.2.0
Flutter Version
3.24.3

Hi @andynewman10, thanks for the report. However, I need some clarification. I couldn't find any reference in the documentation about attaching version numbers to firebase-messaging-sw.js. If I missed something, could you please provide more context?

@SelaseKay as the Flutter application gets updated on its web site, resources need to be re-downloaded by web browsers. The Flutter service worker handles all the caching except for its own URL, flutter_service_worker.js. To make sure the latest flutter_service_worker.js file gets retrieved by the browser clients, a version number is typically appended to the URL. This way, there is no need for cumbersome server-side no-caching directives.
For Firebase and Flutterfire, this also remains true : the browser client needs to make sure the latest version of firebase-messaging-sw.js is retrieved. For this to happen, the client typically wants to append a version number to the URL here as well. That's what I'm doing in the registration code above, but Flutterfire overrides that registration and does it again.


Update Kotlin to 1.1.0

Thanks! To be sure this library remains compatible with 1.0.x we will not update it though.


docs: add did resolution docs

Signed-off-by: Daniel Bluhm<EMAIL_ADDRESS>

Example in the doc doesn't currently work due to #1228. I plan to update the example once we have a fix for that.

Codecov Report

Merging #1229 (9531b93) into main (2ff1ddb) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 9531b93 differs from pull request most recent head 2be277c. Consider uploading reports for the commit 2be277c to get more accurate results

@@           Coverage Diff           @@
##             main    #1229   +/-   ##
=======================================
  Coverage   98.41%   98.41%
=======================================
  Files         457      457
  Lines       25477    25477
=======================================
  Hits        25072    25072
  Misses        405      405


fix: Hide inline popover on click outside only

The first commit add the inline popover in the link example. You can see that we can't select the input because the popup disappear on mouseup event.
Also, we can't select the input if we add @mousedown.prevent on it.
So, to prevent this, I added some code to check if the click event performs inside the popup.
But I'm not sure if it's the good way to fix this behaviour. And maybe we can add an option for this...

@ManUtopiK Thanks for raising this bug. For this particular issue (clicking an <input> inside an inline menu would close the menu), after some thought, I decided to use @zag-js/dismissable to handle the DOM event for me. You can see the code at https://github.com/ocavue/prosekit/pull/317.
However, the current <InlinePopover> still leaks some functionality to support a proper inline link menu. I will do some refactoring for <InlinePopover> and provide link menu examples.


Fix Boost warnings

Currently, I'm getting a bunch of warnings like this:
boost_warnings.txt
I wonder it that happens because we include some files (like ArborX_BoostRTreeHelpers.hpp) which have <boost/*> includes directly into other ArborX files, without making use of corresponding Boost targets (which, I think, would set the proper SYSTEM).

@aprokop are you still seeing this issue?

Yes. Here are some examples:
/home/xap/local/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/boost-1.68.0-j2mqoxflxrkb5c27hqgzp3yer5aepbtp/include/boost/get_pointer.hpp:48:46: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
/home/xap/local/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/boost-1.68.0-j2mqoxflxrkb5c27hqgzp3yer5aepbtp/include/boost/mpl/set/aux_/item.hpp:47:70: warning: friend declaration 'char (& boost::mpl::operator||(const boost::mpl::s_item<T, Base>&, boost::mpl::aux::type_wrapper<T>*))[boost::mpl::s_item<T, Base>::order:: value]' declares a non-template function [-Wnon-template-friend]

Please share your compile command (make VERBOSE=1)

This is the log file of ninja -v: make.log.

/home/xap/local/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/boost-1.68.0-j2mqoxflxrkb5c27hqgzp3yer5aepbtp/include/boost/get_pointer.hpp:48:46: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]

You could define BOOST_NO _AUTO_PTR for this one.
The other one, I am seeing when compiling deal.II all the time, too. I have not found any other solution then simply suppressing it.

This is weird, I don't see the path to your Spack install on the compile line.  If you look at the builds on Jenkins, we do use -isystem for Boost headers.

@dalg24 I have spack modules loaded. They modified LD_LIBRARY_PATH and CPATH, so you won't see the spack install path. (Not sure if this is what you are asking).

Directories in CPATH will be included with the -I option.  See doc.

Some more info. I don't like the option of not loading spack modules and specifying them explicitly. This also does not solve the gcc warnings.
However, in the link that @dalg24, there is a solution:
$ export CPLUS_INCLUDE_PATH=$CPATH

This results in no warnings for me.


[WIP] chore: upgrade to cosmwasm 0.15

upgrade all contracts to cosmwasm-std 0.15
blockers: official release of cw20 0.7, terraswap 2.3 PR (https://github.com/terraswap/terraswap/pull/16), after which I'll fix up pesky test problems and clippy

@MSNTCS I can't change the branch the PR merges into because I'm unable to create a branch on Anchor-Protocol/anchor-token-contracts since I don't have permissions to it.


How to fix "No connection" error?

Hi, I'm using your WebView for my app SlimSocial for Facebook.
Some users have written me that when they use my app, they receive the Facebook message "no internet connection".
Without your webview all works. What could it be? I think that the webview blocks some Facebook connections but I have no idea why and where I can fix it.
Thank you

Thanks!
The link for that attachment has expired, it seems. So it cannot be viewed anymore.
So what is Facebook's "No internet connection" message exactly? Is the internet connection really gone? In that case, that would hardly be an error in this library and you could just check for an active internet connection with the respective Android APIs. If the connection is not actually gone, why is that message shown by Facebook?
The latter seems to be your question as well. But without any information about that error message shown by Facebook, and without any information on how to re-produce this, fixing this (whatever it is) will be hard.

Without your webview all works.

What does that mean? You can't just have the same functionality by removing this library. Did you replace this library with Android's built-in WebView and you've been able to verify then that the error does not occur anymore? Or did you refer to normal usage of Facebook in one's favorite browser (where this doesn't seem to happen)?

The screen error is this .
The Android built-in WebView seems work without problems!

Sorry, have never seen this and have really no idea what is causing Facebook to show this.
The logic that decides when to show this is certainly implemented in site-specific code by Facebook, so debugging what must happen for Facebook to show this is probably the only solution available here.

Please re-open if you find out or know what we can do here. Thanks!


Fresh Install - a few bumps

Hi!
I am opening this issue as a follow up on #8 and #9 .
I performed a fresh install on OSMC 2016.10-1 and hit a few bumps.
I am listing them down, hoping they can be corrected or maybe help others.

flexget fails to install

As reported in #8 , there are problems when installing flexget.
I followed the suggestions there and did:
sudo apt-get remove python-pip
sudo easy_install -U pip
sudo pip install -r reqs.txt

where reqs.txt has
funcsigs
futures
tzlocal>=1.2
babelfish>=0.5.5
rebulk>=0.7.0
functools32
MarkupSafe
plumbum

After this, flexget is working fine.
I was not yet able to reproduce the problem reported in #9.

subliminal fails to execute

As flexget failed to install during install.sh execution, subliminal did not install.
I installed it after installing flexget with
sudo pip install subliminal

motdis not updated

The reference to the motd script in install.sh is incorrect.
It should be (line 98)
bash "$INSTALLATION_FOLDER/bash/install_motd.sh"

otherwise, you'll get
bash: /home/osmc/.raspberry-osmc-automated/bash/motd.sh: No such file or directory

during the installation.

There is no check for an existing Downloads folder

The installation script does not check if the /home/osmc/Downloads folder exists.
If it doesn't, flexget will fail on execution with
2016-11-05 15:00 CRITICAL manager                       [/tasks/sort-files/filesystem/path] `/home/osmc/Downloads/` does not exist
2016-11-05 15:00 CRITICAL manager                       Failed to load config file: Did not pass schema validation.

Perhaps this could be automated?

Transmission UI whitelist is not configured

When the installation is done, if you navigate to http://IP:9091, you'll get:
403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.

This is because /home/osmc/.config/transmission-daemon/settings.json is misconfigured.
Lines 50-51 should read (assuming you are on network 192.168..):
    "rpc-whitelist": "<IP_ADDRESS>,192.168.*.*",
    "rpc-whitelist-enabled": true,

Perhaps this could be automated?
In any case, for troubleshooting, here's a reference link: TransmissionHowTo - Community Help Wiki

jsonrpc requests fail

This could be added to troubleshooting.
If you are getting
--2016-11-05 15:43:19--  http://localhost/jsonrpc
Resolving localhost (localhost)... ::1, <IP_ADDRESS>
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|<IP_ADDRESS>|:80... failed: Connection refused.

when the wget cron entries run, make sure that the web server port is correctly configured as 80 in Kodi.
Reference link: Webserver - Official Kodi Wiki

README enhancements - move installation stuff away, flexget execute

One entry to the README file could be something like:
Once the installation is done and successful, you can erase the following files:

install.sh
installation.log

Also, the command for flexget (line 75) should be:
	/usr/local/bin/flexget execute

Add a mail client to the additional packages list

Since many cron jobs are running, eventually a few mails will appear.
It would be a nice addition to have a mail client (e.g. mutt) added to the additional packages.

crontab improvements

I changed a couple of things in the crontab: output suppression and fix of the find command. Here are my changes:
--- crontab.original	2016-11-05 20:42:22.617129894 +0000
+++ crontab.final	2016-11-05 20:41:23.117157286 +0000
@@ -1,7 +1,7 @@
-@reboot /usr/local/bin/flexget daemon start -d
+@reboot /usr/local/bin/flexget --loglevel critical daemon start -d
 @hourly /usr/local/bin/flexget --loglevel verbose --cron execute
-@hourly wget --header='Content-Type: application/json' --post-data='{"method": "VideoLibrary.Scan", "id":5,"jsonrpc":"2.0"}' http://localhost/jsonrpc -O /dev/null
-@daily wget --header='Content-Type: application/json' --post-data='{"method": "VideoLibrary.Clean", "id":5,"jsonrpc":"2.0"}' http://localhost/jsonrpc -O /dev/null
+@hourly wget --quiet --header='Content-Type: application/json' --post-data='{"method": "VideoLibrary.Scan", "id":5,"jsonrpc":"2.0"}' http://localhost/jsonrpc -O /dev/null
+@daily wget --quiet --header='Content-Type: application/json' --post-data='{"method": "VideoLibrary.Clean", "id":5,"jsonrpc":"2.0"}' http://localhost/jsonrpc -O /dev/null
 # Delete images, text files and existing subtitles. Then delete any empty dir in Downloads.
-@hourly find /home/osmc/Downloads/. \( -name "*.jpg" -o -name "*.png" -o -name "*.txt" -o -name "*.url" -o -name "*.nfo" -o -name "*.srt" \) -delete && find /home/osmc/Downloads/. -type d -empty -delete
-@hourly /usr/local/bin/subliminal download -l en -s /home/osmc/TV\ Shows/* --age 1w
+@hourly find /home/osmc/Downloads/. \( -name "*.jpg" -o -name "*.png" -o -name "*.txt" -o -name "*.url" -o -name "*.nfo" -o -name "*.srt" \) -delete && find /home/osmc/Downloads/. -mindepth 1 -type d -empty -delete
+@hourly /usr/local/bin/subliminal download -l en -s /home/osmc/TV\ Shows/* --age 1w  > /dev/null

Thanks for your work and HTH!
Bernardo

Thank you Bernardo!
This really helps as the code has not been tested for a greater release of 2015.08-1 and when I do it this is going to clear the path, I will certainly use your tests to make ti work with the latest version.
Some comments on each of the steps you mentioned:

and 2) For the latest version of OSMC it looks like this dependencies changed all over again. It's very fragile, I have tagged current repository state as working for the release 2015.08-1 and next commits will be towards 2016-*
Changed
I only tested the script when having external storage. I guess you didn't add external storage so this is why it failed. These folders need to be created because all the rest of the scripts depend on them, so I corrected this in the commit.
This is supposed to be done here https://github.com/alombarte/raspberry-osmc-automated/blob/master/bash/install_transmission.sh#L22 I will check later if this fails for any reason. Or it's just maybe than now "rpc-whitelist-enabled": true is also needed because now is false by default.
I don't see why should have this error... The crontab precisely uses this addresses. Where this comes from?
Definetely
The script install_additional_packages.sh adds sendmail (which I use to have the updates in my gmail inbox). If I add mutt, which is a great idea, there should be also some indications/process to have emails running.
I've added your suggestions, I also put as critical when flexget runs. This was verbose after the development phase and never changed.

Thank you very much!

Hi again!
Some further comments.

👍
👍
👍
You are correct, I did not add external storage.
Looking at ~/.raspberry-osmc-automated/bash/settings.cfg shows that TRANSMISSION_WHITELIST_RANGE was set correctly. I don't know what happened :/ Anyway, it seems that your comment on the rpc-whitelist-enabled property is correct.
I guess I had this problem by enabling/disabling the Kodi webserver and setting it to port 8080. It might be the case for other it port 80 is being used for something else.
👍
👍
Cool! I have two updated suggestions for the crontab
9.1 I added the redirection below because you can see flexget results in its log and more often then not, I would get an email with There is a FlexGet process already running for this config, sending execution there..

--- crontab.original	2016-11-12 15:29:28.224983974 +0000
+++ crontab.final	2016-11-12 15:29:08.564947971 +0000
@@ -1,5 +1,5 @@
-@reboot /usr/local/bin/flexget --loglevel critical daemon start -d
-@hourly /usr/local/bin/flexget --loglevel critical --cron execute
+@reboot /usr/local/bin/flexget --loglevel critical daemon start -d > /dev/null
+@hourly /usr/local/bin/flexget --loglevel critical --cron execute > /dev/null
 @hourly wget --quiet --header='Content-Type: application/json' --post-data='{"method": "VideoLibrary.Scan", "id":5,"jsonrpc":"2.0"}' http://localhost/jsonrpc -O /dev/null
 @daily wget --quiet --header='Content-Type: application/json' --post-data='{"method": "VideoLibrary.Clean", "id":5,"jsonrpc":"2.0"}' http://localhost/jsonrpc -O /dev/null
 # Delete images, text files and existing subtitles. Then delete any empty dir in Downloads.

9.2 In README.md - Deleting seen shows, you mention:

In the crontab there is a commented job that deletes TV shows that are marked as seen by Kodi after 1 month. If you want to enable this feature just uncomment the line in the crontab and save.

I could not find this entry... was it removed?

Thanks,
I added your suggestions to the crontab. Also, it seems that I added the comment mentioning the script to delete shows in the readme but never committed the line. I added a sample in:
https://github.com/alombarte/raspberry-osmc-automated/blob/master/bash/install_crontab.sh#L22
Shouldn't have a fixed path .raspberry-osmc-automated but it's commented anyway.

Cool, thanks!
I'll close this as the open items are improvements.

Feel free to open any issues you consider are worth it, even if they are improvements. Or even better do a pull request ;)
Thank you very much for your deep analysis.

@bernardomaciel Just to explain better in number 5 with we have a issue with transmission daemon ssh server error 403 forbidden I do the below:
sudo chmod 777 -R /home/osmc/.config/transmission-daemon (for me looks like the file dont save after edit just I change the permissions for full read/write access)
sudo service transmission-daemon stop ( stop service beforw edit file)

sudo service transmission-daemon start
Now transmission daemon ssh works for me


Documentation Page

Issue description
Some related things we might want to try

https://docsify.js.org/#/quickstart

Type of Issue

[x] New feature request

https://ucl-candi.github.io/DeepReg/#/  it's deployed and I will go through the docs one by one in another issue


AcMapLayerProviderComponent options input only accept url

In the last version of code, the class "AcMapLayerProviderComponent":
@Component({
  selector: 'ac-map-layer-provider',
  template: '',
})
export class AcMapLayerProviderComponent implements OnInit, OnChanges, OnDestroy {

  /**
   * refer to cesium docs for details https://cesiumjs.org/Cesium/Build/Documentation/ImageryProvider.html
   */
  @Input()
  options: { url?: string } = {};

  ...

should become something like that:
@Component({
  selector: 'ac-map-layer-provider',
  template: '',
})
export class AcMapLayerProviderComponent implements OnInit, OnChanges, OnDestroy {

  /**
   * refer to cesium docs for details https://cesiumjs.org/Cesium/Build/Documentation/ImageryProvider.html
   */
  @Input()
  options: { url?: string, [key:string]: any } = {};

  ...

Declaring options like that allows to add whatever field needed for the chosen provider. Most of them are using much more than just a url.

To more exhaustive, all provider has its own options definition that are declared in cesium.d.ts file. So the input must be one of those type.
Also, url field isn't mandatory as declared on the previous post but the following code check and raise an error if the url isn't declared and the provider isn't OFFLINE.
...

ngOnInit() {
    if (!Checker.present(this.options.url) && this.provider !== MapLayerProviderOptions.OFFLINE) {
      throw new Error('options must have a url');
    }

...

This check should not exist anymore as for exemple 'MapboxStyleImageryProvider' doesn't need any url if styleId, accessToken and username are declared.


fix: 🐛 Table chart fixes

Default background color added to color suggestions

Codecov Report

Merging #198 (d6c03d1) into feat/FEE-644-fonts-and-sliders (f47b6b9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                       Coverage Diff                       @@
##           feat/FEE-644-fonts-and-sliders     #198   +/-   ##
===============================================================
  Coverage                           85.98%   85.99%
===============================================================
  Files                                 467      467
  Lines                                6037     6040    +3
  Branches                              568      568
===============================================================
+ Hits                                 5191     5194    +3
  Misses                                779      779
  Partials                               67       67

Impacted Files
Coverage Δ

src/components/Widget/Widget.styles.ts
40.00% <ø> (-3.75%)
:arrow_down:

src/components/Widget/Widget.tsx
39.65% <ø> (ø)

src/components/ChartWidget/ChartWidget.tsx
97.01% <100.00%> (+0.09%)
:arrow_up:

src/components/ChartWidget/utils/createDataviz.ts
100.00% <100.00%> (ø)

src/modules/theme/utils/getColorSuggestions.ts
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f47b6b9...d6c03d1. Read the comment docs.


What does ownerInjection() do inside a create()?

Given this documentation:

create(arguments)
Creates an instance of a class. Accepts either no arguments, or an object containing values to initialize the newly instantiated object with.

I don't understand the following code:
https://github.com/kaliber5/ember-bootstrap/blob/f0575fae0f5ae42330e8c3b54259dd081e92000d/tests/dummy/app/controllers/demo/forms.js#L15
  login: computed(function() {
    return Login.create(
      getOwner(this).ownerInjection()
    );
  }),

What does this do?

Hey @Redsandro.
Ember has a dependency injection system. Instances of classes belong to an "owner" which is typically the same across all instances.
This comes in handy on the backend environment (Ember uses FastBoot for server-side rendering) where multiple instances of your app can be initialized at the same time in the same JS process. The process needs to distinguish which class instance operates on which app instance.
Though most users do not use server-side rendering, this system is there for everyone.
An owner of a class instance is necessary to access singletons shared across the app instance: controllers, routes, but most importantly services. Without an owner, a class instance can't access any services.
The Login class uses validations why rely on the injection system. Thus, each Login instance requires an owner.
The getOwner(this) function returns an owner of the current class instance. This util can be used on any instance that has an owner.
The ownerInjection method returns an owner in a form that is accepted by EmberObject.create(), which is a soon-to-be-obsolete API and is gonna be replaced with native classes' new keyword.
An alternative way to initialize an instance of a class with an owner is to do getOwner(this).lookup(className). className must be provided in a form base-class:sub-class. Depending on the configuration of the class in registerOptionsForType, lookup() will return either the class, or a freshly initialized class instance, or a singleton class instance.
PS The issue queue is primarily for bug reports and feature suggestions. To receive support, consider asking a question on StackOverflow with the ember-bootstrap tag.

@simonihmig Please use the Filters feature on https://stackexchange.com to subscribe to email notifications for the ember-bootstrap tag.

PS The issue queue is primarily for bug reports and feature suggestions. To receive support, consider asking a question on StackOverflow with the ember-bootstrap tag.

I haven't actively used SO so far. While I can certainly subscribe, the primary channel for questions so far has been the e-bootstrap channel on Discord!

@lolmaus thank you for the detailed answer. I had no idea about the ramifications of (not) setting an owner, even though I use fastboot.
Apologies for writing a question in the issue tracker. FWIW, I was initially going to write a bug report that the example contained what I assumed was obsoleted code, since (1) it worked fine without it and (2) the documentation doesn't seem to mention this argument for create(). I changed my mind because prior experience taught me that I'm usually wrong, and things that seem out of place are usually undocumented Ember features - or probably documented in a place other than the first one or two places I'd look. :sweat_smile:


uv_index, humidity, etc... do not exist in SingleTimeData [Free Plan]

[Flexi Plan]
According to the Weather Data Sections in the git, attributes like uv_index, humidity, dew_point, pressure and visibility are not present.
I get this error for all when I try to access them
Traceback (most recent call last):
  File "d:\OneDrive\Desktop\Coding\Python\Weather.py", line 40, in <module>
    uv = forecast.current.uv_index # type: ignore
  File "C:\Users\rohil\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pymeteosource\data.py", line 153, in __getitem__
    return getattr(self, attr)
AttributeError: 'SingleTimeData' object has no attribute 'uv_index'

Is this not available in the free plan? if it is available, how would I access it?
Thanks!

Hi, the mentioned variables are available in Standard and Flexi subscriptions.

Hi, just recently I have gotten the Flexi plan. Any help where I could get these values from?

Hi, please make sure you are using the correct URL for your API request - subscription plan name is included in the URL. If you have any questions, contact us at support(at)meteosource.com

Hi, turns out I was using "tiers.FREE" instead of "tiers.FLEXI"
My issue has been fixed. Thanks!


Documentation does not say how to mention a user.

I'm trying to mention the user that triggered my bot's action. Following the syntax auto-generated by the Discord app like @user.Username#user.ID but this is just echoed back exactly by end clients. It's not documented how to mention a user, so I assume it's something really obvious, but I can't for the life of me figure it out.

<EMAIL_ADDRESS>

See the Discord API docs: https://discordapp.com/developers/docs/resources/channel#mentions


fix: avoid function properties lost

Fix #160
The compiler.webpack is a function with some properties, they're lost after call function bind. I use proxy to keep them access.

Hi @stephencookdev - thanks for maintaining this plugin. In my project, I have validated that this resolves incompatibilities with webpack 5 as well. We are now using a patch from this pull request. Thanks @hanzooo for the fix as well.

This is awesome @hanzooo, thanks for the fix! I've just tested this all works great 🙂 will merge and release something for this now


Dublicate parameters in URL for the same attribute

Hey, Guys,
For example dublicate the style_bottom parameter:
http://m2.docker/index.php/women/bottoms-women/pants-women.html?_=1466684536936&pattern=195&style_bottom%5B1%5D=107&style_bottom%5B2%5D=108&style_bottom%5B3%5D=109&style_bottom%5B4%5D=110
Thx,

Hello @dimasch
this looks like the URL of a Multiselect. In my eyes fine.

Hello, @GordonLesti
Yes, in url after use multiple select, for details https://yadi.sk/i/nhMJpkV0skmZ7

looks fine to me,
what do you think is the issue?

@GordonLesti  for example   index.php/women/tops-women/cold.html?style_general=117%2C118%2C121%2C122 looks
better for SEO. One parameter with multiple values for improved SEO urls.


Recursion breaks in lambda's bound to a variable with var

(fn range (n)
  (var range-helper (lambda (n acc)
    (if (> n 0)
        (range-helper (- n 1) (cons (- n 1) acc))
        acc)))
  (range-helper n (list)))

(fn main () (print (range 4) "\n"))

(test test-range
  (assert-eq :expected (list 0 1 2 3) :actual (range 4) :description "range n: 4 return (0 1 2 3)")
)

Simpler example
(var foo (lambda (n) (if (> n 0) (foo (print (- n 1) "\n")))))
(fn main () (foo 4))

This was fix with the latest PR


Invariant Violation: findComponentRoot

 <Modal                 isOpen={isUserModalOpen}                 onRequestClose={closeUserModal}                 style={customStyles} className="user-modal">                 <UserForm formData = {userModalData} />             </Modal>
When I try to add a composite component inside the modal, i got below error. I think it's because the modal's render function returns null and insert elements into the ModalPortal. Any suggestions on how to avoid this error?
invariant.js:39 Uncaught Error: Invariant Violation: findComponentRoot(..., .2.0): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a  when using tables, nesting tags like , , or , or using non-SVG elements in an  parent. Try inspecting the child nodes of the element with React ID ``.
UserForm is just a dynamic form from redux-form lib:
const { Component } = React;
const { reduxForm } = require("redux-form");
const Fields = require("./schema/fieldsGenerator");
class UserForm extends Component {
addField(field) {
    if (!_.isEmpty(field)) {
        switch (field.type) {
        case "group":
            return (

{field.header}

                {field.children.map(( childField ) => {
                    return this.addField(childField);
                })}

);
        case "text":
            return (

                {field.label}
                <input key={field.name} { ...field }/>

);
        case "button":
        case "dropdown":
        case "radio":
        case "checkboxList":
        case "react":
        default:
            return "";
        }
    }
}

render() {
    const { onSubmit, formData } = this.props;
    let fields = Fields.fromUserData(formData);
    return (
        <form onSubmit={ _.noop } className="user-modal-form">
            {fields.map((field) => {
                if (field.hasOwnProperty("name")) {
                    return this.addField(field);
                }
            })}
        </form>
    );
}

}
module.exports = reduxForm({ "form": "user-form" })(UserForm);

@guo0693 Can you provide more info on this (react, react-dom and react-modal versions)? If possible, can you make a simple example?
You can use @rmertens' react-modal-bug-example as a bootstrap.

"react": "0.14.2",
"react-dom": "0.14.2",
"react-modal": "^0.6.1"
Will draft an example once I get time.
Thx :)

I got this error on<EMAIL_ADDRESS>but not on<EMAIL_ADDRESS>so I knew it would be something with dependencies.
I fixed it by upgrading React and ReactDOM to 15.0.1 with<EMAIL_ADDRESS>

react and react-dom should really have been peerDependencies
Fails for us otherwise because we have a dependency repo that uses react-modal, linked into main application via npm link. So webpack gets a duplicate React in the bundle.

It's been a while since there was any discussion on this issue.  I'm assuming that it isn't a problem anymore.  If it is, feel free to re-open the issue.

@claydiffrient we moved on to use something else. not sure if the problem got solved or not.


Remove Demo Button => NoDemoList (like the WhiteList)

Thx for all your excellent work!
I fully understand the issues adressed with #547.
Now some themes are getting WhiteListed (#551, #553).
I maintain https://themes.gohugo.io/hugo-theme-w3css-basic and created quite a lot of "lorem ipsum" pages - to full fit the "neutral as possible" constraint.
There is a "Homepage" button which leads to the theme GitHub page (showing the (more or less) same Demo).
The "Demo" button for this theme is now useless as it throws quite a lot of 404 on the rendered pages.
So i ask: is it possible to remove the Demo Button for this theme (hugo-theme-w3css-basic)?
This could lead to a "NoDemoList" of themes. These themes would use their own Demo-Site (using the Homepage-Button).
Kind Regards

Hello @it-fro
The Build Script already has this option and it’s in use: https://github.com/gohugoio/hugoThemes/blob/master/_script/generateThemeSite.sh#L119
Your request also touches upon the discussion in #245
I’m fine about using the Homepage button the way you described if @digitalcraftsman also agrees he can disable your theme’s demo, when he can (I am away at the moment).