Motion Detection

Describe the bug
I've installed 0.8 via HACS and have the camera stream and switches working fine but the motion detection entity doesn't get updated when I walk in front of the camera. I can see the camera sees the motion as I have my own sensor that checks the follow URL every 2 seconds - http://<IP_ADDRESS>/api.cgi?cmd=GetMdState&user=user&password=password.
 I also get the following notification 'Login attempt or request with invalid authentication from <IP_ADDRESS> (<IP_ADDRESS>) (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0)'
Logs
2020-12-10 00:02:58 ERROR (MainThread) [reolink.camera_api] Error translating Reolink settings response 2020-12-10 00:03:08 ERROR (MainThread) [reolink.camera_api] Error translating login response to json 2020-12-10 00:03:08 ERROR (MainThread) [reolink.camera_api] Error translating Reolink state response 2020-12-10 00:03:10 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: [Errno<PHONE_NUMBER>] Immediate exit requested: 'rtmp://<IP_ADDRESS>:1935/bcs/channel0_main.bcs?channel=0&stream=0&token=8f03fa1e3b880a0' 2020-12-10 00:03:17 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:  2020-12-10 00:03:18 ERROR (MainThread) [reolink.camera_api] Error translating login response to json 2020-12-10 00:03:18 ERROR (MainThread) [homeassistant.components.camera] Error requesting stream: camera.door does not support play stream service 2020-12-10 00:03:18 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from <IP_ADDRESS> (<IP_ADDRESS>) (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0) 2020-12-10 00:03:50 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtmp://<IP_ADDRESS>:1935/bcs/channel0_main.bcs?channel=0&stream=0&token=8f03fa1e3b880a0
To Reproduce
Walk in front of camera
Expected behavior
Motion sensor should change from 'clear' to 'detected'
Environment:
Please provide useful information about your environment, like:

Home Assistant version: 0.118.5
Reolink camera model: RLC-420-5MP
Camera firmware number: v<IP_ADDRESS>_20071001

The switches and stream both rely on the token, so the camera should be logged in. For some reason, your camera couldn't get the data (timeout or token invalid) so it logged in again.
Now the big question is: why did this fail? One thing I can think of, is there are no more sessions available for the camera. So your script in example also does a login. Also the Reolink app does. It probably ran out of sessions. Can you try to reboot the camera, wait for Home Assistant to reconnect and try again (without Reolink app and other scripts!).

By the way: I have the same camera and firmware running fine so it should be working!

i have the same problem after updating to version 0.8. my RLC-410-5MP has the presence sensor that no longer works on HA but on reolink app or web browser it works correctly.

In version v0.7 it was polling the camera for every second, so sometimes it missed the motion in my case. So now we use a pash variant, the camera sends the events to Home Assistant. In your logfile should me a webhook URL right (with log set to debug). Is put this in your browser, do you see an incoming call in the HA log?

I have the same problem with the camera motion sensor in Home Assistant. I tried rebooting the camera and removing and re-adding the integration. Push is enabled in the camera settings. I also get "Login attempt or request with invalid authentication" error when clicking on the preview video to get a live view in the lovelace camera card. Camera: RLC-520, Firmware: v<IP_ADDRESS>_20103112, Reolink_dev: 0.8. Many thanks for your efforts with the integration.

I have the same issue with version 0.8.
First thought that it might be the network issue as mentioned in another issue (https://github.com/fwestenberg/reolink_dev/issues/92)
For testing I hardwired all cameras so this is out of the question.

2020-12-11 14:43:11 INFO (MainThread) [custom_components.reolink_dev.base] Host 192.168.xxx subscribed successfully to webhook https://192.168.xxx:8xxx/api/webhook/xxxxxxxxxxxxxxx
2020-12-11 14:45:24 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 5.257 seconds
2020-12-11 14:45:34 ERROR (MainThread) [reolink.camera_api] Error translating Reolink state response
2020-12-11 14:45:34 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 10.015 seconds
2020-12-11 14:46:34 ERROR (MainThread) [reolink.camera_api] Error translating Reolink settings response
2020-12-11 14:46:44 ERROR (MainThread) [reolink.camera_api] Error translating Reolink state response
2020-12-11 14:46:44 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 10.002 seconds
2020-12-11 14:46:44 ERROR (MainThread) [reolink.camera_api] Error translating login response to json
2020-12-11 14:46:44 ERROR (MainThread) [reolink.camera_api] Error translating Reolink state response
2020-12-11 14:46:44 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 20.849 seconds

The first line in the log means the webhook got created in HA and the camera subscribed to this. (When motion is detected, the camera calls the webhook). For some reason, the camera response from the API (not the subscription) is not OK. I have to say, 10+ seconds for fetching the data is not quite usual. The timeout of the API calls is set to 10 seconds.
Can you also perform the actions described here please?

I've turned of all my camera access, rebooted HA and re-added this integration and my camera but it's still happening
Here is my log file on boot up
2020-12-11 18:46:47 INFO (MainThread) [homeassistant.setup] Setting up reolink_dev
2020-12-11 18:46:47 INFO (MainThread) [homeassistant.setup] Setup of domain reolink_dev took 0.0 seconds
2020-12-11 18:46:52 INFO (MainThread) [custom_components.reolink_dev.base] Host <IP_ADDRESS> subscribed successfully to webhook https://.org/api/webhook/*****
2020-12-11 18:46:53 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 1.409 seconds
2020-12-11 18:46:53 INFO (MainThread) [homeassistant.components.camera] Setting up camera.reolink_dev
2020-12-11 18:46:53 INFO (MainThread) [homeassistant.components.switch] Setting up switch.reolink_dev
2020-12-11 18:46:53 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.reolink_dev
2020-12-11 18:46:57 INFO (MainThread) [homeassistant.components.stream] Started stream: rtmp://:1935/bcs/channel0_main.bcs?channel=0&stream=0&token=*
2020-12-11 18:47:54 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 1.433 seconds
2020-12-11 18:48:55 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 1.455 seconds
Here is what happens when I walk in front of the camera
2020-12-11 18:54:05 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
2020-12-11 18:54:09 ERROR (MainThread) [reolink.camera_api] Error translating Reolink settings response
2020-12-11 18:54:19 ERROR (MainThread) [reolink.camera_api] Error translating login response to json
2020-12-11 18:54:19 ERROR (MainThread) [reolink.camera_api] Error translating Reolink state response
2020-12-11 18:54:19 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 20.668 seconds
2020-12-11 18:54:25 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [139787427552224] Connection closed by client
2020-12-11 18:54:29 ERROR (MainThread) [reolink.camera_api] Error translating login response to json
2020-12-11 18:54:29 ERROR (MainThread) [homeassistant.components.camera] Error requesting stream: camera.door does not support play stream service
2020-12-11 18:54:29 ERROR (MainThread) [reolink.camera_api] Error translating login response to json
2020-12-11 18:54:29 ERROR (MainThread) [homeassistant.components.camera] Error requesting stream: camera.door does not support play stream service
2020-12-11 18:54:29 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from <IP_ADDRESS> (<IP_ADDRESS>) (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0)
And log file after
2020-12-11 18:55:23 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 4.422 seconds
2020-12-11 18:56:24 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 1.412 seconds
2020-12-11 18:57:27 DEBUG (MainThread) [custom_components.reolink_dev] Finished fetching reolink data in 3.150 seconds

I just noticed you both use HTTPS, which should not be a problem of course. But it might be possible the Reolink camera does not respond well to that. The camera subscribes wellnin both cases, both have HTTPS and both crash on movement (when the camera calls the webhook). I will switch my test install to https asap to check this out.

I use NGINX Home Assistant SSL proxy so i access HA using SSL externally and HTTP internally.
I've just tried running Postman but not sure what i'm doing wrong. Attached is the output of the login. Is the token in the id field? If I paste that into the two token field I seem to get a failed response back
token.json.txt
Reolink API.postman_test_run.json.txt

Strange, the token should be in name:
"responseCode": {
				"code": 200,
				"name": "OK"
			},

But it just says OK??

Yes it just says OK. I changed the default username from 'hass' to 'admin, added my password and changed the IP address in 'raw' and 'host'. I've never used postman before so not sure if i'm doing anything wrong!

I've  had the same issues with not getting motion to trigger for 0.8, but the HTTPS question got me thinking.
I'm also running a nginx reverse proxy and noticed the webhooks where getting registered with the external URL. Should be fine, my camera has access to outside world right now and everything, but it would not trigger motion at all.
So I removed my external URL from the core config settings page, rebooted and saw that the camera registered with the internal HTTP webhook URL. And once it had done so, motion triggers just as expected.
When I added my external URL back in the config and rebooted I receive:
2020-12-11 21:27:57 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook d38b0bb74e22c7c7ce2087bb759304090a1fb8f38125fd494c8393f6d5591c3d from 192.168.XX.XX
and motion once again has stopped working.

The reason you see this unregistered webhook error, is for some reason the unsubscribe is not working well at the moment. Not a big deal, because if the renew is not performed within 15 minutes, it gets unsubscribed anyway.
The HTTPS story I can confirm. I tried HTTPS also, and the webhook did not trigger. While on my installation with HTTP the motion event did work at the same time! So I will start searching for a solution to this...

Would it be possible to force or give an option for the webhook registration to use the internal URL?

Can you reach your HA over HTTP?

Not externally, I'm forcing it to https

I guess you could skip using the async_generate_url and instead construct the url yourself through the get_url and async_generate_path?
def async_generate_url(hass, webhook_id):     """Generate the full URL for a webhook_id."""     return "{}{}".format(         get_url(hass, prefer_external=True, allow_cloud=False),         async_generate_path(webhook_id),     )

I already tried this. But if your HA is not internal reachable by HTTP, it probably won't work. My not-working HA config used HTTPS internally and did not work.

I'm using http internally, my nginx terminates ssl externally as well and forwards to http. So that part should work at least for me.
My config in /config/core is
External URL: https://subdomain.domain.duckdns.org
Internal URL: http://localserver.lan:8123

Ok, thanks! I'll create a new version asap with:
get_url(hass, prefer_external=False
Please be patient, I need to add some other things as well.

I did a crude hack in my own __init__.py with the following additions / changes that seem to work. This allows me to get the internal (http) url:
After line 33
from homeassistant.helpers.network import get_url

From line 72
    webhook_id = await register_webhook(hass, base.event_id)
    #webhook_url = hass.components.webhook.async_generate_url(webhook_id)
    webhook_url = "{}{}".format(
      get_url(hass, prefer_external=False),
      hass.components.webhook.async_generate_path(webhook_id)
    )

Thanks, this was ecactly what I planned to change. I made a lot of fixes in this branch, you can download it as zip and overwrite all files in your custom_components/reolink_dev you can test it. Also the Options are fixed here, and I add the timeout setting. This one is not working yet, a fix in the python library is needed first. Please let me know the results. I know some small bugs are there:

When adding the same camera again an error occurs
Camera name for NVR gets the suffix _1 for stream 1 etc. This well be fixed later.

Did some quick checks with the new Version

The motion detection works as it should
The webhooks are created for the internal url

2020-12-14 17:17:59 INFO (MainThread) [custom_components.reolink_dev.base] Host <IP_ADDRESS> subscribed successfully to webhook http://192.168.xxxxx:8123/api/webhook/xxxxxxxxxx

Only drawback I saw : it created new entities for all reolink sensors and did not update the existing one. But this is not a big issue in my eyes

Thanks for testing. The new devices is because the unique id's are renamed. So first delete the integration should help.

after more testing and really trying to get it to break ;) everything seems to be working fine.

[x] Motion detection

[x] Webhook registration

[x] snapshot function

[x] mobile notification after motion (with node red)

Got to try it now also and I can only agree with the above comments. I deleted the integration before replacing the folder, after a reboot all added in nicely and everything works as expected for me. I have only tried it with one camera though.

I've setup two cameras and both are working ok. Great work @fwestenberg!

Thanks and it's a pleasure to close this one. ;)


Crash on initializing game!

Industrial Foregoing Version: 1.12.6-230
TeslaCoreLib Version: <IP_ADDRESS>
Crashlog (): https://paste.dimdev.org/toxetiteko.mccrash
Note: I only used this version of Industrial Foregoing due to incompatibilities with forge.

Note: This is Minecraft 1.12.2 with forge version <IP_ADDRESS>68.

Redownload the mods, its impossible that its requesting 1.15.2 classes with a 1.12.2 version


How to label anomaly points if these points are not consecutive ？

Hi, very nice work !
And here is a problem. How to label anomaly points if these points are not consecutive ？
When I use this tool, I can only draw one rectangle on the showing plot. So, if the anomalous points are not consecutive, it is not supported for me to draw multiple rectangles to embrace all these points.
How to solve that ?

@omri374
OK, I see. Thanks ～

@omri374
Hi, I have come up with a solution. We can use the function shiny::observeEvent to add a actionButton which is bound up with the brush event. And if we press the actionButton, the new points in rectangle will be added or deleted. So we can draw multiple rectangles and deal with the inconsecutive points step by step.
Here is the minimal example:
library(ggplot2)
library(Cairo)   # For nicer ggplot2 output when deployed on Linux
library(data.table)

cols <- c("mpg", "cyl", "disp", "hp", "wt", "am", "gear")
mtcars2 <- data.table(mtcars[, cols])

ui <- fluidPage(
  fluidRow(
    column(width = 5,
           plotOutput("plot1", height = 300,
                      brush = brushOpts(id = "plot1_brush")
           )
    ),
    column(width = 2,
           br(),
           actionButton("add", "Add Points"),
           br(),
           br(),
           actionButton("delete", "Delete Points")
    ),
    column(width = 5,
           plotOutput("plot2", height = 300)
    )
  ),
  fluidRow(
    column(width = 6,
           h4("Brushed points"),
           verbatimTextOutput("brush_info")
    )
  )
)

server <- function(input, output) {

  output$plot1 <- renderPlot({
    ggplot(mtcars2, aes(wt, mpg)) + geom_point()
  })

  new.pts <- reactive(brushedPoints(mtcars2, input$plot1_brush))
  output$brush_info <- renderPrint({
    new.pts()
  })

  ### Using `observeEvent` to Add or Delete Points -------
  points <- data.table()
  makeReactiveBinding("points")

  observeEvent(input$add, {
    points <<- rbind(points, new.pts())
  })

  observeEvent(input$delete, {
    if (dim(points)[1] > 0) {
      points <<- points[!new.pts(), on = cols]
    }
  })
  ### ----------------------------------------------------

  output$plot2 <- renderPlot({
    p2 <- ggplot(mtcars2, aes(wt, mpg)) + geom_point()
    if (dim(points)[1] > 0) {
      p2 <- p2 + geom_point(aes(wt, mpg), data = points, color = "red")
    }
    return(p2)
  })

}

shinyApp(ui, server)

Below is screenshots of the app:

Add points * 1

Add points * 2

delete points

Hi @ZJUguquan .
Great suggestion!
Would you be interested in doing a PR?
If yes, please try addressing these issues:

Keep selected points on the original graph and not a second graph. I checked and it's a straightforward change.
If possible, please avoid using makeReactiveBinding as it introduces global assignments (<<-).

Thanks!

Fixed see PR #16


[backport foxy] Fixed crash when changing rendering parameters for pointcloud2 while 'Selectable' box is unchecked (#768)

Signed-off-by: ahcorde<EMAIL_ADDRESS>

Linux
Linux-aarch64
macOS
Windows


Affected test moved file

Explanation

Essential Checklist

[ ] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
[ ] Any changes to scripts/assets files have their rationale included in the PR explanation.
[ ] The PR follows the style guide.
[ ] The PR does not contain any unnecessary code changes from Android Studio (reference).
[ ] The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
[ ] The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included
Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

Initial Changed Files List without moving files and adding the retrieval of renamed files method -
Changed files (per Git, 2 total): stack trace
[.github/workflows/unit_tests.yml, utility/src/main/java/org/oppia/android/util/math/MathTokenizer.kt].

After moving CoverageReporter.kt from coverage/reporter -> coverage:
Without retrieval of renamed files -
Changed files (per Git, 2 total): stack trace
[.github/workflows/unit_tests.yml, utility/src/main/java/org/oppia/android/util/math/MathTokenizer.kt].

After moving CoverageReporter.kt from coverage/reporter -> coverage:
With retrieval of renamed files included for retrieveChangedFilesWithPotentialDuplicates() -
Changed files (per Git, 4 total): stack trace
[.github/workflows/unit_tests.yml, scripts/src/java/org/oppia/android/scripts/common/GitClient.kt, utility/src/main/java/org/oppia/android/util/math/MathTokenizer.kt, scripts/src/java/org/oppia/android/scripts/coverage/CoverageReporter.kt].


blogs -> home page

Moved all blog posts to the main home page
Removed the blog tab

blog.md removed
index.md rediverted to main home page


Parameters in std::function template parameter are incorrectly colored as types

Checklist

[x] This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

The code with a problem is:
#include <functional>

void test(std::function<int (int parameter)> f1) {
    std::function<int (int parameter)> f2;
}

It looks like:

Theme: Light+.
It should look like:
parameter in line 3 should look like in line 4.

Interesting, that syntax is new to me, but it looks like its been there since C++ 11.
Note for future me: seems to be an edgecase limited to function<> and not a general templating capability.


#2930 make collateral positions easier accessable

General
Closes #155

added collapsed components
switch margin positions and price feed data
performed styling

General
Please make sure the following is done:

Pull request is onto develop
If you haven't already, have a look at

https://github.com/bitshares/bitshares-ui/blob/develop/CODE_OF_CONDUCT.md
https://github.com/bitshares/bitshares-ui/blob/develop/CONTRIBUTING.md

Code Preparation
Please review all your changes one last time before committing

[ ] Check for unused code
[ ] No unrelated changes are included
[ ] None of the changed files are reformatting only
[ ] Code is self explanatory or documented
[ ] All written text is properly translated (english language)

Testing
The branch has been tested on the following browsers (desktop and mobile view)

[x] Chrome
[ ] Opera
[ ] Firefox
[ ] Safari

User interface changes
Delete this section if there weren't any UI changes. Please make sure you tested your changes in all themes

[x] Dark
[x] Light
[x] Midnight

Looking good!

Please refine

Use Ant Table (type="card") for Asset Info Asset Action
Make all Asset actions collapsible as well

Use Ant Table (type="card") for Asset Info Asset Actio

Did you mean Ant Tab?

Yes, tabs sorry. Auto-correct.

plz review it

Forwarded


IBL not working in old android devices

Device: XiaoMi 4
GPU: Adreno GPU 330
Lights:  venetian_crossroads_2k IBL  + SunLight
DamagedHelmet.glb in this device using Filament can only show EmissivePart + Sun Specular. The IBL is not working. (ps: I can see from the breakpoints that the ktx is correctly loaded  and the cubemap texture is created successfully via the ktx.  )
(pps: GAPID & snapdragon profiler can make it crash when the capture begins so I am trying older adreno profiler.  The monoFramwork's download encountered some problems. Once I have done the gpu capture, I will post the frames here.)

Could you share the logs from logcat please? This is unfortunately very likely due to driver bugs. We can try to find workarounds but it will be difficult since we don't have that device to test with.

Could you share the logs from logcat please? This is unfortunately very likely due to driver bugs. We can try to find workarounds but it will be difficult since we don't have that device to test with.

two logs.zip
Here's two logs from logcat with two android devices.
Mali-G76 GPU works properly.
Adreno-tm-330 GPU doesn't have the ibl part.

If it's not a shader issue, debug builds of Filament might be able to catch it (we enable many asserts). I don't see anything in the logs. Adreno 330 is an old GPU and I wouldn't be surprised if we're just running into hardware/driver bugs here.

If it's not a shader issue, debug builds of Filament might be able to catch it (we enable many asserts). I don't see anything in the logs. Adreno 330 is an old GPU and I wouldn't be surprised if we're just running into hardware/driver bugs here.

After trials and errors, I finally make the IBL work in my adreno 330 device. But I still don't know what's the actual reason:(
Here's the route:
I hooked the shader source at runtime in the "OpenGLProgram.cpp" and replace it with my modified version to debug the shader code.  And I found three lines in the PBR's fragment shader cause the unexpected problems.

mipmapDepth.mat,   FRAGMENT_SHADER
gl_FragDepth = texelFetch(materialParams_depth, 2 * icoord + ivec2(icoord.y & 1, icoord.x & 1), level).r;
The 'level' param lead the later "glLinkProgram" call stuck forever. But if I change it to a constant int, glLinkProgram can get through normally.
gl_FragDepth = texelFetch(materialParams_depth, 2 * icoord + ivec2(icoord.y & 1, icoord.x & 1), 0).r;

Generated PBR Shader for gltf model,   FRAGMENT_SHADER
The original line:  (aoStrength passed in by the gltfio is 1.0, watched from the breakpoint view)
material.ambientOcclusion = texture(materialParams_occlusionMap, aoUV).r * materialParams.aoStrength;

The product above in adreno 330 is 0.0 (expected 1.0),  but the high-end android device is ok.
And the strange part is:
material.ambientOcclusion = texture(materialParams_occlusionMap, aoUV).r;  // 1.0, ok
material.ambientOcclusion = materialParams.aoStrength; // 1.0, ok
material.ambientOcclusion = texture(materialParams_occlusionMap, aoUV).r * materialParams.aoStrength; // 0.0, error
This result influcent the diffuseAO->Fd->IBL  and make the IBL part black.

Generated PBR Shader for gltf model,   FRAGMENT_SHADER
The original line in combineDiffuseAndSpecular():
color.rgb += (Fd + Fr) * frameUniforms.iblLuminance;  // turn out to be black in adreno 330
Change it to:
color.rgb += (Fd + Fr) * float3(frameUniforms.iblLuminance);  // works fine in adreno 330

Here's the complete cpp code for runtime shader source hacking. ( with a comment for each hacked line: "modified line")
OpenGLProgram.cpp.zip
As you can see it's just a workaround to get through the IBL effects.  Any ideas to fix these uncompatible issues? Thanks:)

Thanks for the investigation, they definitely point to driver bugs. Is this happening with debug builds or release builds? In release our shaders go through an optimizer so the code looks very different.
We could adopt #3 as a fix in our code base but I'm not sure what we can do about the other two.
BTW have you tried FIlament 1.8? We've updated several things, including the shader optimizer. It may help?

Please try with more recent versions of Filament


Validation

Hi, great job!
Because The ViewModelBase is an ObservableObject and not a ValidationObject I can't validate my ViewModel properties.

My apologies for the late reply.
To use the ObservableValidator, use the ValidatorViewModelBase base.


Error: Unexpected null value and invoke debug when clicking left side of AppBar on Flutter Web

Steps to Reproduce

Create new flutter project
Run it on Chrome, open Dev Tools and view it as mobile (eg. Iphone 12 Pro)
Click repeatedly on the left side (beside the title) of AppBar and it will causing debug

Expected results:
Debug shouldn't be invoked when pressing the AppBar
Actual results:
Debug is invoked with error below showed on the Debug Console:
Error: Unexpected null value.
    at Object.throw_ [as throw] (http://localhost:58870/dart_sdk.js:5148:11)
    at Object.nullCheck (http://localhost:58870/dart_sdk.js:5467:30)
    at [_getSanitizer] (http://localhost:58870/dart_sdk.js:173406:28)
    at http://localhost:58870/dart_sdk.js:173458:42
    at http://localhost:58870/dart_sdk.js:173419:16
    at loggedHandler (http://localhost:58870/dart_sdk.js:173124:11)

Screenshot for the error showed below:

*** Flutter Doctor ***
[✓] Flutter (Channel beta, 3.1.0, on Microsoft Windows [Version 10.0.22000.675], locale en-SG)
    • Flutter version 3.1.0 at D:\Project\Flutter\sdk
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bcea432bce (11 days ago), 2022-05-26 09:05:34 -0700
    • Engine revision 44e5b38ee8
    • Dart version 2.18.0 (build 2.18.0-44.1.beta)
    • DevTools version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\billy\AppData\Local\Android\sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.5)
    • Visual Studio at D:\Apps\VC2022
    • Visual Studio Community 2022 version 17.0.32112.339
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.67.2)
    • VS Code at C:\Users\billy\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.40.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.675]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 102.0.5005.63
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 102.0.1245.33

[✓] HTTP Host Availability
    • All required HTTP hosts are available

Hi @billyinferno, thanks for filing the issue. This issue is reproducible on the latest stable and master channels.
Issue is only happening on some devices as below demo video:

Demo
https://user-images.githubusercontent.com/104349824/172323780-6c8666aa-6eb8-45a8-a9ec-c45b051b726f.mp4

Logs
Error: Unexpected null value.
    at Object.throw_ [as throw] (http://localhost:61564/dart_sdk.js:5080:11)
    at Object.nullCheck (http://localhost:61564/dart_sdk.js:5399:30)
    at [_getSanitizer] (http://localhost:61564/dart_sdk.js:173260:28)
    at http://localhost:61564/dart_sdk.js:173312:42
    at http://localhost:61564/dart_sdk.js:173273:16
    at loggedHandler (http://localhost:61564/dart_sdk.js:172978:11)

Sample code
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
    • Flutter version 3.0.1 at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (8 hours ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-32, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Android Studio
    • Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/203.7185775/Android Studio
      Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.67.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • 2526BC1A-435D-4B08-B99C-44B928F2517B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel master, 3.1.0-0.0.pre.1139, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
    • Flutter version 3.1.0-0.0.pre.1139 at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2ab56de808 (26 minutes ago), 2022-06-07 02:18:05 -0400
    • Engine revision 5797ecf2fb
    • Dart version 2.18.0 (build 2.18.0-170.0.dev)
    • DevTools version 2.14.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-32, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[!] Android Studio
    • Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/203.7185775/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available

Changing the device on the fly without refreshing the app is a little bit odd.
This is where the exception points:
https://github.com/flutter/engine/blob/main/lib/web_ui/lib/src/engine/pointer_binding.dart#L577-L581


feat: CRUD API's

Created generic crud APIs
Issue: https://github.com/SamagraX-Stencil/stencil/issues/2

// @Apurv428

Closing this since there is no movement.


Pass presets and plugins as absolute paths

It seems passing presets and plugins as absolute paths is not working.
The README states that rollup-babel-plugin supports “all options are as per the Babel documentation”, and the babel doc states: ”You can also specify an relative/absolute path to your plugin/preset.”
My use case involves keeping rollup and rollup configuration in it’s own repo (including babel, presets and plugins), while the client source code is elsewhere.
Is it possible to fix this somehow?

My bad, it does work. I had the paths wrong...


Question: ArchiveReader::read() blocks?

Hi, this is a question and not really an issue.   I'm looking at using rc-zip with in an async-await environment.   However, ArchiveReader::read() looks to be the only way to feed the reader file data and it will block during the read.   Is there an alternate way to feed it data that I may have read using async read directly?   Is an async version of read() necessary?
Thanks for clarifying.

So, first off, rc-zip is in a semi-incomplete state and I don't recommend
using it in anything serious at this stage.
That said - it is designed as a state machine, specifically so it can adapt
to different I/O model. The 'read' method you mention implement a
synchronous model on top of it but you can implement an async model as
well. It hasn't been done yet because async/await wasn't stable back then!
tl;dr this is in the spirit of the project but the project is only half
baked
On Sun, Mar 29, 2020, 19:51 John W. Terrell<EMAIL_ADDRESS>wrote:

Hi, this is a question and not really an issue. I'm looking at using
rc-zip with in an async-await environment. However, ArchiveReader::read()
looks to be the only way to feed the reader file data and it will block
during the read. Is there an alternate way to feed it data that I may have
read using async read directly? Is an async version of read() necessary?
Thanks for clarifying.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-compress/rc-zip/issues/10, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB5AWZVSS7POSXJSETFIAT3RJ6DA5ANCNFSM4LWB3UIA
.

Thanks for the response.   I have a project that needs the functionality provided by rc-zip so I may fork the repo and work on adding async to it.   I'll send a PR when it's ready if you'd like.

Sure, I'd be happy to review changes! Maybe @Geal will be able to help too (he's in the rust-compress org), but I don't know what his availability is like these days. Mine is spotty, so expect delays :)


KeychainStorage with iOS version 12

Hello,
When I tried to open app I am getting error from KeychainStorage with iOS version 12.4. (There is a code in appdelegate related with KeychainStorage)
It says 'EXC_BAD_ACCESS', There is no more detail message
How can I fix this error?
Thanks
Maria

Hi @MariaJsn, thanks for reporting the issue. The error looks similar to this issue https://github.com/evgenyneu/keychain-swift/issues/63. I don't know how to fix it, sorry. There must be a bug in this library.

Just FYI, I have found that it isn't really a good idea to thread access to the UserDefaults prefs. I have a threaded test in my RVS_Persistent_Prefs project that I have commented out, because it's basically a proof that the class isn't thread-safe. Not sure if the same goes for the keychain.

It's probably my fault, but I never really worried too much about it, as the class isn't really meant to be used in a thread-heavy environment.

Thanks @ChrisMarshallNY that's good to know.

Not sure if the same goes for the keychain.

It does, Keychain API is not thread safe. ahernandezlopez has added locks to this library to fix the crashes. But there could be still be some remaining thread-related issues in this library.

I believe that Apple’s guidance is that any SDK element should be considered NOT thread-safe, unless specifically labeled as thread-safe.
That’s actually a pretty significant part of their UIKit/AppKit/WatchKit framework. I’m not sure if SwiftUI is improving that.
BTW, thanks for this tool. I’ve been using it for years.


TypeError: cannot deepcopy this pattern object

Running into this error when testing one run configuration. I tried to run the same script (using API) in serial, interactive session and using batch script. It only occurs when running by submitting as a batch job. Seems like a random thing. Need to investigate further
Traceback (most recent call last):
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/bin/e3sm_diags", line 10, in <module>
    sys.exit(main())
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/site-packages/acme_diags/acme_diags_driver.py", line 290, in main
    parameters = get_parameters(parser)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/site-packages/acme_diags/acme_diags_driver.py", line 249, in get_parameters
    other_parameters=other_parameters, cmd_default_vars=False, argparse_vals_only=False)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/site-packages/cdp/cdp_parser.py", line 532, in get_parameters
    final_parameters = self.granulate(final_parameters)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/site-packages/cdp/cdp_parser.py", line 418, in granulate
    p = copy.deepcopy(param)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 215, in _deepcopy_list
    append(deepcopy(a, memo))
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 180, in deepcopy
    y = _reconstruct(x, memo, *rv)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 280, in _reconstruct
    state = deepcopy(state, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 150, in deepcopy
    y = copier(x, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 240, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/qfs/people/zhan429/.conda/envs/e3sm_diags_env_dev_1.7.1/lib/python3.6/copy.py", line 161, in deepcopy
    y = copier(memo)
TypeError: cannot deepcopy this pattern object

It seems like a one-time glitch on Cori. Close for now


Can I use uWebSockets to send a post request?

Can I use uWebSockets to send a post request? If I can, where can I find the instruction documents?

No this is a server only


Customizing the Edit, Save and Cancel buttons

Hi,
Just discovered this script. It seems very nice.
A first question I have is this: showing the circle icon with the pen, as well as the Save and Cancel buttons, fixed in the top left corner is not suitable for my app. I would prefer to start editing by directly clicking in the editable content. Then a custom Save and Cancel buttons (with the appearance I want) would appear just on top of this area. Is such a thing possible?
Thanks

Yes this is possible, you can use SCSS/CSS to modify the appearance of the ignition buttons or simply hide/remove them and role your own.
To hide/remove the elements either use CSS, e.g:
.ct-ignition {
    display: none;
}

or JS, e.g:
var editor = ContentTools.EditorApp.get();
editor.init('data-editable', 'data-name', null, false); // The last argument states we don't want an ignition switch

To manually start/stop then you can use the named methods, e.g:

// Manually start the editor
editor.start();

// Manually stop the editor
editor.stop(save); // Pass true to save, false to cancel

Hope that helps, there's some more information on this here http://stackoverflow.com/questions/34645700/customise-edit-button-for-contenttools though the approach is slightly out dated now and the above is cleaner / more current.

Wonderful, thank you.
In the same spirit, may I ask a similar question:
Can I reposition the bottom bar inside a container instead of the bottom of the screen?

The inspector bar can be modified in appearance using SCSS/CSS again, the class you need to look at is ct-inspector. By default the inspector is mounted to it's parents DOM element, in the case the editor but if you need to mount it in another element you could consider either overwriting the mount and having it mount the element to a parent DOM element of your choosing.
The relevant code can be found here: https://github.com/GetmeUK/ContentTools/blob/master/src/scripts/ui/inspector.coffee#L13

Unfortunately coffeescript won't fit in my workflow and I am against modifying the library, prefering hooks  to override stuff.
About the css, I was not able to find a non minified css file...

ContentTools uses SCSS to generate its CSS so you need to look here: https://github.com/GetmeUK/ContentTools/tree/master/src/styles
You can use JavaScript to modify the library (though it's not as clean as using CoffeeScript given it's developed in CoffeeScript). I understand not wanting to modify the library, and whilst CT does provide events for lots of things (I removed hooks early on in favour of events) these don't provide a solution to this question as you can't use events to modify the editor adding the inspector bar some where (it would be possible technically to make this an event you can bind to a customize but I don't believe that's the correct approach).
You can go a long way with CSS to customize the appearance but if you want to modify the editor UI beyond appearance (e.g the structure) it will most likely mean modifying (either by patching or inheriting) the CT library.

window.addEventListener('load', function() {
var editor;
ContentTools.StylePalette.add([
new ContentTools.Style('Author', 'author', ['p'])

]);
editor = ContentTools.EditorApp.get();
editor.init('*[data-editable]', 'data-name');

// Add support for auto-save

editor.addEventListener('start', function (ev) {
var _this = this;
// Call save every 30 seconds
function autoSave() {
    _this.save(true);
};
this.autoSaveTimer = setInterval(autoSave, 30 * 1000);

});
editor.addEventListener('stop', function (ev) {
// Stop the autosave
clearInterval(this.autoSaveTimer);
});
editor.addEventListener('saved', function (ev) {
var name, onStateChange, passive, payload, regions, xhr;
// Check if this was a passive save
passive = ev.detail().passive;

// Check to see if there are any changes to save
regions = ev.detail().regions;
if (Object.keys(regions).length == 0) {
    return;
}

// Set the editors state to busy while we save our changes
this.busy(true);

// Collect the contents of each region into a FormData instance
payload = new FormData();
payload.append('__page__', window.location.pathname);
for (name in regions) {
    payload.append(name, regions[name]);
}

// Send the update content to the server to be saved
onStateChange = function(ev) {
    // Check if the request is finished
    if (ev.target.readyState == 4) {
        editor.busy(false);
        if (ev.target.status == '200') {
            // Save was successful, notify the user with a flash
            if (!passive) {
                new ContentTools.FlashUI('ok');
            }
        } else {
            // Save failed, notify the user with a flash
            new ContentTools.FlashUI('no');
        }
    }
};

xhr = new XMLHttpRequest();
xhr.addEventListener('readystatechange', onStateChange);
xhr.open('POST', '/x/save-page');
xhr.send(payload);

});
});
Editor wont save


Fixed conflict and merged upstream/master latest changes

@dchirikov I've merged the latest changes in your branch + fixed the merge conflict

Looks good, but I have some doubts if we merge this, GitHub will chew the one to upstream:
https://github.com/rancher/local-path-provisioner/pull/183

Looks good, but I have some doubts if we merge this, GitHub will chew the one to upstream:
https://github.com/rancher/local-path-provisioner/pull/183

Checked more carefully. Looks like this PR reintroduced https://github.com/rancher/local-path-provisioner/issues/186
I think I'll close this PR and rebase mine to the upstream in order not to turn git log --graph into guitar hero.

yep, sounds like a better plan 😄
I've tried to do a rebase initially, but as I don't have write access to your branch I could not force push it


runtime: SIGPROF received on g without m

What version of Go are you using (go version)?
go1.8
What operating system and processor architecture are you using (go env)?
GOARM=7 GOARCH=arm
I see a SIGSEGV in sigtrampgo, on line 276:
if sp < g.m.gsignal.stack.lo || sp >= g.m.gsignal.stack.hi {

The relevant disassembly from gdb is
   ldr r2, [r10, #24]
=> ldr r3, [r2, #44]

On that line, gdb says r2 is 0. (r10 is g, so r2 is g.m)
Maybe a dup of #10534?
We can reproduce this very consistently when the cpu profiler is turned on.
CC @rakitzis

Ah, never mind. Found some suspicious assembly code (ours) that appears to save (and subsequently clobber) r10, so that pointer is probably garbage.
Sorry for the noise.


Bot should announce who is already in the game when gathering players

It's annoying that the bot doesn't say who is already in a game when someone new joins it,a s it is easy to forget if you are already playing if it's been a while since the last turn:

<grifferz> AgainstDev, status
<AgainstDev> grifferz: A game exists but we only have 3 players. Find me 1 more and we're on.
<AgainstDev> Any takers? Just type "AgainstDev: me" and you're in.

So am I already playing or what?!

<grifferz> AgainstDev, dealmein
<AgainstDev> grifferz: Heyyy, you're already playing!

fffffffuuuuuuuu!
If it had instead said…

<grifferz> AgainstDev, status
<AgainstDev> grifferz: A game exists but we only have 3 players: you, bob and carol. Find me 1 more and we're on.
<AgainstDev> Any takers? Just type "AgainstDev: me" and you're in.

…then I'd have known.
On the other hand, perhaps the bot should avoid highlighting people who aren't required to take some sort of action?

Highlighting people who are already in the game could motivate them to retire or poke non-players to play. However it could get old quickly if some random keeps asking for status.

Good point. Perhaps if you're one of the players it could say:

<PAH> grifferz: A game exists but we only have 3 players (including you). Find me 1 more and we're on.
<PAH> Any takers? Just type "AgainstDev: me" and you're in.

or if you're not it could say:

<PAH> grifferz: A game exists but we only have 3 players. Find me 1 more and we're on.
<PAH> grifferz: How about you? Just type "AgainstDev: me" and you're in.

Looks good to me.


koboldcpp: drop unused args, refactor darwin sdks

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 349052

aarch64-darwin

:white_check_mark: 1 package built:

koboldcpp

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 349052 --extra-nixpkgs-config '{ allowAliases = false; allowBroken = false; allowUnfree = true; checkMeta = true; cudaSupport = true; cudaCapabilities = [ "7.5" ]; }'

x86_64-linux

:white_check_mark: 1 package built:

koboldcpp

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 349052

x86_64-linux

:x: 1 package failed to build:

koboldcpp

aarch64-darwin

:white_check_mark: 1 package built:

koboldcpp

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 349052

x86_64-darwin

:white_check_mark: 1 package built:

koboldcpp

aarch64-darwin

:white_check_mark: 1 package built:

koboldcpp

FWIW the pattern is different and simpler now in staging-next after https://github.com/NixOS/nixpkgs/pull/346043. (Though this form will still work for compatibility.)

If you wanted to do this on staging-next instead, you would leave stdenv alone, add apple-sdk_12 (or whichever SDK is best‐supported) and (darwinMinVersionHook "10.15") to buildInputs, remove the -F lines (and perhaps the -frameworks, if the upstream build system will detect them correctly with a normal SDKROOT), drop the AArch64 requirement from metalSupport, and remove all the framework dependencies.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 349052

x86_64-darwin

:white_check_mark: 1 package built:

koboldcpp

aarch64-darwin

:white_check_mark: 1 package built:

koboldcpp

Sorry for the slow response. The changes look correct to me, although I haven’t checked the source code extensively to determine that the macOS 12 SDK is optimal for compatibility and functionality (but if it builds and runs, then it should be fine, and any further refinements can wait).

Does the new apple-sdk pattern allow building Xcode projects, or is that still not possible?

If it is possible, can you point me to a resource?
If it is not possible, will it be possible in the future?

I’d suggest reading the Darwin section of the Nixpkgs manual (note: this is for unstable which will change a few things there soon, since the 24.11 manual isn’t on the site yet). We do have xcbuild packaged, although as it is sadly unmaintained upstream it cannot support some of the newer features of Xcode projects. But in general it’s a lot easier to build macOS GUI applications now, and hopefully it’ll continue to get better with developments like @viraptor’s ibtool work!

Tested again with Phi-3.5-mini-instruct-Q4_0.gguf, everything works as expected
Video:

https://github.com/user-attachments/assets/6cb3c0cb-e54d-4235-8db5-a6f229dcb27e

As seen in the video, the GPU gets utilized when generating text


Fix wrong condition for pull config from containers or hosts

@davidjpeacock Can you review this and merged please, it's simple (but important one) :)
thx


feat(init): add target menu to init

Here are some screenshots of the 3 main init workflows. Each screenshot is a spot where your are stopped to make a decision. The displayed value is the the one --yes would have selected. I always press enter, getting the same result as --yes.
First Init Workflow
This is a True Init, where cargo-dist wasn't setup at all.

final output:

Upgrade Workflow
This is someone running cargo dist init to update to a new version of cargo-dist. In this case they are prompted to setup the new pr-run-mode feature:

final output:

Up To Date Workflow
This is someone running cargo dist init with an up to date cargo-dist. In this case they're either looking to change targets/installers, or just want to run generate.

final output:

Got tired of seeing the [profile] stuff so prominently, so I removed it completely from the top, and now have it only show up if it's being made for the first time:
First Init

Update / Up To Date


feat:dwa-starter-vue-app-hello-word

What type of PR is this? (check all applicable)

[ ] ♻ Refactor
[ ] ✨ New Feature
[ ] 🐛 Bug Fix
[ ] 📝 Documentation Update
[x] 👷 Example Application
[ ] 🧑💻 Code Snippet
[ ] 🎨 Design
[ ] 📖 Content
[ ] 🧪 Tests
[ ] 🔖 Release
[ ] 🚩 Other

Description

Added setup files for dwa starter vue app including readme for setting it up locally.
Related Tickets & Documents

Resolves #64
Mobile & Desktop Screenshots/Recordings

Added code snippets?

[ ] 👍 yes
[x] 🙅 no, because they aren't needed

Added tests?

[ ] 👍 yes
[ ] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

No tests? Add a note

Added to documentation?

[x] 📜 readme
[ ] 📜 contributing.md
[ ] 📓 general documentation
[ ] 🙅 no documentation needed

No docs? Add a note

[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?

I see you added tailwind. As an optional plus, if you actually use shadcn for vue (https://github.com/radix-vue/shadcn-vue) we could leverage a lot of the existing dwa starter in react!

i see it looks pretty neat, I'll def be adding em

finally both tests passes now!

yay @Johnnyevans32 great job! I changed this issue to a medium instead of a small for you since there were a few more unexpected requirements.


JSON build error

Describe the issue
Build errors:
Assets/Vimeo/Scripts/Player/VimeoPlayer.cs(339,34): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Recorder/VimeoPublisher.cs(55,42): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Recorder/VimeoPublisher.cs(129,34): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Recorder/VimeoPublisher.cs(147,34): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Services/VimeoUploader.cs(93,37): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Steps to reproduce the problem
Import package vimeo-0.9.3.unitypackage
Build
Unity version
Unity 2017.3.1f1
vimeo-0.9.3.unitypackage
Operating system
Windows 10

Thanks for reporting. Will look into it.

Just search and replace JSON.Parse with JSONNode.Parse

I'm unable to recreate this issue in 2018.2 and 2017.3.1f1. JSON.Parse should exist. Is it possible you have a class called JSON that is conflicting?

@michaelboccara which platform were you building for? Windows?

Hi, ok I know why the problem is happening with me only: I have other JSON packages installed in my project (with JSON as a namespace rather than a static class). Still strange that the compiler handles this ambiguity in such a bad way. For this package I guess it would be safer to use an explicit naming Vimeo.SimpleJSON.JSON. Or at least SimpleJSON.JSON.

I have a forked branch that reproduces the problem and suggests a fix.
https://github.com/vimeo/vimeo-unity-sdk/pull/63
Basically I suggest, to avoid problems, not to use the JSON static class, and write
JSONNode node = JSONNode.Parse(jsonString);
instead of:
JSONNode node = JSON.Parse(jsonString);

Fixed in #65 - now in master. Thank you, @michaelboccara !


a quick start on fewer warnings

Very small start to address #66.
Basically I just tested that doing this reduced warnings by one. It did.
We won't be able to get rid of some errors associated with setting diffusivity to zero, but should be able to get rid of divide by zero errors we have control of.

Pull Request Test Coverage Report for Build 459

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

Totals

Change from base Build 432:
0.0%

Covered Lines:
1507

Relevant Lines:
1817

💛  - Coveralls


feat: add --reels flag for downloading Reels videos from profiles

Fixes #812.
Uses doc_id-based graphql queries identified from the IG web client. Requires fetching additional metadata for each reel which can eventually exhaust IG rate limits.

Needed feature. Please merge it

Very needed feature. The current wave of content creators are using IG similarly to Tiktok and have only a few hundred posts but multiple hundreds to thousands of reels

@exwm A quick note as I just tested your update: When downloading reels vs stories or posts, the total count isn't functioning as expected.
For example, I just downloaded the reels for a certain profile. Instead of [1/22], [2/22], [3/22]...[22/22], it was just [1], [2], [3]...[22] then done.
Also could be user error as I didn't update to your branch, but edited my library to match your update. I can restore to my backup and reupdate if you think I'm wrong.

using --reels is not working for me, not sure why tbh. It only downloaded one reel.

@exwm A quick note as I just tested your update: When downloading reels vs stories or posts, the total count isn't functioning as expected.
For example, I just downloaded the reels for a certain profile. Instead of [1/22], [2/22], [3/22]...[22/22], it was just [1], [2], [3]...[22] then done.  Is that what you meant in your notes on structures.py?
Also could be user error as I didn't update to your branch, but edited my library to match your update. I can restore to my backup and reupdate if you think I'm wrong.

Yes, I wasn't able to find a total count for reels so that is expected.

@exwm I installed your fork, but unfortunately, I am unable to download reels.
I get the error KeyError: 'edge_felix_video_timeline'
Do you maybe have an idea on how to fix it?
I tried to download the reels by running instaloader --reels accountname --load-cookies Chrome  and I'm on Ubuntu 22.04.
Thank you :)

@Arche151
edge_felix_video_timeline is only referenced when --igtv is enabled I think. IGTV was removed from IG as far as I know. Are you sure you didn't add --igtv somewhere?

@exwm With the new version, the reels-download works now! Thanks a lot for the fix :)

@exwm  Hmmm. I seem to be running into an error and not sure why, because I thought references to "rhx_gis" this were removed.
For this example, I'm currently scraping only stories. I use an arg file that has about 12 profiles in it. Then I run it from the CL. One of the 12 profiles is one that goes active and inactive every few days, so I keep it in the list just to let me know when she's back. But after updating my setup to the files you've updated for the reels downloads, I've started getting the folowing:
Using latest stamps from C:\Users\XXXX\AppData\Local\Instaloader\latest-stamps.ini.
Loaded session from C:\Users\XXXX\AppData\Local\Instaloader\session-XXXX.
Logged in as XXXX.
Trying to find profile laurenhamden using its unique ID 807863763.
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python311\Scripts\instaloader.exe_main.py", line 7, in
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\instaloader_main.py", line 584, in main
exit_code = main(loader,
^^^^^^^^^^^^^
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\instaloader_main.py", line 264, in _main
profile = instaloader.check_profile_id(target, latest_stamps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\instaloader\instaloader.py", line 1396, in check_profile_id
profile_from_id = Profile.from_id(self.context, profile_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\instaloader\structures.py", line 912, in from_id
rhx_gis=context.root_rhx_gis)['data']['user']
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'InstaloaderContext' object has no attribute 'root_rhx_gis'
So it seems something in your code is breaking when we hit a profile we have to look up by ID. And calling something that I thought had been removed in a previous release?

@MonkeyKingViper I think that's because this PR is against the upcoming v4.14 release and branch. This branch is based on v4.13 and has not incorporated v4.13.1 which removed rhx_gis.
You could rebase onto 4.13.1 or master until this is sorted out by the maintainers.

@MonkeyKingViper I think that's because this PR is against the upcoming v4.14 release and branch. This branch (https://github.com/instaloader/instaloader/tree/upcoming/v4.14) is based on v4.13 and has not incorporated v4.13.1 which removed rhx_gis.
You could rebase onto 4.13.1 or master until this is sorted out by the maintainers.

Ah, interesting. I didn't realize that but it makes total sense. Thank you.

Thanks a lot! We merged it and created a pre-release v4.14rc1 with it included.

showing error like this instaloader: error: unrecognized arguments: --reels


Pinned NED doesn't invoke NED but just Notion

What is happening?
I am using the portable version of notion-enhancer desktop in parallel with Notion 2.0.18 and when I pin notion-enhancer desktop to the taskbar and when I try to launch it, it just opens Notion. But it opens the enhanced version by clicking the .exe file from the portable directly. But it is the same .exe file I pinned to the taskbar. The enhanced version of course opens the Notion desktop (original) but with a plugin of Notion enhancer visible in the sidebar. But pinning doesn't work.
What should be happening?
The pinned item must open Enhanced Notion
Specifications
OS: Windows 11 (21H2, Build: 22000.434, Stable)
Notion: 2.0.18
Notion enhancer desktop: 0.11.0 (portable)

Using the vanilla & enhanced versions in parallel is not recommended and is expected to cause problems. Please uninstall vanilla Notion and follow the instructions here to cleanup the app shortcuts/taskbar icon: https://github.com/notion-enhancer/notion-repackaged/issues/13#issuecomment-965690286


As a user, I want to see a pop up list of tasks nearing deadline upon app start up

feature implemented #158


[BUG] SRT option --linger is not working

Bug description:
The --linger SRT option is currently not working, and generate an error when used.
How to reproduce:
Run the command: tsp -I srt --listener <IP_ADDRESS>:6000 --linger 10 -O drop
Expected behavior:
The command is successful, and socket is configured with the configured linger timeout
Errors and logs:
* Error: srt: error during srt_setsockflag(SRTO_LINGER): Operation not supported: Bad parameters

Environment:

OS: Linux
OS version: Ubuntu 22.04
TSDuck full version: 3.33-3139
Installation type: official binary

Additional information:
It appears the socket option is configured with an integer where it would expect a struct linger

Hi @sylvain-apivideo
Thanks for reporting this. Silly mistake indeed. I fixed it.
You can rebuild from the current state of the repo or wait for the next nightly build. Will be version 3.35-3231.

That was fast.
Thanks for fixing it.


Add AppConstants to try and centralize stuff

Ah, for sure. This is just cleanup and nothing new added yet. Thanks for the merge :)


Investigate running test code and renderer code in the same thread/sync context

The library has some rather complex locking/volatile.read/volatile.read checks in place to avoid memory coherence problems, that can cause tests to fail when the test code and renderer code is not running on the same core/cpu.
It might be worth switching to a model, where both test code and renderer share the same dispatcher/sync context. So lets investigate. Here are a few questions to answer:

How do we avoid test and component under test/renderer deadlocking each other?
What compromises do we have to make for the user, e.g. will writing tests become more complicated for 90% of the cases, or just for the 10% that involves async rendering?
Are there any special requirements from Blazor?
Can a general solution be created that is independent of test framework, e.g. nunit/xunit/mstest?

Related issue: #118

Inspiration from @jspuij: I've written my own for BlazorWebView, because I have a dedicated thread running the Blazor Renderer. This is more like the classic desktop "UI" model, where you have a single thread running the UI. The thread hopping on the thread pool that the server side renderer exhibits might confuse desktop users. https://github.com/jspuij/BlazorWebView/blob/master/src/BlazorWebView/PlatformDispatcher.cs
and https://github.com/jspuij/BlazorWebView/blob/master/src/BlazorWebView/PlatformSynchronizationContext.cs

Your safest bet would be to use my dispatcher. Then run the tests on the threadpool (most test runners probably will, but dedicated threads will probably as well). Create a SynchronizationContext for async operations or use this one: https://github.com/StephenCleary/AsyncEx/wiki/AsyncContext.
You can probably remove all locks / volatile reads / fences if you make sure that you run on the AsyncContext or invoke back to it.
To pass around state, I'd create a "TestContext" that is passed around with all calls that has all state for the currently executing test. If you don't want to do that, or hide that state, you can use AsyncLocal.

@jspuij xUnit runs tests on the thread pool and has, as far as I know, it's own async context. I am pretty sure the other test frameworks does something similar.
Could a strategy be to adopt the test frameworks async context/dispatcher?

Yes, that will work. You can probably check SynchronizationContext.Current to see if there is one. If there is one (xunit) good, if there isn't one, create your own. Some test frameworks won't provide them, some will only provide them if the test is async (e.g. returns task).

It might be worth switching to a model, where both test code and renderer share the same dispatcher/sync context.

I will argue that this is impossible.
I arrived at this issue because I ran into another Dispatcher.InvokeAsync(Action).Wait() being called instead of Dispatcher.InvokeAsync(Func<Task>).Wait()  in Bunit.Rendering.TestRenderer.RenderFragmentInsideWrapper(RenderFragment renderFragment).
I was about the file a bug report until I realized that there's not even a way around this. The reason is a restriction posed by Blazor: namely that the delegate Microsoft.AspNetCore.Components.RenderFragment is void-returning.
A void-returning async method is in principle not awaitable. Under the assumption that you cannot modify the void-returning async method, there's no operation you can do to ensure that all its asynchronous continuations are finished: see e.g. this stackoverflow question.
I realize that you're already talking about creating a custom SynchronizationContext, which I think may be the only way but then still I don't see it. Admittedly that's over my head.
In that route might still be possible I just wanted to point out this complication.

Also in #177 I asked the question "Why do we need the WaitFor* methods, why can't the bUnit API not just return tasks?"
I got the answer that returning void is simpler for the users, which I found a bit unsatisfactory because to me tasks are simpler. But now I understand the real answer: it's impossible to return tasks because blazor doesn't return the tasks.
Finally I remark that this argument is imho worth mentioning to explain why you need those methods e.g. here.

@JeroenBos thanks for the input. My gut feeling is that you are correct.
In some places Blazor does return a Task, in particular when we trigger event handlers, so in some cases it might work.
Can you describe the scenario you mention in more details?

Well my particular scenario might not be so interesting because I'm shooting myself in the foot by using MSTest.
Nevertheless the details could help so I'll explain. I did something similar to in SnapshotTest:
public class MyTests // : RazorTestBase
{
        [TestMethod]
	public async Task Run() // similar to SnapshotTest.Run
	{
		Services.AddDefaultTestContextServices();
		var (cutId, cut) = this.Renderer.RenderComponent<MyComponent>(parameters);
		var icut = cut.ToIRenderedComponent(cutId, this.Services);
		using var waiter = new WaitForStateHelper(icut, somePredicate);
		// some assertion
	}
}

/// MyComponent.razor:
@code
  {
	public override async Task SetParametersAsync(ParameterView parameters)
	{
		await Task.Delay(100);
	}
}

But this doesn't work and can never work without the cooperation of the SynchronizationContext.
The line icut = cut.ToIRenderedComponent is never reached because MSTest uses the default SynchronizationContext.
The flow is like this:

We arrive in the Run method above from a test (with MSTest we're on the process's main thread).
Renderer.RenderComponent is called  which creates a RenderFragment
that RenderFragment is dispatched
The scheduler (Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext) just executes the render synchronously
We arrive in the SetParametersAsync still synchronously on the main thread, we do the await statement but the SynchronizationContext.Current is null (because MSTest), so the continuation is scheduled on the thread pool
The main thread has nothing to do anymore because there's nothing to await because the chain of async-all-the-way-down has been broken by a void-returning async method (the RenderFragment)
so the program terminates mid-test.
Note that it terminated without there ever having been the change to register the WaitForStateHelper.

Without any task to await on the main thread you'd have to resort to hacks to keep the process alive.
My first reaction was that I should be able to await Renderer.RenderComponent to keep the main thread alive, but in reality it's because Blazor swallows the task, which is why I don't consider it an issue with bUnit. Although I would still love a SynchronizationContext such that I could await Renderer.RenderComponent (and thereby being closer to fully supporting MSTest) and do await with WaitFor-helpers, I realize that Blazor is making it difficult.

Thanks @JeroenBos.
Which version of MSTest are you using, and does it allow you to specify a custom sync context? I ask because if not, then I probably need to stop telling folks that bUnit and MSTest works together.
Btw., im curious, why are you using WaitForStateHelper directly instead of the WaitFor... extension methods?

I reference MSTest like so: <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />. The latest version is 16.7.1 so that is unlikely to make a difference.
MSTest doesn't provide a way to set a custom sync context. My solution looks something like this using the AsyncEx library. Using that context everything works like a charm.
As for the WaitForStateHelper. I don't have a good reason, by accidental fluke. I never changed it, but I will now! It's simply because I discovered the helper before the extension methods. Not because the documentation isn't good, but because I'm limited by linux/vscode and Omnisharp's intellisense just isn't good enough to do library exploration so I manually browsed the source code.

OK. It would be super helpful to other would-be MSTest+bUnit folks if you could create small hello world sample test project where you show this. No fancy tests, just the bare minimum.
Then I can update the docs or perhaps create a template for those that need to use MSTest.

Moving this to the backlog. It might be possible, but currently it doesn't seem like it.

My first reaction was that I should be able to await Renderer.RenderComponent to keep the main thread alive, but in reality it's because Blazor swallows the task, which is why I don't consider it an issue with bUnit. Although I would still love a SynchronizationContext such that I could await Renderer.RenderComponent (and thereby being closer to fully supporting MSTest) and do await with WaitFor-helpers, I realize that Blazor is making it difficult.

This is true and by design, otherwise Blazor would never be able to render anything untill the last task is awaited, so it runs through a synchronous path, while firing off async tasks that will complete in the future (and might trigger another render) and are never awaited.
The easiest way to make sure that the test finished is to create a TaskCompletionSource on the main thread that you await, and trigger the completion of the TCS inside the async Blazor Lifecycle methods.

The easiest way to make sure that the test finished is to create a TaskCompletionSource on the main thread that you await, and trigger the completion of the TCS inside the async Blazor Lifecycle methods.

That would probably be a workaround for making RenderComponent async/awaitable.
But if we are in a scenario where a components life cycle methods awaits an uncompleted task during the initial render, e.g. a timer task, the second render will happen later after the await of RenderComponent is over in the test. So for certain test cases, where users want to verify the component instance/markup between the first and second render, they would need a "wait for" method, like the ones in bUnit already, to await one or more renders, before continuing the test, e.g. yield to the renderer so it can process any awaiting async renders.
Unless I am missing something, putting things in the same sync context wont really make a difference to the APIs then.

The easiest way to make sure that the test finished is to create a TaskCompletionSource on the main thread that you await, and trigger the completion of the TCS inside the async Blazor Lifecycle methods.

That would probably be a workaround for making RenderComponent async/awaitable.
But if we are in a scenario where a components life cycle methods awaits an uncompleted task during the initial render, e.g. a timer task, the second render will happen later after the await of RenderComponent is over in the test. So for certain test cases, where users want to verify the component instance/markup between the first and second render, they would need a "wait for" method, like the ones in bUnit already, to await one or more renders, before continuing the test, e.g. yield to the renderer so it can process any awaiting async renders.
Unless I am missing something, putting things in the same sync context wont really make a difference to the APIs then.

You are right. I'm not familiar with bUnit (sorry, shame on me), so I understand that you've got WaitFor methods that wait for elements to occur. I was just suggesting for @JeroenBos to use a TCS inside his own test, but he can use WaitFor just as well. It's inherent to the Blazor architecture and no SynchronizationContext will change this.

OK, in that case I feel confident enough to close this issue. If somebody figures out a good way to do this that improves the usability of bUnit, we can revisit this.


python312Packages.google-cloud-secret-manager: 2.20.0 -> 2.20.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python312Packages.google-cloud-secret-manager is: Secret Manager API API client library
meta.homepage for python312Packages.google-cloud-secret-manager is: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-secret-manager
meta.changelog for python312Packages.google-cloud-secret-manager is: https://github.com/googleapis/google-cloud-python/blob/google-cloud-secret-manager-v2.20.1/packages/google-cloud-secret-manager/CHANGELOG.md
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.20.1 with grep in /nix/store/pi2bimdw6cww5v34bd7yy94r1csb9nfz-python3.12-google-cloud-secret-manager-2.20.1
found 2.20.1 in filename of file in /nix/store/pi2bimdw6cww5v34bd7yy94r1csb9nfz-python3.12-google-cloud-secret-manager-2.20.1

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)

3 package rebuild(s)

First fifty rebuilds by attrpath

python311Packages.google-cloud-secret-manager
python312Packages.google-cloud-secret-manager

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/pi2bimdw6cww5v34bd7yy94r1csb9nfz-python3.12-google-cloud-secret-manager-2.20.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python312Packages.google-cloud-secret-manager https://github.com/r-ryantm/nixpkgs/archive/77b593e6a5bfca7e213dc9c7a4cd93fb228d6b8c.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/77b593e6a5bfca7e213dc9c7a4cd93fb228d6b8c#python312Packages.google-cloud-secret-manager

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/pi2bimdw6cww5v34bd7yy94r1csb9nfz-python3.12-google-cloud-secret-manager-2.20.1
ls -la /nix/store/pi2bimdw6cww5v34bd7yy94r1csb9nfz-python3.12-google-cloud-secret-manager-2.20.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

4 packages built:

python311Packages.google-cloud-secret-manager
python311Packages.google-cloud-secret-manager.dist
python312Packages.google-cloud-secret-manager
python312Packages.google-cloud-secret-manager.dist

Maintainer pings
cc @siriobalmelli for testing.

Result of nixpkgs-review pr 325733 run on aarch64-darwin 1

4 packages built:

python311Packages.google-cloud-secret-manager
python311Packages.google-cloud-secret-manager.dist
python312Packages.google-cloud-secret-manager
python312Packages.google-cloud-secret-manager.dist


Fix math_utils.DivCeil

The current implementation yields incorrect values when x is zero. As this function is used when calculating the instances used by a builtin, when running a cairo program with a builtin who's  segment used size is zero, the vm would throw an invalid stop ptr error, as the used cells (calculated from used_size.div_ceil(cells_per_instance) * cells_per_instance) would not be zero

Codecov Report

Merging #284 (54f867d) into main (102682a) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

:exclamation: Current head 54f867d differs from pull request most recent head b4312d7. Consider uploading reports for the commit b4312d7 to get more accurate results

@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   58.75%   58.71%   -0.05%
==========================================
  Files          42       42
  Lines        5383     5387       +4
==========================================
  Hits         3163     3163
- Misses       1947     1951       +4
  Partials      273      273

Files Changed
Coverage Δ

pkg/utils/math_utils.go
0.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Fix logout bug in pass-auth

we use https://github.com/jaredhanson/passport
the most recent release of passport.js changed the signature for the logout method as described here: https://medium.com/passportjs/fixing-session-fixation-b2b68619c51d
unfortunately using this new method signature causes the logout process to hang
for now we've reverted to v0.5.3, but we should update to the latest version and fix whatever issue there is

Need to upgrade Passport versions and check relevance of this issue

Closing due to #903


[ffmpeg:arm64-linux] build failure

Host Environment

OS: Linux
Compiler: GCC 9.3.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install ffmpeg
find installed/ -name "*.lib"

# Output:
installed/arm64-linux/lib/avdevice.lib
installed/arm64-linux/lib/avcodec.lib
installed/arm64-linux/lib/swresample.lib
installed/arm64-linux/lib/swscale.lib
installed/arm64-linux/lib/avfilter.lib
installed/arm64-linux/lib/avresample.lib
installed/arm64-linux/lib/avutil.lib
installed/arm64-linux/lib/avformat.lib
installed/arm64-linux/debug/lib/avdevice.lib
installed/arm64-linux/debug/lib/avcodec.lib
installed/arm64-linux/debug/lib/swresample.lib
installed/arm64-linux/debug/lib/swscale.lib
installed/arm64-linux/debug/lib/avfilter.lib
installed/arm64-linux/debug/lib/avresample.lib
installed/arm64-linux/debug/lib/avutil.lib
installed/arm64-linux/debug/lib/avformat.lib

Failure logs
The build completes successfully, but the output libraries have the wrong extension (avutil.lib should be libavutil.a) and FindFFMPEG fails
(Notice how it says --target-os=win32 in Build Options)
Computing installation plan...
The following packages will be built and installed:
    ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,postproc,swresample,swscale]:arm64-linux
Detecting compiler hash for triplet arm64-linux...
Starting package 1/1: ffmpeg:arm64-linux
Building package ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,postproc,swresample,swscale]:arm64-linux...
Could not locate cached archive: /home/simon/.cache/vcpkg/archives/de/de142ddb2b4b8191cb58406a6b8bdc646c4076e9.zip
-- Using community triplet arm64-linux. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: /home/simon/vcpkg_master/vcpkg/triplets/community/arm64-linux.cmake
-- Using cached /home/simon/vcpkg_master/vcpkg/downloads/ffmpeg-ffmpeg-n4.2.tar.gz
-- Cleaning sources at /home/simon/vcpkg_master/vcpkg/buildtrees/ffmpeg/src/n4.2-2f6d2343f6.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/simon/vcpkg_master/vcpkg/downloads/ffmpeg-ffmpeg-n4.2.tar.gz
-- Applying patch 0001-create-lib-libraries.patch
-- Applying patch 0003-fix-windowsinclude.patch
-- Applying patch 0004-fix-debug-build.patch
-- Applying patch 0005-fix-libvpx-linking.patch
-- Applying patch 0006-fix-StaticFeatures.patch
-- Applying patch 0007-fix-lib-naming.patch
-- Applying patch 0008-Fix-wavpack-detection.patch
-- Applying patch 0009-Fix-fdk-detection.patch
-- Applying patch 0010-Fix-x264-detection.patch
-- Applying patch 0011-Fix-x265-detection.patch
-- Applying patch 0012-Fix-ssl-110-detection.patch
-- Using source at /home/simon/vcpkg_master/vcpkg/buildtrees/ffmpeg/src/n4.2-2f6d2343f6.clean
-- Building Options: --enable-asm --enable-yasm --disable-doc --enable-debug --enable-runtime-cpudetect --disable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --enable-postproc --enable-swresample --enable-swscale --enable-avresample --disable-avisynth --disable-bzlib --disable-iconv --disable-libfdk-aac --disable-lzma --disable-libmp3lame --disable-cuda --disable-nvenc --disable-nvdec  --disable-cuvid --disable-opencl --disable-openssl --disable-libopus --disable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libtheora --disable-libvorbis --disable-libvpx --disable-libwavpack --disable-libx264 --disable-libx265 --disable-zlib  --enable-cross-compile --target-os=win32 --arch=arm64 --pkg-config-flags=--static
-- Building Release Options:
-- Building ffmpeg for Release
-- Building Debug Options: --debug
-- Building ffmpeg for Debug
-- Installing: /home/simon/vcpkg_master/vcpkg/packages/ffmpeg_arm64-linux/share/ffmpeg/copyright
-- Performing post-build validation
-- Performing post-build validation done
sh: 1: zip: not found
Failed to store binary cache /home/simon/.cache/vcpkg/archives/de/de142ddb2b4b8191cb58406a6b8bdc646c4076e9.zip: No such file or directory
Building package ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,postproc,swresample,swscale]:arm64-linux... done
Installing package ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,postproc,swresample,swscale]:arm64-linux...
Installing package ffmpeg[avcodec,avdevice,avfilter,avformat,avresample,core,postproc,swresample,swscale]:arm64-linux... done
Elapsed time for package ffmpeg:arm64-linux: 28.79 min

Additional context
I think this could be related to https://github.com/microsoft/vcpkg/pull/13465, @xieyubo do you have any clues? I'm getting the same issue on master and xieyubo:fix-13395

Thanks for reporting this issue. Will take a look.


Support to fetch entries asynchronously

Is your feature request related to a problem? Please describe.
In the current API new appended entries and committed entries are fetched into Ready synchronously. However In many cases we want to fetch them asynchronously. For example:

There are lots of entries need to be fetched and it is not expected to block the current thread;
The memory usage is almost reach the limit, it it not expected to fetch lots of entries into memory.

Describe the solution you'd like
Adjust Ready to
fn Ready::entries(&self) -> Either<&[Entries], Range<u64>>;
fn Ready::committed_entries(&self) -> Either<&[Entries], Range<u64>>;

And add 2 new fields into Config:
pub struct Config {
    fetch_entries_asynchronously: bool,
    fetch_committed_entries_asynchronously: bool,
}

@BusyJay @gengliqi @Little-Wallace PTAL.

I think we should also consider the entries in AppendEntries msg. They can be fetched asynchronously too.

Log term should also be checked.

Log term should also be checked.

How about maintain it with a Vec<(term, index) in memory for unapplied entries? And only the first entry in a term needs to be recorded, so it won't be expensive.


DOA estimation

Hi all.
I have multichannel signal that recorded at some coordinate and I want to estimate the DOA, I'm using the MUSIC beamformer but I got incorrect coordinates, is there any explaination how to estimate the correct direction?

Could you provide a minimal example with what you're trying to do and what the deviations to the expected results are?