JsonLogic - unexpected result after evaluating rule

Environment

Nuget Package: JsonLogic
Nuget Version: 1.3.2
OS: Windows
.Net Target: Net5.0

Describe the bug
JsonLogic does not produce the same output as jsonlogic.com/play.html
Your playground also differs (as it's using the library) https://json-everything.net/json-logic
To Reproduce
Rule:
{
  "if": [
    {
      "var": "data.sub"
    },
    {
      "===": [
        {
          "var": "data.sub.0.element"
        },
        "12345"
      ]
    },
    true
  ]
}

Data:
{
   "data": {
    "sub": [
      {
        "element": "12345"
      }
    ]
  }
}

==> Result is truthy. Adding a different data to the data.sub.0.element field should result in falsy.
Rule:
{
  "if": [
    {
      "var": "data.sub"
    },
    {
      "===": [
        {
          "var": "data.sub.0.element"
        },
        "12345"
      ]
    },
    true
  ]
}

Data:
{
   "data": {
    "sub": [
      {
        "element": "12346"
      }
    ]
  }
}

Shows no result on the playground page (https://json-everything.net/json-logic) and throws an exception in .net code.
Expected behavior
Result should be falsy in the second example (in case I'm getting how jsonlogic works, which I'm not sure about).
The playground on https://jsonlogic.com/play.html shows the output as false
Thanks

Thanks for this report.  I'll get a unit test set up to reproduce.

I can't get this to fail, either in a test or on the website.  I do see the "no response" you're talking about, but that's something in the website, not in the API or the library.  The API returns {"result":false,"errors":null} for the second scenario, which is correct.
Both of your scenarios work for me.  I've uploaded the tests in branch issue-183-rule-eval-wrong so that you can see them.

@JanKnipp is there any more context you can add to this, or were you just having problems with the website?

Sorry, took me a while to respond. I guess I tried to strip down the case and focused too much on the two websites :(
Please see this case:
Rule

{"and":[{"if":[{"var":"data.r.0"},{"in":[{"var":"data.r.0.tg"},["140539006"]]},true]},{"if":[{"var":"data.t.0"},{"in":[{"var":"data.t.0.tg"},["140539006"]]},true]},{"if":[{"var":"data.v.0"},{"in":[{"var":"data.v.0.tg"},["140539006"]]},true]}]}

Data

{"data":{"r":[{"tg":"140539006"}],"t":[{"tg":"140539006"}],"v":[{"tg":"Test"}]}}

[Test]
        public void Issue183_RuleEvaluatesWrong2_Falsy()
        {
            var jsonRule = "{\"and\":[{\"if\":[{\"var\":\"data.r.0\"},{\"in\":[{\"var\":\"data.r.0.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.t.0\"},{\"in\":[{\"var\":\"data.t.0.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.v.0\"},{\"in\":[{\"var\":\"data.v.0.tg\"},[\"140539006\"]]},true]}]}";
            var logic = JsonDocument.Parse(jsonRule);
            var rule = JsonSerializer.Deserialize<Rule>(logic.RootElement.ToJsonString());

            var data = JsonDocument.Parse("{\"data\":{\"r\":[{\"tg\":\"140539006\"}],\"t\":[{\"tg\":\"140539006\"}],\"v\":[{\"tg\":\"Test\"}]}}");

            var result = rule.Apply(data.RootElement);

            JsonAssert.AreEquivalent(false, result);
        }

This will throw an exception as the JsonValueKind is of type object which has not been implemented yet.

Json.Logic.JsonLogicException
HResult=0x80131500
Message=Cannot determine truthiness of Object.
Source=JsonLogic
StackTrace:
at Json.Logic.JsonElementExtensions.IsTruthy(JsonElement element) in json-everything\JsonLogic\JsonElementExtensions.cs:line 39
at Json.Logic.Rules.IfRule.Apply(JsonElement data) in json-everything\JsonLogic\Rules\IfRule.cs:line 42
at Json.Logic.Rules.AndRule.<>c__DisplayClass2_0.b__0(Rule i) in json-everything\JsonLogic\Rules\AndRule.cs:line 21
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at Json.Logic.Rules.AndRule.Apply(JsonElement data) in json-everything\JsonLogic\Rules\AndRule.cs:line 23
at Json.Logic.Tests.GithubTests.Issue183_RuleEvaluatesWrong2_Falsy() in json-everything\JsonLogic.Tests\GithubTests.cs:line 72

Sorry for the confusion
Jan

Another testcase that actually runs but resolves in an unexpected result
Rule:

{"===":[{"reduce":[[{"var":"data.r"},{"var":"data.t"},{"var":"data.v"}],{"\u002B":[{"var":"accumulator"},{"if":[{"var":"current.0"},1,0]}]},0]},1]}

Data:

{"data":{"r":[{"tg":"140539006"},{"tg":"140539006"}]}}

Expected outcome: true
Actual outcome: false
[Test]
        public void Issue183_RuleEvaluatesWrong3_Falsy()
        {
            var jsonRule = "{\"===\":[{\"reduce\":[[{\"var\":\"data.r\"},{\"var\":\"data.t\"},{\"var\":\"data.v\"}],{\"\\u002B\":[{\"var\":\"accumulator\"},{\"if\":[{\"var\":\"current.0\"},1,0]}]},0]},1]}";
            var logic = JsonDocument.Parse(jsonRule);
            var rule = JsonSerializer.Deserialize<Rule>(logic.RootElement.ToJsonString());

            var data = JsonDocument.Parse("{\"data\":{\"r\":[{\"tg\":\"140539006\"},{\"tg\":\"140539006\"}]}}");

            var result = rule.Apply(data.RootElement);

            JsonAssert.AreEquivalent(true, result);
        }

So apparently object truthiness isn't implemented because their docs don't have it.
I've opened https://github.com/jwadhams/json-logic/issues/34 to find out what to do here.

[Test]
        public void Issue183_RuleEvaluateFailArray()
        {
            var jsonRule = "{\"and\":[{\"if\":[{\"var\":\"data.r.0\"},{\"in\":[{\"var\":\"data.r.0.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.t.0\"},{\"in\":[{\"var\":\"data.t.0.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.v.0\"},{\"in\":[{\"var\":\"data.v.0.tg\"},[\"140539006\"]]},true]}]}";
            var logic = JsonDocument.Parse(jsonRule);
            var rule = JsonSerializer.Deserialize<Rule>(logic.RootElement.ToJsonString());

            var data = JsonDocument.Parse("{\"data\":{\"r\":[{\"tg\":\"140539006\"}],\"t\":[{\"tg\":\"140539006\"}],\"v\":[{\"tg\":\"Test\"}]}}");

            var result = rule.Apply(data.RootElement);

            JsonAssert.AreEquivalent(true, result);
        }

When the array is changed to a simple object it will pass again.
Process fails when the content is ValueKind = Object : "{"tg":"140539006"}"
but it seems to work fine when this is a single number.
        [Test]
        public void Issue183_RuleEvaluateNonArray()
        {
            var jsonRule = "{\"and\":[{\"if\":[{\"var\":\"data.r.0\"},{\"in\":[{\"var\":\"data.r.0.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.t.0\"},{\"in\":[{\"var\":\"data.t.0.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.v.0\"},{\"in\":[{\"var\":\"data.v.0.tg\"},[\"140539006\"]]},true]}]}";
            var logic = JsonDocument.Parse(jsonRule);
            var rule = JsonSerializer.Deserialize<Rule>(logic.RootElement.ToJsonString());

            var data = JsonDocument.Parse("{\"data\":{\"r\":{\"tg\":\"140539006\"},\"t\":{\"tg\":\"140539006\"},\"v\":{\"tg\":\"Test\"}}}");
            var result = rule.Apply(data.RootElement);

            JsonAssert.AreEquivalent(true, result);
        }

Yeah, this is all due to the system not knowing how to interpret truthiness for an object.

In the end my second testcase (Issue183_RuleEvaluateNonArray()) was incorrect as i was still using the json-path  which targeted for the first element in the array (data.r.0 instead of data.r) and in the end was only resulting in getting a null value.
When correcting the "working" testcase it also fails now. I was wondering why it succeeded as it should still have been an object.
[Test]
        public void Issue183_RuleEvaluateNonArray2()
        {
            var jsonRule = "{\"and\":[{\"if\":[{\"var\":\"data.r\"},{\"in\":[{\"var\":\"data.r.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.t\"},{\"in\":[{\"var\":\"data.t.tg\"},[\"140539006\"]]},true]},{\"if\":[{\"var\":\"data.v\"},{\"in\":[{\"var\":\"data.v.tg\"},[\"140539006\"]]},true]}]}";
            var logic = JsonDocument.Parse(jsonRule);
            var rule = JsonSerializer.Deserialize<Rule>(logic.RootElement.ToJsonString());

            var data = JsonDocument.Parse("{\"data\":{\"r\":{\"tg\":\"140539006\"},\"t\":{\"tg\":\"140539006\"},\"v\":{\"tg\":\"Test\"}}}");
            var result = rule.Apply(data.RootElement);

            JsonAssert.AreEquivalent(true, result);
        }

Thanks

Still waiting on a response from JSON Logic.  Sorry this is taking a while.

Hi,
no problem - thanks a lot for investigating the issue.
I was able to solve some of my issues by playing around with your code and adding the JsonValueKind for objects to the IsTruthy method, but as you said, we're not sure if this intended behaviour.
public static bool IsTruthy(this JsonElement element)
		{
			return element.ValueKind switch
			{
				JsonValueKind.Array => element.GetArrayLength() != 0,
				JsonValueKind.String => element.GetString() != string.Empty,
				JsonValueKind.Number => element.GetDecimal() != 0,
				JsonValueKind.True => true,
				JsonValueKind.False => false,
				JsonValueKind.Null => false,
				JsonValueKind.Object => element.EnumerateObject().Count() != 0,
				_ => throw new JsonLogicException($"Cannot determine truthiness of `{element.ValueKind}`.")
			};
		}

I did some further tests and possibly identified another area where the expected result differs from what the JsonLogic.com playground suggests and that is with the reduce function.
private JsonElement ApplyRule(string logic, string data)
        {
            var rule = JsonSerializer.Deserialize<Rule>(logic);

            if (rule == null)
            {
                return new JsonElement();
            }

            return rule.Apply(data.ToJsonDocument().RootElement);
        }

[Test]
        public void TestReduce3()
        {
            var rule = "{\"reduce\": [\r\n        [\r\n          { \"var\": \"data.r\" },\r\n          { \"var\": \"data.t\" },\r\n          { \"var\": \"data.v\" }\r\n        ],\r\n        {\r\n          \"\\u002B\": [\r\n            { \"var\": \"accumulator\" },\r\n            { \"if\": [{ \"var\": \"current.0\" }, 1, 0] }\r\n          ]\r\n        },\r\n        0\r\n      ]}";
            var data = "{\"data\":{\"r\":[{\"tg\":\"140539006\"}]}}";

            var result = ApplyRule(rule, data);
			JsonAssert.AreEquivalent(1, result);
        }

{"reduce": [
[
{ "var": "data.r" },
{ "var": "data.t" },
{ "var": "data.v" }
],
{
"\u002B": [
{ "var": "accumulator" },
{ "if": [{ "var": "current.0" }, 1, 0] }
]
},
0
]}

{"data":{"r":[{"tg":"140539006"}]}}

Thanks
Jan

@JanKnipp what are you expecting with that last example, and how does that differ from what you're getting?

@gregsdennis The jsonlogic(.net) playground suggests that it should result in 1 (and that was my expectation) but it results in being 0.

Thanks.  I've pushed the changes to json-everything.net.  Hopefully that gets you a bit closer.  Still waiting on a response from @jwadhams.

I think your last example has more to do with the current.0 than the logic processing itself.  I'm not sure if that expression is resolving properly.

Yeah, I've confirmed that current.0 also doesn't process as expected.  This is likely because internally I convert it to a JSON Pointer /current/0 which then doesn't resolve against {"current":{"var":"data.v"},"accumulator":0}.  /current exists, but /0 is looking for either a property named 0 or the first index in an array, neither of which exist, so the pointer returns null.
null is then translated to a number 0 in .Numberify() for all three data items, and these are summed to give... 0.

I think I figured out what's going on in that last example.
{
  "reduce": [
    [{ "var": "data.r" }, { "var": "data.t" }, { "var": "data.v" }],
    {
      "+": [
        { "var": "accumulator" },
        { "if": [{ "var": "current.0" }, 1, 0] }
      ]
    },
    0
  ]
}

{"data":{"r":[{"tg":"140539006"}]}}

While debugging, I found that when evaluating { "var": "current.0" }, the reduce context is {"current":{"var":"data.r"},"accumulator":0}.  Evaluating current.0 against this correctly produces null.
But what I think is happening on their site is that the values in the array are being recognized as rules and evaluated before they're included in the iteration.  The site doesn't say anything about treating data as a rule, so I'll open an issue for this as well.

I'm not getting any further response.  I think I'm just going to try to emulate their behavior and be done with this.

We got a response from JsonLogic, but upon revisiting it, it seems that my implementation is returning true now.  I had added a RuleCollection class which in essense is an array of rules that is evaluated as a rule.  I think this did it.


Added parameter names

Added parameter names to help with auto complete
Added a typedef for onProgressReceived callback

Merged manually.


⚠ Processors has degraded performance

In 6529d3c, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 50 ms

Resolved: Processors performance has improved in 143103d.


[DOP-1049] Switch to AWS ECR

You should add a release note to releases/notes/1.4.14.md like Katrin did in https://github.com/Vandebron/mpyl/pull/340/files and then whoever merges last needs to fix the merge conflict and combine the file(s)


Optimize Miller loop on fixed pubkeys - expected 37% perf boost

If any of the G1, G2 arguments in the pairing are fixed(ie the public key is static or a constant parameter in the
system) we can have up to 37% faster Miller loop.
Typically BLST is doing that for the generator G, but in consensus systems where validator keys are fixed per epoch, we might be able to precompute stuff:

useful when verifying individual sigs (precompute one part of pairing Miller loop based on individual validator keys)
useful even on batch verification - precompute some known combinations (ie against the aggregated pubKey of most dominant validators

We could build that via some LRU on common validator combinations.
FYI @benr-ml who is working on unfolding BLS batch verification for a different purpose.
Related paper: https://eprint.iacr.org/2010/342

It won't help us too much in case of individual signatures, since we rarely verify those.
As for batch verification - let's first collect some statistics on whether we see common sets of public keys.

I took a closer look at the BLST api, and it only allows pre computation for the right operand, aka the input element from G2, so it won't help us with fixed public keys in min_sig mode, and, as you say @kchalkias, blst already seems to do the pre computation for the G2 generator.


Laravel Echo Server work and client side error only at server

I use laravel echo server and socket.io-client and running at localhost is work at port 6001 and I config at server and use port 8443. Events and laravel echo server work. When client side connect, got 200 success and got Remote Address: ip:443 instead of ip:8443.
laravel 7.0
laravel-echo-server 1.6.3
socket.io-client 2.3.0
Here is link at stackoverflow

https://github.com/tlaverdure/laravel-echo-server/issues/584#issuecomment-962614453

I found solution that is a little code in nginx config. Thanks.


Fix: Allow integer FQNs in references in PhpDocument

Sometimes with incorrect code, a number is parsed as an FQN. When it is added to an array as its key, it will be converted to an integer. This causes a type error when it is added to references.
This fixes an exception that gets thrown when running Performance.php. I also removed the try { ... } catch block from Performance.php, which would make testing of performance changes easier as increased exception rate would not be interpreted as increased performance.

But this does not fix https://github.com/felixfbecker/php-language-server/issues/280, does it?

@jens1o No, this is a separate issue. I'm not exactly sure what triggers this, but I imagine that if php-language-server sees something like new 2;, it will throw an exception. I don't know what the exact incorrect code being parsed needs to be to make PhpDocument throw.

Ah, now I get it. Thank you for elaborating on this and the fix :)

Fix LGTM


3D position from multiple 2D measurements

This is a question about a new module or part of a module for OpenCV, and whether you think it's suitable and desirable.
I have been working on a project that involves estimating the 3D position (or position and velocity) of a point from multiple 2D measurements using the psuedo-linear estimator from Selective angle measurements for a 3D-AOA instrumental variable TMA algorithm.
The inputs are a camera rotation and translation matrix like you get from estimatePoseBoard, the pixel location of the object in the image, and optionally distortion parameters.  Plus time if you want velocity estimated as well.
I have a bit of cleanup and commenting to do to turn it into an OpenCV module/file, but I'd like to know if it would be useful.  Also, would this be best in an existing module, or as a new one?  It doesn't quite fit with any of the existing ones.
I have a demo video of it working on a CHARUCO board and a purple ball, so you can see it converging.  https://www.youtube.com/watch?v=V_wV1LsTBUk  There's no smoothing on the camera pose, so it's a bit wobbly, but as you can see, it estimates just fine.
The reverse (estimating camera location and rotation from world points) using a similar method exists, but I don't have it implemented and that would be a new mode for solvePnP anyway.

I would say, if you are up to it, do make a PR with the functionality. I would also make a new module for this, it can then later be integrated into the part where it fits the most.


upgrade Maven plugins

Motivation:  Maven 'Zip Slip' vulnerability
https://maven.apache.org/security-plexus-archiver.html

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

@axelfontaine


cs setup: Usage of .zprofile/.bash_profile/.profile means that Linux users need to reboot to get an updated PATH

cs setup sets the PATH by writing into these profile files, it seems that the default Terminal on macOS sources these files on startup, but other terminals don't, especially on Linux. This is problematic since it means the only reliable way to get cs setup to work is to ask users to reboot after it completed. Using .bashrc/.zshrc instead isn't a good solution either since some terminals might end up reading .bash_profile but not .bashrc and vice-versa. So perhaps instead we should have a ~/.coursierrc file with:
export COURSIER_CONFIG_SOURCED=1
export PATH=".../coursier/bin/...:$PATH"
export JAVA_HOME=...

then we can add to every bashrc/bash_profile/zshrc/zprofile/profile/whatever the same single line:
[ "$COURSIER_CONFIG_SOURCED" = 1 ] || source ~/.coursierrc

i'd like how rustup do:
#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac


[docs] Document public symbols; satisfy lint/vet.

WIP.

[x] Satisfied golint for most of the render package.
[x] Removed unreachable code: noting that although you had `panic("unreachable"), govet still complained. If there's a reason not to trust in go vet, we should document that + fix go vet.

Remaining:

[ ] Understand the Presenter interface more so we can document it.
[ ] Bind is an exported package-level variable. What is the use-case beyond defaultBind?

Otherwise: great package.

The panic("unreachable") lines were required by Go prior to v1.1, see https://golang.org/doc/go1.1#return.

thanks for the PR! I agree we don't need the panic("unreachable"), this project only works with go 1.7+ anyways.

if you're looking at the render subpkg, I'd love your opinions on #84. I plan to revise render in parts to better consider well-defined request and response payload types. #84 would also likely change some of the Presenter stuff as well.


badge count not working on ios when app is in kill mode or foreground

badge count not working on ios when app is in kill mode or foreground

i am using api for update the badge number

I am having the same problem


Did you ever encounter issues with Trainer's _save_checkpoint and FSDP?

This may be system-dependent and a bit of a long shot, but I'm having some issues running training. All goes seemingly well until _save_checkpoint is called (if it matters, I'm running a toy training session with a dataset of 10 samples), at which point I receive some kind of pytorch synchronization error (originating from a gather op) that indicates that e.g. rank 0's optimizer state has a large number of parameters (presumably, as many as the backbone's) but rank 1's is empty.
I'm using srun on a machine with 4 A40s. Did you ever encounter anything similar?

We did not encounter this problem by running on H100s or A100s.

@geomlyd I encountered exactly the same issue, and setting --resume False did not resolve it. Ultimately, I commented out the _save_checkpoint related code, which enabled the training to complete in a single run, though resuming training became impossible.

I met the same issue, have you ever solved it? @geomlyd

Hello @IceFlameWorm, not exactly: I never managed to get FSDP to run properly. What I did instead, and what seems to work so far, is I switched to using deepspeed. I did this by removing all FSDP-related arguments from the launching script, and by adding the --deepspeed $my_deepspeed_cfg_file argument that is passed on to the base class of HuggingFace's trainer. In case it's helpful, I will also upload here the .json config I used for deepspeed.
Note that I say seems to work because a) I've been able to run some training experiments that did what I expected, but my aim so far was not to reproduce the paper's results, and so I can't confirm that everything runs exactly as it should b) I've noticed that at the very end of training, if there's been a checkpoint resumption in between, the program crashes with some sort of triton-related error message. Nevertheless, this seems to happen after the model has been saved to the disk, and so it doesn't seem to have serious negative effects.
zero2.json

@xiaoqian-shen We both still havn't solve this issue yet, could you share your dev enviroment settings?

All right, maybe your advice is now the only one solution for me.

Hi, @IceFlameWorm
It seems that you are loading the FSDP checkpoint. Remove this file and the checkpoint should be successfully loaded for inference.

Hi, @IceFlameWorm
It seems that you are loading the FSDP checkpoint. Remove this file and the checkpoint should be successfully loaded for inference.

I removed those safetensor files and renamed pytorch_model_fsdp.bin as pytorch_model.bin, then the inference seemed ok.   Is it a right way? @xiaoqian-shen

Hello @orzgugu , I don't think I had to make changes to the code itself. See my comment above: you should remove all fsdp-related arguments provided to train.py, and you should instead use --deepspeed $my_deepspeed_cfg_file with the deepspeed json config I uploaded above (other configurations may work as well).
However, unrelated to FSDP or deepspeed, I made some changes to the code that saves/loads checkpoints, since my cluster environment has time limits on submitted jobs. I got these from some changes I had previously found necessary for making VideoLlaVa's codebase resume training properly. Note that I'm not sure whether things would work just as well without them, I just thought it would be better to do this as a precaution and so far everything has worked. I can't directly upload .py files here, so I link to a repo I've made containing just these files.


Multi-line or multiple validation strings misaligns selection arrow

Detailed description
If you have a long validation string that wraps or have multiple validation strings, this causes the dropdown selection arrow to become improperly positioned . This happens because the SVG is positioned using bottom positioning

Is this issue related to a specific component?
Form component for selection

What did you expect to happen? What happened instead? What would you like to see changed?
Expected everything to stay aligned. Arrow was misaligned. Arrow to stay aligned.

What browser are you working in?
Chrome

What version of the Carbon Design System are you using?
9.0.2, tested also on 9.5.0

What offering/product do you work on? Any pressing ship or release dates we should be aware of?
IBM Product, not blocking any ship

Steps to reproduce the issue

Create a form component with validation set up
Set the data-invalid attribute on the selection.
Either provide it a very long string that will wrap or put multiple divs in the bx--form-requirement component with text in each

Additional information
Screenshot

Possible fix
I have a workaround which seems like it could work. I override bx--select__arrow and unset the bottom, then set top: 2.5rem;.
If you're worried about users not providing a label for their bx--form-item, you could have:
.#{$prefix}--select__arrow {
  fill: #6e32c9;
  position: absolute;
  right: 1rem;
  top: 1.125 rem;
  width: 0.625rem;
  height: 0.3125rem;
  pointer-events: none;
}

label ~ .#{$prefix}--select__arrow {
  top: 2.5rem;
}

This would require users to place the label tag before the svg tag, so documentation would need to be updated accordingly.

@carbon-design-system/design Is multi-line validation error message something we should allow...? Thanks!

The validation messages should be succinct and only a word or two labeling the field as wrong. You can use the inline notification to give the user a better description and steps to resolve. Would this work for your use case? http://carbondesignsystem.com/components/form/usage#validation-and-errors

We're dealing with a bit more complicated logic, where the validity of the options of one of our form fields depends on the number of inputs/outputs defined by the user in another field of the form.
E.g. The user selects Option A for the type field. Types of Option A must have:

Exactly one output object
At least one input object

We would either need multi-line validation or have multiple of the error objects in your example, which wouldn't be located near the invalid control and could cause confusion if other areas are also marked invalid.


Ec/memory profiling fixes

Fixes your issues with the workspace-hack and crate features.

Closed for obsolescence


Fix the app crashes after the user accepts the screen sharing request

Jira issue:
https://glia.atlassian.net/browse/MOB-3232
What was solved?
Based on Media projection service requirements:

[!NOTE]
Call the createScreenCaptureIntent() method before starting the foreground service. Doing so shows a permission notification to the user; the user must grant the permission before you can create the service.
After you have created the foreground service, you can call MediaProjectionManager.getMediaProjection().

After the user accepts the SDK screen-sharing request dialog, we have to follow the following strict steps for media projection flow.

Accept the screen-sharing request(currentScreenSharingRequest?.accept). The core will prepare resources for the screen-sharing and wait for the media projection result from the widgets to start the projection.
Request Media projection permission.
After user approval, start the media projection service.
Wait until the startForeground() function is called. This step is the most important one because otherwise, the system will throw SecurityException.
Notify core sdk that permission is granted(currentEngagement?.onActivityResult())

Also upgraded some libraries to the maximum versions supported by compile SDK version 33, and did some refactoring to move the MediaProjectionService start/stop logic out from the NotificationManager.
Release notes:

[x] Feature
[ ] Ignore
[ ] Release notes (Is it clear from the description here?)
[ ] Migration guide (If changes are needed for integrator already using the SDK - what needs to be communicated? Add underneath please)

Additional info:

[x] Tests updated? Added? Unit, acceptance, snapshots?
[ ] Logging for future troubleshooting of client issues added?

Screenshots:

@DavDo Very informative and useful PR description. It would be great to save it somewhere. Does it make sense to put it as a comment to ScreenSharingUseCase, for example?

@DavDo Very informative and useful PR description. It would be great to save it somewhere. Does it make sense to put it as a comment to ScreenSharingUseCase, for example?

That makes sense. I will try to find a place to put this full description or will split it and put it in places with the appropriate context.

@andrews-moc Could you please review the last f5c2b414ce42832e5f27a375f347f0845e216f2f - commit?


Changes the default implementation of CanWriteSecurityToken

Changes the default implementation of CanWriteSecurityToken in SecurityTokenHandler to ensure backwards compatibility.
It was only implemented in Saml2SecurityTokenHandler, so no other AzureAD SecurityTokenHandlers are able to be used in a RequestSecurityTokenResponse without being inherited and overridden.

@brentschmaltz

Do you want a bug to accompany this PR?

@gislikonrad i am seeing 200 files modified. Can you rebase against dev and resubmit?

The code changes the default implementation of CanWriteSecurityToken that is only in the wstrust branch, so I can't rebase againt dev.

@gislikonrad my bad, i incorrectly assumed dev :-)

@gislikonrad I'm thinking the Saml2SecurityTokenHandler should be modified use this new default.
 I let include you on the PR review.

@gislikonrad we ran out of time, will get this in the July release.

I'm looking forward to the WS-TRUST release. 👍

Issue auto-closed when I was cleaning up the branch... Had some merges that I wanted to get rid of so I could rebase instead.

We were unable to get this in time and it's too far out of date.
We are sorry, but we didn't have the resources.
We do now.


Preview area is not flexible

It cuts off some text when I see extensions and also on markdown previews.

VSCode Version: Code 1.7.2 (7ba55c5860b152d999dda59393ca3ebeb1b5c85f, 2016-11-21T22:01:10.756Z)
OS Version: Darwin x64 16.1.0
Extensions:

Extension
Author
Version

vscode-great-icons
emmanuelbeziat
1.1.26

vscode-auto-open-markdown-preview
hnw
0.0.3

markdown-table-formatter
josa
0.0.4

Theme-MarkdownKit
ms-vscode
0.1.1

seti-icons
qinjia
0.1.3

vscode-icons
robertohuertasm
4.0.4

Spell
seanmcbreen
0.9.1

markdown-pdf
yzane
0.1.4

Steps to Reproduce:

Ok I found something. It only happens if I zoom in with Ctrl + +

#5745


Issue #487 Disable OTA updates and add checklist script

@rasmus-storjohann-PG please review and tweak the "release checklist" if you want to add or change anything.


Uncaught exception handling http error

We are working on a client for parse server, which displays some funny behavior around permissions.  When an unauthenticated client attempts to list a class to which it doesn't have access, the parse server returns 400 BAD REQUEST, with the content:  {code: 119, error: "Permission denied for action find on class _User."}
This results in the following error on the client:
uncaught at handleFetch TypeError: Cannot read property 'map' of undefined
    at http://localhost:3000/static/js/bundle.js:45169:37
    at combination (http://localhost:3000/static/js/bundle.js:38863:30)
    at combination (http://localhost:3000/static/js/bundle.js:38863:30)
    at combination (http://localhost:3000/static/js/bundle.js:38863:30)
    at combination (http://localhost:3000/static/js/bundle.js:38863:30)
    at dispatch (http://localhost:3000/static/js/bundle.js:38323:23)
    at http://localhost:3000/static/js/bundle.js:44782:23
    at http://localhost:3000/static/js/bundle.js:43289:19
    at dispatch (http://localhost:3000/static/js/bundle.js:39018:19)
    at sagaDispatch (http://localhost:3000/static/js/bundle.js:42335:13)

We tried catching this in our HttpClient and disguising it as a 401, thus:
if (status === 400) {
    console.log('Got 400.  ugh.');
    if (json && json.code === 119) {
        console.log(json);
        console.log('Trying to make it look like a 401');
        return Promise.reject(new HttpError('401 UNAUTHORIZED', 401));
    }
}

but we still get the same error as above.  What's the correct way to indicate http errors?

Please use StackOverflow for support. GitHub issues are reserved for bug reports.

Okay, thanks.  Will do.  I did think that an uncaught exception on receipt of a 400 Bad Request was a bug, though.  Is that indeed the expected behavior?

Admin-on-rest doesn't speak HTTP. The handling of HTTP errors is the job of the restClient, which must throw an Error in such cases. Admin-on-rest will display the error message in a notification in that case.

Okay, that makes sense.  We're using the provided fetchJson function, with the following lines
            if (status < 200 || status >= 300) {
                return Promise.reject(new HttpError((json && json.message) || statusText, status));
            }

Is that what you mean by throw?  In any case, it results in the uncaught exception, above, which we see in the js console.  Is that what you mean by notification?

yes, sorry, I meant reject.

An uncaught exception is the expected behavior in that case?

When you throw an error in asynchronous code instead of returning a rejected promise, yes, it results in an uncaught exception. I don't see what we can do about it.

The return Promise.reject() in fetchJson, above, results in an uncaught exception.  This occurs when the rest server returned a 400 as I described.

I can't reproduce the uncaught exception that you show. I've set up a REST server that returns a 400 on the list route, and all I get in the console is a Bad Request error.
Also, the original exception ('Cannot read property 'map' of undefined') may come from admin-on-rest, but since you have bundled your code without source maps it's impossible to debug.

I don't seem to be able to get proper source maps.  We were using create-react-app, per the tutorial, and  'cheap-module-source-map' doesn't seem to do much with chrome.  The best we seem to get is with 'eval' option:
GET https://admin-on-parse.herokuapp.com/parse/classes/_User?limit=10&skip=0 403 (Forbidden)
Error: Forbidden
    at new HttpError (HttpError.js:62)
    at eval (fetch.js:53)
uncaught at handleFetch TypeError: Cannot read property 'map' of undefined
    at eval (webpack:///./~/admin-on-rest/lib/reducer/resource/list/ids.js?:30:36)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at dispatch (webpack:///./~/redux/lib/createStore.js?:179:22)
    at eval (webpack:///./~/redux-saga/lib/internal/middleware.js?:80:22)
    at eval (webpack:///./~/react-router-redux/lib/middleware.js?:22:18)
    at dispatch (webpack:///./~/redux/lib/applyMiddleware.js?:45:18)
    at sagaDispatch (webpack:///./~/redux-saga/lib/internal/utils.js?:233:12)

The error occurs on line 9 of reducer/resource/list/ids.js
With some experimentation, we were able to get our server to return a 403, but note above that even with 403 response we are still getting the same unhandled exception instead of a login screen.
I posted our code in a gist.
Here's our package.json:
{
  "name": "test-admin",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "admin-on-rest": "^0.8.4",
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  },
  "devDependencies": {
    "react-scripts": "0.9.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

Which is confirmed by npm:
$ npm ls --depth=0
<EMAIL_ADDRESS>/home/altaurog/mokriya/test-admin
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>extraneous
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>

I suggest you start by upgrading to the latest admin-on-rest (0.9)

Thanks.  I ran the initial tutorial instructions again to get a fresh install of the latest versions, but I still have the exact same error:
GET https://admin-on-parse.herokuapp.com/parse/classes/_User?limit=10&skip=0 403 (Forbidden)
Error: Forbidden
    at new HttpError (HttpError.js:62)
    at eval (fetch.js:53)
uncaught at handleFetch TypeError: Cannot read property 'map' of undefined
    at eval (webpack:///./~/admin-on-rest/lib/reducer/resource/list/ids.js?:30:36)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at combination (webpack:///./~/redux/lib/combineReducers.js?:132:29)
    at dispatch (webpack:///./~/redux/lib/createStore.js?:179:22)
    at eval (webpack:///./~/react-router-redux/lib/middleware.js?:22:18)
    at eval (webpack:///./~/redux-saga/lib/internal/middleware.js?:80:22)
    at dispatch (webpack:///./~/redux/lib/applyMiddleware.js?:45:18)
    at sagaDispatch (webpack:///./~/redux-saga/lib/internal/utils.js?:233:12)

Could you try our code please?    It's in this gist.  I imagine if we're doing something wrong, you will be able to find it much more quickly than we would.  Right now I feel like we are running around in circles.
Here's the new package.json
{
  "name": "admin-on-parse",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "admin-on-rest": "^0.9.2",
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  },
  "devDependencies": {
    "react-scripts": "0.9.5"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

And for the sake of being thorough:
$ npm ls --depth=0
<EMAIL_ADDRESS>/home/ubuntu/trill/admin-on-parse
├──<EMAIL_ADDRESS>
├──<EMAIL_ADDRESS>
├──<EMAIL_ADDRESS>
└──<EMAIL_ADDRESS>

Incidentally, is there any way to get better source maps with webpack?  I've tried all the options listed in the devtool documentation, but they don't seem to do much, and none of them actually produce the documented source map notation.
Thanks again for your help.  We're exciting about moving forward with admin-on-rest.

Are you aware that the restClient response format changed in 0.9 ? See #385.

Thanks for the pointer.  I've updated our code, but it doesn't address the current issue.  The error is raised before convertHTTPResponseToREST is called.

Ah.  I see my mistake now.  Sorry to trouble you.

Note for anyone still experienceing this in 2019...
My custom dataProvider was using async functions rather than explicit javascript Promises. When the server returned an error response i caught it (just to log it to the console) and threw the error again. That displayed the "Uncaught error exception" message on screen that the OP was seeing.
Replacing my throw err with a Promise.reject(err) did the same thing. I had to rewrite my dataProvider to use promises, just like in the documentation. Too clever for my own good  😏 🔫

Ah. I see my mistake now. Sorry to trouble you.

Mind letting the rest of us know what was wrong?


Native crash in app_process : signal 11 (SIGSEGV) on Pixel Fold Android 14

[x] I have read the FAQ.
[x] I have searched in existing issues.

Environment

OS: macOS or Ubuntu (same issue on both)
scrcpy version: 2.3.1
installation method: manual build
device model: Pixel Fold
Android version: 14

Describe the bug
I am able to connect to the phone using scrcpy and everything works ok while the connection is kept.
The problem appears after I interrupt scrcpy and disconnect the phone. After a period of time, the phone freezes and reboots after a few minutes.
Cmdline: app_process / com.genymobile.scrcpy.CleanUp AAAAAAAAAAACAAAA
pid: 27362, tid: 27362, name: Shutdown thread  >>> app_process <<<
uid: 2000
tagged_addr_ctrl:<PHONE_NUMBER>000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000711ea22260
    x0  000000740e1e4b78  x1<PHONE_NUMBER>001000  x2<PHONE_NUMBER>000001  x3  0000007fdfc65f68
    x4<PHONE_NUMBER>000058  x5<PHONE_NUMBER>263bfc  x6<PHONE_NUMBER>000001  x7<PHONE_NUMBER>000249
    x8  000000711ea22264  x9<PHONE_NUMBER>000001  x10<PHONE_NUMBER>000002  x11<PHONE_NUMBER>bdf000
    x12<PHONE_NUMBER>0035dd  x13<PHONE_NUMBER>001b9c  x14<PHONE_NUMBER>000018  x15<PHONE_NUMBER>000000
    x16<PHONE_NUMBER>782c00  x17<PHONE_NUMBER>776310  x18 000000741d76e000  x19<PHONE_NUMBER>000000
    x20<PHONE_NUMBER>bdf6e4  x21 000000740e1e4b78  x22<PHONE_NUMBER>001000  x23<PHONE_NUMBER>3b0a90
    x24<PHONE_NUMBER>bdf000  x25<PHONE_NUMBER>0040b0  x26<PHONE_NUMBER>000692  x27<PHONE_NUMBER>0002b2
    x28<PHONE_NUMBER>004000  x29 0000007fdfc65fd0
    lr<PHONE_NUMBER>7788f4  sp  0000007fdfc65fa0  pc<PHONE_NUMBER>3b0a94  pst<PHONE_NUMBER>001000

4 total frames
backtrace:
      #00 pc<PHONE_NUMBER>017a94  /system/lib64/libutils.so (android::String16::~String16()+4) (BuildId: 4ce5249405dff1a8480d738901c940d4)
      #01 pc<PHONE_NUMBER>0cd8f0  /apex/com.android.runtime/lib64/bionic/libc.so (__cxa_finalize+144) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
      #02 pc<PHONE_NUMBER>0bfa98  /apex/com.android.runtime/lib64/bionic/libc.so (exit+24) (BuildId: 19c32900d9d702c303d2b4164fbba76c)
      #03 pc<PHONE_NUMBER>0546ec  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 19c32900d9d702c303d2b4164fbba76c)

Are you sure this backtrace appears with scrcpy v2.3.1 (i.e. that it was not generated from a version earlier than v2.2)?
It should not crash that way since v2.2, see discussion: https://github.com/Genymobile/scrcpy/pull/4456#issuecomment-1835842791
Clean your logs (adb logcat -c) and retry scrcpy v2.3.1.

Hi @rom1v, thanks for responding!
I checkend again and the version is indeed 2.3.1. I just rebuilt it:
scrcpy 2.3.1

  User defined options
    buildtype: release
    strip    : true
    b_lto    : true

Found ninja-1.11.1 at /opt/homebrew/bin/ninja

In the issue that you linked the problem seems slightly different (not being able to turn off the display). In my case I can use scrcpy just fine for how long as I need.

The issue, yes, but the comment I pointed to is exactly your problem: a native crash on cleanup (when scrcpy disconnects).
However, in my case, it had no other impact than this stacktrace in logcat.

I checkend again and the version is indeed 2.3.1.

My bad, I checked the wrong commit. The fix is 1beec99f8283713b1fbf0b3704eb4dceecc9a590, which is only on dev branch (it has been written after the 2.3.1 release).

Thanks! When is the fix planned to be merged to main?

Probably when #4473 is complete (it might take some time).
Meanwhile, you can build the dev branch.

I updated to dev branch and the issue is still reproducing (freeze and reboot after a few minutes), but I'm no longer getting the relevant shutdown logs.

Trying to pull relevant logs from the logcat. I'm trying to avoid uploading it here to not leak any private data. Let me know what may help investigate this.
02-01 06:30:17.532 31844 31844 I Choreographer: Skipped 477 frames!  The application may be doing too much work on its main thread.
02-01 06:30:17.574  1025 28259 I WifiHAL : Creating message to get link statistics; iface = 48
02-01 06:30:17.589 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 18.196802
02-01 06:30:17.624  1025 28259 I WifiHAL : In GetLinkStatsCommand::handleResponse
02-01 06:30:17.688 22493 22785 D ConnectivityService: NetReassign [no changes] [c 3] [a 4] [i 3]
02-01 06:30:18.212 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 15.961238
02-01 06:30:18.447 22493 22512 E BLASTSyncEngine: WM sent Transaction to organized, but never received commit callback. Application ANR likely to follow.
02-01 06:30:18.521 22493 22512 E BLASTSyncEngine: WM sent Transaction to organized, but never received commit callback. Application ANR likely to follow.
02-01 06:30:18.726 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 15.921528
02-01 06:30:18.749 23179 23179 I SHANNON_IMS: 2384 [PROX] Received onSignalStrengthsChanged [CellSignalStrengthLte: rssi=-69 rsrp=-93 rsrq=-6 rssnr=19 cqiTableIndex=1 cqi=14 ta=0 level=4 parametersUseForLevel=0] [SLID:1 APM:false] (ImsConnectivityProxyListener$ImsPhoneStateListener%onSignalStrengthsChanged:418)
02-01 06:30:18.827 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 15.814005
02-01 06:30:18.849 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 15.640277
02-01 06:30:19.155 20924 20955 W OpenGLRenderer: dequeueBuffer failed, error = -110; switching to fallback
02-01 06:30:19.172 20924 20924 I Choreographer: Skipped 478 frames!  The application may be doing too much work on its main thread.

02-01 06:36:47.084 22493 29968 E ActivityManager: Aborting stack trace dump (current firstPid=25337); deadline exceeded.
02-01 06:36:47.132 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 5.494851
02-01 06:36:47.176 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 5.424069
02-01 06:36:47.195 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 5.5267124
02-01 06:36:47.210 22493 29968 E ActivityManager: ANR in com.android.systemui
02-01 06:36:47.210 22493 29968 E ActivityManager: PID: 22858
02-01 06:36:47.210 22493 29968 E ActivityManager: Reason: Input dispatching timed out (2a846ec StatusBar (server) is not responding. Waited 5001ms for MotionEvent).
02-01 06:36:47.210 22493 29968 E ActivityManager: ErrorId: f0fc9d19-b061-4631-bed1-b39aab88cf5f
02-01 06:36:47.210 22493 29968 E ActivityManager: Frozen: false
02-01 06:36:47.210 22493 29968 E ActivityManager: Load: 2.75 / 2.05 / 3.0
02-01 06:36:47.210 22493 29968 E ActivityManager: ----- Output from /proc/pressure/memory -----
02-01 06:36:47.210 22493 29968 E ActivityManager: some avg10=0.44 avg60=0.13 avg300=0.20 total=293568597
02-01 06:36:47.210 22493 29968 E ActivityManager: full avg10=0.00 avg60=0.00 avg300=0.06 total=98617791
02-01 06:36:47.210 22493 29968 E ActivityManager: ----- End output from /proc/pressure/memory -----
02-01 06:36:47.210 22493 29968 E ActivityManager: ----- Output from /proc/pressure/cpu -----
02-01 06:36:47.210 22493 29968 E ActivityManager: some avg10=9.53 avg60=7.97 avg300=8.51 total=3248438186
02-01 06:36:47.210 22493 29968 E ActivityManager: ----- End output from /proc/pressure/cpu -----
02-01 06:36:47.210 22493 29968 E ActivityManager: ----- Output from /proc/pressure/io -----
02-01 06:36:47.210 22493 29968 E ActivityManager: some avg10=0.00 avg60=0.03 avg300=0.05 total=160230679
02-01 06:36:47.210 22493 29968 E ActivityManager: full avg10=0.00 avg60=0.00 avg300=0.00 total=81035465
02-01 06:36:47.210 22493 29968 E ActivityManager: ----- End output from /proc/pressure/io -----
02-01 06:36:47.210 22493 29968 E ActivityManager:
02-01 06:36:47.210 22493 29968 E ActivityManager: CPU usage from 1ms to 21451ms later (2024-02-01 06:36:25.651 to 2024-02-01 06:36:47.102) with 99% awake:
02-01 06:36:47.210 22493 29968 E ActivityManager:   19% 22493/system_server: 10% user + 9.4% kernel / faults: 14100 minor 646 major
02-01 06:36:47.210 22493 29968 E ActivityManager:   8.9% 975/android.hardware.sensors-service.multihal: 3.5% user + 5.4% kernel / faults: 3 minor
02-01 06:36:47.210 22493 29968 E ActivityManager:   7.8% 604/surfaceflinger: 3.5% user + 4.2% kernel / faults: 66 minor 4 major
02-01 06:36:47.210 22493 29968 E ActivityManager:   7.5%<EMAIL_ADDRESS>4.8% user + 2.6% kernel / faults: 2911 minor 351 major
02-01 06:36:47.210 22493 29968 E ActivityManager:   4.2% 552/sugov:4: 0% user + 4.2% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   4.1% 25232/adbd: 1% user + 3% kernel / faults: 514 minor
02-01 06:36:47.210 22493 29968 E ActivityManager:   0.1% 130/trusty-nop-7: 0% user + 0.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   3.3% 607/android.hardware.composer.hwc3-service.pixel: 0.8% user + 2.4% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   0.3% 93/kswapd0: 0% user + 0.3% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   0.1% 1172/android.hardware.biometrics.face-service-felix: 0% user + 0% kernel / faults: 1150 minor 1289 major
02-01 06:36:47.210 22493 29968 E ActivityManager: 14% TOTAL: 4.7% user + 7.8% kernel + 0% iowait + 1.1% irq + 0.6% softirq
02-01 06:36:47.210 22493 29968 E ActivityManager: CPU usage from 89ms to 993ms later (2024-02-01 06:36:25.739 to 2024-02-01 06:36:26.643):
02-01 06:36:47.210 22493 29968 E ActivityManager:   167% 22493/system_server: 88% user + 78% kernel / faults: 3148 minor 34 major
02-01 06:36:47.210 22493 29968 E ActivityManager:     97% 22499/Signal Catcher: 64% user + 32% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     43% 29972/AnrAuxiliaryTas: 5.3% user + 37% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     21% 22509/android.fg: 16% user + 5.3% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     5.3% 22719/InputDispatcher: 2.6% user + 2.6% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     2.6% 22671/SensorService: 2.6% user + 0% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   5.8% 975/android.hardware.sensors-service.multihal: 3.5% user + 2.3% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     2.3% 1029/UsfHalWorker: 1.1% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     2.3% 1416/UsfTransport: 1.1% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     1.1% 1030/android.hardwar: 1.1% user + 0% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   4.5% 604/surfaceflinger: 2.2% user + 2.2% kernel / faults: 2 minor
02-01 06:36:47.210 22493 29968 E ActivityManager:     2.2% 604/surfaceflinger: 1.1% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     1.1% 726/TimerDispatch: 1.1% user + 0% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   2.2% 535/logd: 1.1% user + 1.1% kernel / faults: 41 minor
02-01 06:36:47.210 22493 29968 E ActivityManager:     1.1% 542/logd.writer: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   2.2% 553/sugov:6: 0% user + 2.2% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   1.1% 50/rcuop/4: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   1.1% 57/rcuop/5: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   1.1% 417/sched_pmu_wq: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   1.1% 551/sugov:0: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   1.1% 552/sugov:4: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   1.1% 607/android.hardware.composer.hwc3-service.pixel: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:     1.1% 607/binder:607_4: 0% user + 1.1% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   3% 23505/com.google.android.gms.persistent: 3% user + 0% kernel / faults: 26 minor
02-01 06:36:47.210 22493 29968 E ActivityManager:     3% 27062/lowpool[1363]: 3% user + 0% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager:   3.2% 24892/com.fitbit.FitbitMobile: 0% user + 3.2% kernel / faults: 1 minor
02-01 06:36:47.210 22493 29968 E ActivityManager:   3.3% 25232/adbd: 0% user + 3.3% kernel
02-01 06:36:47.210 22493 29968 E ActivityManager: 23% TOTAL: 11% user + 10% kernel + 0.2% iowait + 0.5% irq + 0.4% softirq
02-01 06:36:47.213 22493 29968 D ActivityManager: Completed ANR of com.android.systemui in 21564ms, latency 1ms
02-01 06:36:47.214 22493 22510 I ActivityManager: Killing 22858:com.android.systemui/u0a228 (adj -800): user request after error
02-01 06:36:47.220 22493 30114 I DropBoxManagerService: add tag=system_app_anr isTagEnabled=true flags=0x6
02-01 06:36:47.224 22493 22574 I libprocessgroup: Successfully killed process cgroup uid 10228 pid 22858 in 5ms
02-01 06:36:47.278 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 5.4885426
02-01 06:36:47.299 23049 26109 D HbmSvManager: Ambient sensor :  TMD3719 Ambient Light update Lux : 5.6376667
02-01 06:36:47.325  1159 14193 D BufferPoolAccessor2.0: bufferpool2 0xb4000073a1fa9e68 : 0(0 size) total buffers - 0(0 size) used buffers - 10/14 (recycle/alloc) - 4/13 (fetch/transfer)
02-01 06:36:47.325 22493 24024 I ActivityManager: Process com.android.systemui (pid 22858) has died: pers PERU
02-01 06:36:47.327  1946 19650 I android.hardware.biometrics.fingerprint-service.fpc42: onSysUiDeath()
02-01 06:36:47.329 22493 24028 E BiometricService: Enabled callback binder died
02-01 06:36:47.329 22493 24030 E LockoutResetTracker: Callback binder died: android.os.BinderProxy@7ba94ba
02-01 06:36:47.329 22493 24028 E LockoutResetTracker: Callback binder died: android.os.BinderProxy@59e2f6b
02-01 06:36:47.329 22493 24030 E LockoutResetTracker: Removing dead callback for: com.android.systemui
02-01 06:36:47.329 22493 24028 E LockoutResetTracker: Removing dead callback for: com.android.systemui
02-01 06:36:47.329  1946 19650 E IPCThreadState: attemptIncStrongHandle(2): Not supported

I updated to dev branch and the issue is still reproducing (freeze and reboot after a few minutes from disconnecting scrcpy), but I'm no longer getting the relevant shutdown logs.

OK the the reboot was probably not directly related to this native crash.
Please test scrcpy --no-cleanup. Does the device reboot few minutes after you close?

OK, then another test:

run scrcpy --no-cleanup
in the scrcpy window, press Alt+o (to turn the screen off)
in the scrcpy window, press Alt+Shift+o (to turn the screen on)
exit

Does the device reboot few minutes later?

Issue is reproducible with the above steps.

This does not solve the underlying issue, but at least not setting the "power mode" when not necessary will limit the problem: #4649.

I haven't noticed any issues or disadvantages in mitigating the issue with --no-cleanup


[Bug] npm install Fails with Dependency Error

I thought I would check out the code to see if there are some small things I could do myself and submit PRs for since I love the start of this so far, but I'm running into the following error when running npm install:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/elm-webpack-loader
npm ERR!   dev<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR! node_modules/elm-hot-webpack-loader
npm ERR!   dev<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I looked at<EMAIL_ADDRESS>and it does reference @"^7.0.1 for the dependent. Since it seems to be working for you is there around this error?

hmmmm, odd.  I just trashed my node_modules directory and re did npm install and all worked fine (and I don't have anything relevant install globally).  I have added an item on the todo list to verify on a separate machine.  In the meantime, I'd just put 7.01 in your package file and go with that.  I think it should be fine.
Anyone else having this issue??

I can confirm that downgrading to 7.0.1 allows npm install to run without issue for me.
I'm using Archlinux and I did find that I have elm-platform installed from the AUR, and it is flagged as out of date since 2019-10-21, so that is probably what's going on with my local environment. I've never done anything with Elm so that was pulled in as a dependency of something, and I didn't even think of checking my installed packages.
Can probably chalk this up to a local environment issue and not an issue with the code.

Funnily enough I did get the same error this afternoon when I was messing around with the elm.json file, but didn't have the time to work out what was going on so I will still follow this to see if I can make it happen in my dev environment.

Have just done an install on a fresh machine and got exactly the same issue so have pushed the downgrade to the tech-debt branch ready for inclusion in the next release.
Thanks

Well, I'm glad I'm not going crazy then :). I had the downgrade stored locally but ignored for committing just in case it was just me.


Use customElements.whenDefined() to set up props and add hooks

We had ordering issues with props due to using a setter. One way to get around this would be to use customElements.whenDefined() to set up props.  In order to do this, we'd need to do the following:

Continue defining a getter and a setter
Simply set an internal prop with the value when setting props
whenDefined we get props and set them up with what's currently doing it in the setter

The problem with this is that in the withProps mixin, we have absolutely no idea what the tag name will be. To work with this, we might have to have a dependency on withUnique. I'm not sure this is the best idea because you can use components without that mixin, or bypass it entirely.
I think this is a poor design choice in the spec, to have to use a name with whenDefined. It'd be much better to have static defined() callbacks.
It'd be great, if we can work around this to then define custom lifecycle callbacks for defined().
Does anyone have any ideas around this? cc @Hotell @chrisdarroch @matthewp
If we can work around this limitation, then we should:

Fix setting up props so we can use a getter
Add a hook for static defined()

My rough thoughts... which I haven't really shit-tested with code:
Perhaps we can split withProps in to a curried mixin for creating the props and leaving a placeholder for the element's name, then turn withProps in to a combination of that mixin and withUnique by default?
We could then provide an alternative, synchronous withProps variant for those who know what they're doing, but withProps (and thus withComponent) will work out of the box as according to the spec, which will likely be the expected behaviour.

We could then provide an alternative, synchronous withProps variant for those who know what they're doing, but withProps (and thus withComponent) will work out of the box as according to the spec, which will likely be the expected behaviour.

Building on that idea, what if we just made withUnique define a static defined() callback. therefore it's 100% going to get called when defined. Then we could make withProps define a static defined(), so when it's used with withUnique it just works. We might also just be able to do this in the constructor. I remember having a difficult time with that in Skate 4, but maybe I'm just being silly now and over thinking it.

So you have created the behaviour via static defined() within withUnique
https://github.com/skatejs/skatejs/commit/7a413a77467fafbb213860f82a6cadbf08126f77
but

Then we could make withProps define a static defined(), so when it's used with withUnique it just works

is missing. is this desired behav or you forgot to implement it ? thx

Also what do you mean by

We had ordering issues with props due to using a setter
?

@Hotell

is missing. is this desired behav or you forgot to implement it ? thx

I didn't implement the withProps definition for it yet. The withUnique implementation seems solid, I just want to think about the other one a bit more, I think.

what "ordering" issues do you have in mind ?

The renderer-react package requires an order so that children gets properly defined.

I don't quite understand the problem unfortunately. I've also never used whenDefined(). My understanding is that it is so that you can lazy-load element definitions and set props on them after they've loaded. I'm not quite sure the use-case in library code though..

We now do this in observedAttributes as this is called right when it's defined and it's only called once.


HTML

HTML
User Story
As a bootcamp student
I want the prework notes to be structured on a webpage
so I can easy find and read information
Acceptance Criteria
GIVEN a Prework Study Guy website
WHEN I visit the website in my browser
THEN I see four boxes titled HTML, CSS, Git, and JavaScript with associated notes listed

CSS
User Story
As a bootcamp student
I want the prework notes to be structured on a webpage
so I can easy find and read information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I view the study guide
THEN I see a dark blue header and footer, and four boxes with a shadow


Problem at "Install Folly, fbthrift, thpp and fblualib"

I had the latest cuda installed:
cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
before going through these instruction.
The link libfolly.so.43 wants something that isn't there.
Do i need to uninstall the 7.0 driver and install 6.5?
Making all in thrift
make[3]: Entering directory /tmp/fblualib-build.US7QU3/fbthrift/thrift/lib/thrift' ../../compiler/thrift1 --gen cpp:templates,cob_style -r reflection.thrift ../../compiler/thrift1: error while loading shared libraries: libfolly.so.43: cannot open shared object file: No such file or directory make[3]: *** [gen-cpp/reflection_constants.cpp] Error 127 make[3]: Leaving directory /tmp/fblualib-build.US7QU3/fbthrift/thrift/lib/thrift'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /tmp/fblualib-build.US7QU3/fbthrift/thrift/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /tmp/fblualib-build.US7QU3/fbthrift/thrift'
make: *** [all] Error 2

Had this issue too. I solved it by adding  /usr/local/lib to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Thank you very much! That solved the first issue I had. There was and still is a second issue that occurs when installing fbcunn at the last step:
cd fbcunn && luarocks make rocks/fbcunn-scm-1.rockspec
Here is the end of the terminals output. Lot's of those CMake warnings about removing non-existent dependency files before what I have in the snippet below ... if that matters. Have any ideas?
CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
Removing non-existent dependency file: generic/THTensorMath.h
CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
Removing non-existent dependency file: generic/THTensorConv.h
CMake Warning at /usr/share/cmake-2.8/Modules/FindCUDA/make2cmake.cmake:66 (message):
Removing non-existent dependency file: generic/THTensorLapack.h
[ 43%] Building NVCC (Device) object CMakeFiles/fbcunnlayers_cuda.dir/src/./fbcunnlayers_cuda_generated_MM.cu.o
Scanning dependencies of target fbcunnlayers_cuda
[ 45%] Building CXX object CMakeFiles/fbcunnlayers_cuda.dir/src/fft/CuFFTConvolution.cpp.o
In file included from /home/mark/nn/fbtorch/fbnn/fbcunn/src/fft/CuFFTConvolution.cpp:14:0:
/home/mark/nn/fbtorch/fbnn/fbcunn/src/fft/Utils.h:5:25: fatal error: thpp/Tensor.h: No such file or directory
#include "thpp/Tensor.h"
^
compilation terminated.
make[2]: *** [CMakeFiles/fbcunnlayers_cuda.dir/src/fft/CuFFTConvolution.cpp.o] Error 1
make[1]: *** [CMakeFiles/fbcunnlayers_cuda.dir/all] Error 2
make: *** [all] Error 2
Error: Build error: Failed installing.
mark@mark-All-Series:~/nn/fbtorch/fbnn/fbcunn$

It seems that thpp was not installed properly...

Yup but i don't know why. Went through whole process many times except for installation of cuda driver 7.0. Do you know off hand where/when this gets installed? I am really new Linux and doing all this.  Please excuse the naivety.

You could try installing thpp alone and see if there's any errors, take a look at https://raw.githubusercontent.com/soumith/fblualib/master/install_all.sh which installs thpp.

Thank you, that did something. It seemed to progress further along but encountered another problem with something it can't find related to Torch. Looks like I need to edit a cmake file. Some many copies of the particular one, I guess I got to find out which one. The end portion of the output is descriptive:
CMake Error at CMakeLists.txt:26 (FIND_PACKAGE):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.
Could not find a package configuration file provided by "Torch" with any of
the following names:
TorchConfig.cmake
torch-config.cmake

Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files.  If "Torch"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/tmp/fblualib-build.AJTpjO/thpp/thpp/build/CMakeFiles/CMakeOutput.log".
Installing FBLuaLib
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Folly: /usr/local/include
-- Found Glog: /usr/include
CMake Error at CMakeLists.txt:24 (FIND_PACKAGE):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.
Could not find a package configuration file provided by "Torch" with any of
the following names:
TorchConfig.cmake
torch-config.cmake

Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files.  If "Torch"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/tmp/fblualib-build.AJTpjO/fblualib/fblualib/build/CMakeFiles/CMakeOutput.log".
All done!

sorry about this. I just fixed the fblualib install script so that this error does not happen now.
I made sure tagged versions of folly and fbthrift are installed, rather than trunk. I tested the install process on a fresh ubuntu 14.04 machine.
You'll have to redo the install process starting from this step:
https://github.com/facebook/fbcunn/blob/master/INSTALL.md#install-folly-fbthrift-thpp-and-fblualib
If you are having installation errors after retrying the install once more (after my fresh fixes),
I can post the binaries here for Ubuntu 14.04 (they will be specific to ubuntu 14.04).

@soumith
I think, it works. Thanks

I have the same problem and I'm using updated Torch and scripts (as of 2 days ago). I followed the instructions to install fbcunn, ...etc. I get the same error. Can someone give the details of how to fix this? and where I can find the cmake file for Torch its looking for??

@Tgaaly what OS? Did you update torch or reinstall fresh? I want to make sure that there are no cached build files left over from the old install.

I have Ubuntu 14.04. I updated torch. I'll try reinstalling fresh.

I removed torch: rm -rf torch
and followed the steps of https://github.com/facebook/fbcunn/blob/master/INSTALL.md
when running
curl -sk https://raw.githubusercontent.com/soumith/fblualib/master/install_all.sh | bash -e
I got the following error:
make[2]: Leaving directory `/tmp/fblualib-build.mfQ8yk/fbthrift/thrift'
make[1]: Leaving directory `/tmp/fblualib-build.mfQ8yk/fbthrift/thrift'
+ echo

+ echo 'Installing TH++'
Installing TH++
+ echo

+ cd /tmp/fblualib-build.mfQ8yk/thpp/thpp
+ ./build.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (77) error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

I resolved this issue with curl. Now I have the same error as above again.
CMake Error at CMakeLists.txt:24 (FIND_PACKAGE):
By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Torch", but
CMake did not find one.

Could not find a package configuration file provided by "Torch" with any of
the following names:

TorchConfig.cmake
torch-config.cmake
Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
"Torch_DIR" to a directory containing one of the above files. If "Torch"
provides a separate development package or SDK, be sure it has been
installed.

-- Configuring incomplete, errors occurred!

Thanks for trying Tgaaly. I haven't yet got to the point of re-installing fbcunn ... don't need to yet ... maybe I let this cook a bit while more issues are resolved. LOL.

Another interesting problem:
when running sudo luarocks make rocks/nn-scm-1.rockspec
I get:
Missing dependencies for nn:
torch >= 7.0

Error: Could not satisfy dependency: torch >= 7.0

@Tgaaly you shoud not use ‘sudo’，because you sudo had not install torch，you install torch in current user dir


[Radiko] Cannot identify radio program to download!; please report this issue

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

Checklist

[X] I'm reporting that yt-dlp is broken on a supported site
[X] I've verified that I have updated yt-dlp to nightly or master (update instructions)
[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 known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
Japan
Provide a description that is worded well enough to be understood
i am trying to download the radio program at https://radiko.jp/#!/ts/BAYFM78/20241024020000, yt-dlp prints an error saying it cannot identify radio program to download and told me to file a bug here.
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'https://radiko.jp/#!/ts/BAYFM78/20241024020000']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>from yt-dlp/yt-dlp-nightly-builds [a6783a3b9] (pip)
[debug] Python 3.13.0 (CPython arm64 64bit) - macOS-14.4.1-arm64-arm-64bit-Mach-O (OpenSSL 3.4.0 22 Oct 2024)
[debug] exe versions: ffmpeg 7.1 (setts), ffprobe 7.1
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, mutagen-1.47.0, requests-2.32.3, sqlite3-3.47.0, urllib3-2.2.3, websockets-13.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version<EMAIL_ADDRESS>from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date<EMAIL_ADDRESS>from yt-dlp/yt-dlp-nightly-builds)
[Radiko] Extracting URL: https://radiko.jp/#!/ts/BAYFM78/20241024020000
[Radiko] BAYFM78-20241024020000: Downloading radio program for BAYFM78 station
ERROR: [Radiko] Cannot identify radio program to download!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/opt/homebrew/lib/python3.13/site-packages/yt_dlp/extractor/common.py", line 742, in extract
    ie_result = self._real_extract(url)
  File "/opt/homebrew/lib/python3.13/site-packages/yt_dlp/extractor/radiko.py", line 190, in _real_extract
    prog, station_program, ft, radio_begin, radio_end = self._find_program(video_id, station, vid_int)
                                                        ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.13/site-packages/yt_dlp/extractor/radiko.py", line 116, in _find_program
    raise ExtractorError('Cannot identify radio program to download!')

Looks like the requested radio program is at least 1.5 days older than anything in the weekly program list fetched by yt-dlp
This radio program is over a week old, is it still available in browser?

@garret1317 do you know if this extractor supports passing auth/premium?

i would have expected that yt-dlp recognises this situation and request me to provide authentication (i am not sure how this authentication is provided).

The "timefree 30" plan is very new, probably most things won't have been patched to handle it yet
I think it might work if you can pass cookies, and get it to give you a new token
so --cookies-from-browser and --rm-cache-dir probably
but first we would have to patch the extractor to get metadata from somewhere else

[tom scott time zone rant]
https://api.radiko.jp/program/v3/date/20241023/station/BAYFM78.xml uses the same format as the weekly one so could be more or less just "dropped in"
https://radiko.jp/v4/program/station/date/20241023/BAYFM78.json is also an option
BUT, these are both really annoying because they correspond to "broadcast days" rather than calendar days
so if you look you'll see each day starts at 5AM and ends at 5AM the next day
and this programme aired at 2024-10-24 02:00 (or perhaps i should say 2024-10-23 26:00 lol)
meaning the date we need is not 2024-10-24 but 2024-10-23
so you could try and work it out with string mashing
but then what happens at the end/start of the month, what if its a leap year, or jan 1st even, etc
and theres some other strange rules/edge cases if you want to be "bug-for-bug" compatible
so in my plugin i make a custom datetime object, idk if that'll fly in yt-dlp proper though

here's a rough patch that should at least make it possible
though its a naive approach that assumes things won't do anything unusual
and no ^informative error messages at the moment i'm afraid
diff --git a/yt_dlp/extractor/radiko.py b/yt_dlp/extractor/radiko.py
index f94d6a3e7..393f81527 100644
--- a/yt_dlp/extractor/radiko.py
+++ b/yt_dlp/extractor/radiko.py
@@ -1,4 +1,5 @@
 import base64
+import datetime
 import random
 import re
 import urllib.parse
@@ -99,17 +100,25 @@ def _extract_full_key(self):
         self._FULL_KEY = full_key
         return full_key

+    def _get_broadcast_day(self, timestring):
+        dt = datetime.datetime.strptime(timestring, '%Y%m%d%H%M%S')
+        if dt.hour < 5:
+            dt -= datetime.timedelta(days=1)
+        return dt.strftime('%Y%m%d')
+
     def _find_program(self, video_id, station, cursor):
+        broadcast_day = self._get_broadcast_day(cursor)
+
         station_program = self._download_xml(
-            f'https://radiko.jp/v3/program/station/weekly/{station}.xml', video_id,
-            note=f'Downloading radio program for {station} station')
+            f'https://api.radiko.jp/program/v3/date/{broadcast_day}/station/{station}.xml', station,
+            note=f'Downloading programme data for {broadcast_day}')

         prog = None
         for p in station_program.findall('.//prog'):
             ft_str, to_str = p.attrib['ft'], p.attrib['to']
             ft = unified_timestamp(ft_str, False)
             to = unified_timestamp(to_str, False)
-            if ft <= cursor and cursor < to:
+            if ft_str <= cursor and cursor < to_str:
                 prog = p
                 break
         if not prog:
@@ -187,7 +196,7 @@ def _real_extract(self, url):
         station, timestring = self._match_valid_url(url).group('station', 'timestring')
         video_id = join_nonempty(station, timestring)
         vid_int = unified_timestamp(timestring, False)
-        prog, station_program, ft, radio_begin, radio_end = self._find_program(video_id, station, vid_int)
+        prog, station_program, ft, radio_begin, radio_end = self._find_program(video_id, station, timestring)

         auth_token, area_id = self._auth_client()

--
2.34.1

[x] I've read about sharing account credentials and I'm willing to share it if required

@avioletheart would you be willing to share your account details with me so I can test and refine that patch?
please email me at<EMAIL_ADDRESS>or join the yt-dlp discord server and DM garret1317 from there
よろしくおねがいします


Text Extractor blanks screen

Microsoft PowerToys version
0.63.0
Installation method
PowerToys auto-update
Running as admin

[ ] Yes

Area(s) with issue?
TextExtractor
Steps to reproduce
When I open Text Extractor using the shortcut (Super-Shift-W), the screen goes blank.
✔ Expected Behavior
The Text Extractor UI should open and I should be able to select an area from the screen to extract text from.
❌ Actual Behavior
I have a selection crosshair and can draw a selection box, but it does nothing and the screen remains grey. I have to hit Escape to exit and nothing else happens.
Other Software
Windows 11 64-bit 22H2 on Surface Laptop Studio.
Issue occurs no matter what software is open or has focus.

This has happened since the feature was introduced. I updated to 0.63.0 just a moment ago and it still does the same thing.

Mica For Everyone caused this issue for me.

That would explain it, I use Mica For Everyone as well.

Mica For Everyone caused this issue for me.

Setting PowerToys.PowerOCR.exe backdrop to none in MicaForEveryone fixes the issue


Signer and Verifier are Writable Stream in Crypto

From the doc:
https://nodejs.org/docs/v0.10.0/api/crypto.html#crypto_class_verify
https://nodejs.org/docs/v0.10.0/api/crypto.html#crypto_class_sign

@sledorze thanks mate!
This change not contains latest node.js? if v0.12.0 same as v0.11, please send PR to node/node.d.ts again. :wink:

not sure about how the branches are organised
Which one should be updated?

latest .d.ts is without versioning one. node/node.d.ts is definition for latest version's node.js.

done: https://github.com/borisyankov/DefinitelyTyped/pull/5654


Add internal logs command documentation.

 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.Mehul Prajapati seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


fixing source import/export

sources didn't import/export properly. now they do.

:rotating_light: :fire:


Unable to use 'boost' profile

I get following odb compile error message

odb: error: unable to locate options file for profile 'boost'

when I want to use boost profile.
odb -I /usr/local/include -d sqlite --profile boost --generate-query --generate-schema person.hxx
I try to install libodb-boost or libodb-boost-dev brew formulaes/packages but both are not available.
If I search for all max13/* formulaes/packages

brew search max13

I get following output:

==> Formulae
max13/odb/libcutl ✔
max13/odb/libodb-base
max13/odb/libodb-mysql
max13/odb/libodb-pgsql ✔
max13/odb/libodb-sqlite ✔
max13/odb/libodb ✔
max13/odb/libodb-mssql
max13/odb/libodb-oracle
max13/odb/libodb-qt
max13/odb/odb ✔

But I can't find

max13/odb/libodb-boost
or
max13/odb/libodb-boost-dev

What am I doing wrong?

You’re right. I didn’t make this package. I’ll do it for you during the day (you’ll be the beta-tester 😉)

The boost package has been created. Please check it, and if possible, PR a short and concise test

It works!
Thank you so much for just-in-time solution.


Add CountryAPI

This api shown a list of all countries in the world, and return simple object structure and basic infomation (include flags ;) ).

Hi @fabian7593, thanks for the PR! It looks like your fork of this repo was a bit out of date.  Thanks!

Thanks for the clarification,
but I don't know why, I did a get lastest version, and not have the last version of master branch...
do you know what can be?

I try to upload with another branch, I close it, thanks...
If I have another problem please tell me


Doesn't seem to support 3.9 and below

The unions do not work for 3.9. You use Union[str, int] for 3.9 and below.

Thanks for this! Since I'm working on this on the 3.10 it didn't occur to me to think about the fact that typings have changed..
I have just fixed the typings for both Python 3.8 and 3.9 in the guns branch
I am waiting on merging this branch until the new season drops (should be in a week) if maybe Ubi doesn't wanna surprise us with some fixes to the API.
If not, there will have to be some more work done on that which would mean breaking changes maybe so I'm holding off on that


<IP_ADDRESS> does not work with java 1.8

The following exception occurs when running any gradle command using Java 1.8:
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.owasp:dependency-check-gradle:<IP_ADDRESS>'
    }
}

apply plugin: 'org.owasp.dependencycheck'

$ gradle tasks

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'dep-check'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.owasp:dependency-check-gradle:<IP_ADDRESS>.
     Required by:
         project :
      > No matching variant of org.owasp:dependency-check-gradle:<IP_ADDRESS> was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.1' but:
          - Variant 'apiElements' capability org.owasp:dependency-check-gradle:<IP_ADDRESS> declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.1')
          - Variant 'javadocElements' capability org.owasp:dependency-check-gradle:<IP_ADDRESS> declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.1')
          - Variant 'runtimeElements' capability org.owasp:dependency-check-gradle:<IP_ADDRESS> declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.1')
          - Variant 'sourcesElements' capability org.owasp:dependency-check-gradle:<IP_ADDRESS> declares a runtime of a component, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.1')

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 543ms

$ gradle --version

------------------------------------------------------------
Gradle 7.1
------------------------------------------------------------

Build time:   2021-06-14 14:47:26 UTC
Revision:     989ccc9952b140ee6ab88870e8a12f1b2998369e

Kotlin:       1.4.31
Groovy:       3.0.7
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_302 (Temurin 25.302-b08)
OS:           Mac OS X 10.15.7 x86_64

This is probably related to the module files added in <IP_ADDRESS> to maven central:
  "variants": [
    {
      "name": "apiElements",
      "attributes": {
        "org.gradle.category": "library",
        "org.gradle.dependency.bundling": "external",
        "org.gradle.jvm.version": 11,
        "org.gradle.libraryelements": "jar",
        "org.gradle.usage": "java-api"
      },

https://repo1.maven.org/maven2/org/owasp/dependency-check-gradle/<IP_ADDRESS>/dependency-check-gradle-<IP_ADDRESS>.module


add unit test route parameter setup

Restructured the headings based on Discord discussion
Add passing down route parameters in Unit Tests

@MichaelHochriegl I think you should include a code (endpoint) for GetUser as well so people can see exactly, if they don't know.

Sorry for taking so long, just added a proper example for the route test. Will start working on the integration part now.

@MichaelHochriegl Perfect!

@MichaelHochriegl merged...
thanks for contributing...
much appreciated :-)


Update conditional-rendering.md

If there is a specific reason why the code did not use object destructuring then apologies.

This seems unnecessary, but thank you for the effort! All new code uses destructuring, and there's no harm in leaving this the way it is.


Huge Manifest size

Hi,
We are using leveldb version 1.20. Ours is a java application which will do put and delete batch operations towards leveldb via jni. in one of our servers we have seen that manifest file size has been increased to 25GB. Can we know reason for this increase. Also if we execute repair db will our application be crashed due to large Manifest size. Do our application store that manifest file in memory and process the rdb operation? Or do we have any other impacts like extra RAM consumption when we execute rdb?
Please find below the settings of our leveldb and repair db:
LevelDB:
writebuffersize=64
cachesize=3072
compressiontype=SNAPPY
totaldbinstance=1
#Bloom filter policy bit count for db
filterpolicy.bitcount=100
RepairDB:
writebuffersize=4
compressiontype=SNAPPY
cachesize=4
#Bloom filter policy bit count for repair db
bitcount=10
Regards,
Krishna

Also whenever we restart our JVM, we will open a close the existing db and reopen new db. During that time if manifest file size is huge, Our the RSS of our application in top command is keep on growing and at one point application is crashing due to no physical memory. Why the entire Manifest file is getting loaded? Even though we have configured the Cache size as 3GB, why our RSS increasing beyond 10GB and application is crashing. This problem we didnt face when we do rdb on the huge manifest file but restarting the application file is causing the problem.

Hi,
is there a way where can rotate the Manifest file without closing and opening db.
Regards,
Krishna

Hi,
Can we get a update on this ticket
Regards,
Krishna

Hi,
Can we get some update on this ticket.
Regards,
Krishna

Hi,
Any update on this ticket?

Still having this issue in IndexedDB in Chrome. Not even a workaround is available?


I would like to contact you

Good morning from San Sebastian, Spain
I am writing to you as I need support for these tools:
https://github.com/rettichschnidi/clang-tidy-misra
or else,
https://github.com/rettichschnidi/clang-misracpp2008
I have seen that you were able to implement it and could you help me a bit with the steps you followed to run it?
I am a software engineer with more than 5 years of experience in railway projects and I am currently working in the company CEIT trying to launch misra rules "for free" in order to get more experience in the static analysis sector.
I would be very grateful if I could contact you to ask for some support.
Thank you very much and whatever you need from me I would be grateful to give you support or help you.
I also leave you my linkedin:
https://www.linkedin.com/in/joanes-aizpuru-zinkunegi-a06b86164/

Yes, I have already used cppcheck but it does not cover the MISRA C++ 2008 rules but it seems that the one you used does.
Do you remember the version of clang you used? Also, do you remember the steps you took to get it up and running?
Thank you very much for your answer!
Joanes


Update the swiss german locales

I update and added some new translations for swiss german.
Please merge!
Thanks a lot.

Added in @6e6d652. Thanks!


License

Thanks for the great dataset! It seems like there is multiple licensing information. You recently pushed the MIT license for this datset, however the readme has an Apache 2.0 license tag. Could you please clarify that? Thanks!

Dear @nomisto, After discussing with the team, we finalized the MIT license as the final license tag.

Perfect, thank you!


Add usecols option

With same functionality as pandas.read_csv (see docs here).

Agree, this would be useful. In general, supporting the same args as read_csv would be good, including sampling and nrows.


Updated to PostCSS v7

Is this PR ever going to get reviewed @outpunk ? I'd love to see this get package get brought up to date.

Sorry, I’m going to update it to PostCSS 8. Feel free to make the PR if you want to do it yourself.


Notification not working when application is completely closed

Expected Behaviour
Should  show notification on Receiving
Actual Behaviour
Not showing notification when app is completely closed
but showing notification when application is working in background
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 5.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Lenovo
Cordova CLI version and cordova platform version
cordova  --version           :          7.0.1                # e.g. 6.0.0
cordova platform version android   6.2.3                   # e.g. 4.1.1
Plugin version
phonegap-plugin-push 1.10.5 "PushPlugin"
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem

Sorry to be a jerk but I'm now closing issues that don't follow the issue submission guidelines. This plugin takes a lot of work to maintain and I can't afford the time required to solicit the required info from everyone.
I'm closing this issue but please feel free to re-open the issue if you provide the requested details from the new issue submission guidelines.
https://github.com/phonegap/phonegap-plugin-push/blob/master/.github/ISSUE_TEMPLATE.md


API: update put_property api

Based on discussion in #26

I might  be misunderstanding the connection between this and #26, but I had in mind something that transforms:
{'name': 'A', 'attributes': [{'name': 'B', 'value: 'C'}, {'name': 'D', 'value': 'E'}]}

into:
{'name': 'A', 'attributes': {'B': 'C', 'D': 'E'}}

ValueError was raised by mismatching of owner value in argument and server's return(server always use current login user as owner).
owner won't be in put_property api argument, removed its test

@danielballan
Could you review this before I put new pattern to all other methods?

Yes,
Currently, the server treats all property attributes as strings...Most rest services do follow this pattern.
It also simplifies the mapping in elastic.
If the concern is with sorting that can be added on the server side.

Thanks @shroffk @danielballan
I updated docstring and add some comments on code.

If no more comments, please merge!


An HTTP response parser using JSON parser API and some parts of JSON parser implementation.

This PR also includes

renaming

az_const_span => az_span
az_callback => az_action
az_span => az_mut_span

CURL_SLIST appender using emitters.

https://github.com/Azure/azure-sdk-for-c/issues/134


Official Microsoft Graph Go SDK

Hello everyone 👋
Vincent here from the Microsoft Graph SDKs team. I'm reaching out to announce we're working on an official Go SDK, we haven't announced the community preview yet as there are still a number of things we need to work through, but I though I'd reach out to give you an opportunity to provide feedback before anybody else!
A few benefits from this new SDK:

Fluent style APIs to all endpoints of the API
Contains all the models of the API
Is updated weekly to always be in sync with the API
Supports v1 and beta
Relies on Azure identity to provide support for multiple authentication flows (you also can implement your own authentication provider)
Provides middleware for Retry handling and Redirect handling (more to come)
And many more features to come!

As with every pre-previews, we have a list of known limitations we're working through.
We'd love for you to pop by the repos under our org, give it a try, and give us feedback on your experience with this new SDK.

I'd update the repository to recommend people to migrate to the official SDK.

Maybe lets wait first, to ensure the Go SDK gives people what they need? :wink:

@jc-dgit yes, I'd recommend this group waits at least until we announce the community preview (couple of weeks) or maybe even until general availability (couple of months) before archiving/deprecating this repo.
In the meantime, I encourage all of you to give a try to the new SDK, the more people try it, the better the final version will be.
And maybe a good compromise would be to ping this issue for the time being? (and not change anything on the readme just yet)

Hello everyone 😃
We have announced the preview of Microsoft Graph Go SDK.
We would love to hear your feedback to make sure we are giving what you need when accessing Microsoft Graph.

Closing for this repo's sanity. Since my original post we've reached general availability. Thanks to everyone who tried it out!


Parse serialisations of []Policy as policy.Set

When extending policy to include tag filters, the type representing a
set of policies changed from []Policy (a slice of policies to
consider as "on") to map[Policy]string (since policies may now have
values other than on and .. absent).
For most purposes this is internal, however it appears in public APIs in two places:

when calling UpdatePolicy you provide a policy.Updates
historical events and commit notes include a update.Spec which
can contain policy.Updates

.. and policy.Updates has fields of the kind described above.
To smooth this over, adapt []Policy to map[Policy]string when
deserialising.

Thanks Adam! :star:


Misleading documentation on --listen-metrics-urls

The monitoring etcd docs for version 3.2.9 mention the --listen-metrics-urls flag. This flag is not mentioned in Configuration flags docs and I can also confirm that trying to run etcd with this flag set results in an error:
flag provided but not defined: -listen-metrics-urls

I see that the flag is implemented in master but seems to be missing from the releases. Is this a doc error or the flag should've been included in past releases?

It was a bad cherry-pick in our end. Fixed in the release branch.
Will be synced up in the next release.
Thanks for the report!

Thanks, @gyuho.

@zbwright @joshix Can we sync https://coreos.com/etcd/docs/latest/op-guide/monitoring.html with latest release https://github.com/coreos/etcd/releases/tag/v3.2.11?

This is now fixed. Please visit https://coreos.com/etcd/docs/latest/op-guide/monitoring.html.
Thanks for report!


🐞 [BUG] Google Authentication Not Working

Description
: Users are experiencing issues when attempting to log in using Google authentication. The login process fails, and users are unable to access their accounts.
Current behaviour
Failed to open popup window on url : https://accounts.google.com/gsi/select?client_id=1094459761-ugk0m6u1bt4vmv8ceug51lpvur40uobp.apps.googleusercontent.com&ux_mode=popup&ui_mode=bottom_sheet&context=signup&as=b8SCA5Q4lS2ejHs1WLYppA&channel_id=438115777663eaa19daafcaaeb681c69fd805e9604c4a369be8de0439c1b0782&origin=https%3A%2F%2Fwww.grabtern.in. Maybe blocked by the browser?

Add gssoc-ext and level 3

Hello @simmi-verma
Can i work on this. I can easily fix this issue.

Hi, actually we have blocked gauth in dev mode due to security, Thanks for pointing out please feel free to create issues if you find any  bug!


Updating agent version to support Azure SPN

In Sprint 86 we added support for Azure Service principal on agent side, so azure related tasks need to be updated in order to support SPN. Currently Azure Service principal support is under feature flag.

Looks fine.


HttpException (HttpException: Connection closed while receiving data, uri = https://xxxxxxxxx.auth0.com/userinfo)

I am frequently receiving this error when calling the getUserInfo in Auth0Auth class.

can you try again with news changes?

@devdennysegura No, It's still failing. I was testing the app with my fork only. I don't see any commit after the my fork is merged.

I tried the example code and getting this error

Has anyone made any headway on this issue?

@spencerreeves I have workaround it for now. Check my code below
https://github.com/sawankumarbundelkhandi/flutter-auth0/commit/ad55fc794aec6af1d22e1825b1b5fe85b5332d96


How should I connect the Tora gguf node with the Tora encode Node?

The tora model is loaded as a cogvideopipe and not as Tora.

The Tora transformer model is a separate thing, it's a text2video model they finetuned alongside Tora, it is not required to use it. You instead use this to load only the trajectory control part:

Oh... Many thanks!


Only show candidates in range of best score facet settings (fixes #3673)

Fixes #3673
Changes proposed in this pull request:

When using best candidate score facet, don't only limit which rows are shown, but limit which candidates are shown in those rows.

I am reluctant but it hasn't got much to do with the PR so I have commented in #3673 instead.

@wetneb No worries.  I'm happy to discuss.

Following the discussion in #3673 I propose to close this - I'd say we need a more generic design to let users filter recon candidates and work on them independently.

Sounds good to me.