Play rtp over UDP

Hi,
I have tryed to play rtp over Multicast and it doesn't work, What should I do in order to play it?
Thanks

Hi,
I don't know about Multicast but rtp over UDP should work.
Is there any relevant output in the debug console ?

Hi,
Thanks for your answer. I have tried it again and I think that there aren't information on debug console, because it has run with my app and there are more events. Do errors of ffmpeginterop appear with her name? Because if it has not her name, there is a NullReference.
Thanks

Hi,
sorry for the delay.
I don't know if it is relevant in your case, but you might want to try to declare "Internet (Client & Server)" capability in your app's manifest if not already done.

Hi reego-fr,
I thought it on February as you have thought and I activated it, but it didn't work. Because Multicast has a behavior as server and client at same time. So I believe it is necessary. Do you have more ideas?
Thanks!

Can ffplay play the same stream ? This is the first thing I would try.
Secondly, where does this project's code stop ? Are there any requested samples read from your stream ?
If the stream does not open at all, I would check for any windows app network limitation applicable in your case as opposed to a "legacy" app (I have no experience with multicast, would private network capability enable it ?), use a network packets dump (if you know what to look for) and check ffmpeg logs at the same time (I don't have sample code but I know there is a way to subscribe to ffmpeg log outputs).

Hello,
Sorry by not answer before. I have returned with this on december, and I have been able  to play some frames with this option: "rtsp_transport", "udp_multicast". I have checked the network (i'm working with cable in order to reduce packet losses) and computer received all packets. If I play the file, it work correctly but if it is broadcasted on multicast with RTP, app can get show some frames. What can you give me some advice in order to play all frames?

Are there any news/advices in order to play RTP over multicast?
Thanks

This works for me. See my previous issue Minimize latancy over RTP #110

Thank @Belunn I'm going to try it and I'll tell you.

Is it working with master or what branch? Because I have executed it and it fires me an exception:

System.AccessViolationException.
HResult=0x80004003
Message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The url is: rtp://<IP_ADDRESS>:5004
I have searched the branch 3.2 but I haven't found it. Thanks

It was some time ago som my memory is´nt very fresh. But the branch 3.2 is for the FFmpeg version. I think FFMpegInterop is master if I remember correct, but I am not sure.

Thank you by details. I have searched the branch 3.2 and it doesn’t work. I have tried with defaults values, with udp_multicast and a combination of udp multicast and options that you indicated.
Thank you

Ok. Too bad that it does'nt work for you. I am afraid that I have no more ideas.


fix: accept newlines before an operator

Inserting newlines after an operator (a | \n b), currently works, but placing the newline before it (a \n | b) fails, because the dynamic operator parsing code is hardcoded to only skip spaces. (The static parser did correctly check for any whitespace here.) In addition, the list of terminating characters needs to include non-space whitespace, otherwise the newlines can end up as part of the parsed type.

@refi64 Looks great, thanks for fixing this!


INFINITY-2031 User-facing changes to 'endpoints' API

This covers changes that affect the EndpointsResource command. Changes for the yaml spec will be done in a separate PR.

Files VIPs against port name rather than VIP name
Removes 'vips' list removed due to the above
Adds validation that port names (which are used as endpoint names across the service) cannot be duplicated. This validation will later be loosed to only apply when a port is configured as advertisable (the current default)
Update elastic to have e.g. 'coordinator-http' and 'coordinator-transport' instead of just 'http' and 'transport' in its endpoints names, fixing its current conflicting endpoint names. Note that actual hostnames are unaffected. See endpoints example in updated elastic docs.

Do not merge yet. Despite the status, fixes are still needed for helloworld. See prior commit where helloworld had failed (and then not re-run)

Verified checks.


Laravel 9.x Shift

This pull request includes the changes for upgrading to Laravel 9.x. Feel free to commit any additional changes to the shift-71862 branch.
Before merging, you need to:

Checkout the shift-71862 branch
Review all pull request comments for additional changes
Run composer update (if the scripts fail, add --no-scripts)
Clear any config, route, or view cache
Thoroughly test your application (no tests?, no CI?)

If you need help with your upgrade, check out the Human Shifts. You may also join the Shifty Coders Slack workspace to level-up your Laravel skills.

:information_source: Shift noticed you have additional namespaces in your application. You may use the Consolidate Namespaces Shift to simplify your namespaces into the default Laravel App namespace.

:x: Laravel 9 removed its dependency for fruitcake/laravel-cors. This behavior is not provided by the framework through Illuminate\Http\Middleware\HandleCors.
Shift found references to Fruitcake\Cors in the following files. You should review these references and adopt the internal middleware.

[ ] src/App/HttpKernel.php

:information_source: Laravel 9 moved the resources/lang folder to the top level of the project. While Shift moved and replaced references to this folder, you may have additional references to this folder which need to be updated.

:warning: In previous versions of Laravel, the getSession method returned an instance of Illuminate\Session\Store. In Laravel 9, getSession now returns a Symfony\Component\HttpFoundation\Session\SessionInterface implementation as the underlying Symfony method enforces this return type.
Should found potential uses of this method in the following files. You should review these instances to ensure your code is compatible with this type change.

[ ] src/Domain/Invitations/Actions/AcceptInvitationFromSessionAction.php

:warning: Laravel 9 upgraded to Flysystem 3.0 causing the behavior of the Storage facade to change slightly:

Write operations (such as put and write) now overwrite existing files by default, and now return false instead of an exception on failure.
Read operations (such as get and download) now return null instead of a FileNotFoundException when a file is missing.
The delete operation now returns true even if the file did not exist.

For more details, you may review the Flysystem 3.x section of the Upgrade Guide.

:warning: Laravel 9 transitioned from SwiftMailer to Symfony Mailer. While this transition should be relatively seamless and Shift automates any tedious changes, there are some changes which are not reliably automated.
Dependencies
Some mail providers may require an additional dependency. For example, if you are using Mailgun, then you will need to install the symfony/mailgun-mailer package:
composer require symfony/mailgun-mailer symfony/http-client

Updated Return Types
The send, html, text, and plain methods no longer return the number of recipients that received the message.
Failed Recipients
It is no longer possible to retrieve a list of failed recipients after sending a message. Instead, a Symfony\Component\Mailer\Exception\TransportExceptionInterface exception will be thrown if a message fails to send. Instead of relying on retrieving invalid email addresses after sending a message, it is recommend that you validate email addresses before sending the message instead.
For more details on what has changed you may review the Symfony Mailer section of the Upgrade Guide.

:warning: The FILESYSTEM_DRIVER environment variable was renamed to FILESYSTEM_DISK in Laravel 9. Shift attempted to automate this change, but you should review any additional environment configuration and rename this variable.

:warning: The public/web.config file has been removed from new Laravel projects. The presence of this file creates a potential security risk for projects not using Microsoft IIS as their web server.
Shift detected this file was modified and did not remove it. Unless you are using Microsoft IIS as your web server, you should remove this file.

:information_source: The FILESYSTEM_CLOUD environment variable was removed in a later release of Laravel 8. While you may still use the cloud disk, you are encouraged to configure your own disks.

:warning: Shift upgraded your configuration files by defaulting them and merging your true customizations. These include values which are not changeable through core ENV variables.
You should review this commit for additional customizations or opportunities to use new ENV variables. If you have a lot of customizations, you may undo this commit with git revert 61412f5f and make the config file changes manually.

:warning: The token driver for API authentication is no longer available. This driver was not very robust and was removed from the documentation. Laravel now recommends using Sanctum.
If you were using the token driver, you may re-add it within your auth.php configuration file then migrate to Sanctum at your convenience.

:information_source: Shift updated your dependencies for Laravel 9. While many of the popular packages are reviewed, you may have to update additional packages in order for your application to be compatible with Laravel 6. Watch dealing with dependencies for tips on handling any Composer issues.
The following dependencies were updated by a major version and may have their own changes. You may check their changelog for any additional upgrade steps.

[ ] laravel/sanctum
[ ] spatie/laravel-enum

:information_source: Laravel 9 adopted anonymous migrations. Shift automated this change to align with modern Laravel conventions and avoid naming migrations.

:warning: The $loop variable is no longer available when iterating over a LazyCollection. Shift detected the $loop variable being used in the following Blade templates. You should review these instances to ensure they are not iterating over a LazyCollection or track your own loop variables.

[ ] resources/views/admin/results/list-results.blade.php
[ ] resources/views/livewire/demo-form.blade.php

:information_source: All of the underlying Symfony components used by Laravel have been upgraded to Symfony 6. If you are directly interacting with any Symfony component, you should review the Symfony change log for additional changes.

:information_source: Laravel 9 now uses Vite to build frontend assets. While you may continue to use Laravel Mix, it is no longer the default. If you wish to modernize your application to use Vite, you may run the Vite Converter for free.

:information_source: The app/Models folder was reintroduced back in Laravel 8. This was an optional change. Laravel and the artisan commands will automatically detect if you are using the app/Models folder or not.
If you wish to modernize your application to use the app/Models folder, you may run the Namespace Models Shift for free.

:tada: Congratulations, you're now running the latest version of Laravel!
Next, you may optionally run the following Shifts to ensure your application is fully upgraded, adopts the latest Laravel conventions, and easier to maintain in the future:

Upgrade Checker ensures your application is fully upgraded by detecting any outdated code.
Laravel Fixer automatically updates your code to the latest Laravel conventions.
Tests Generator intelligently generates model factories, HTTP Tests, and configuration for your application.
CI Generator intelligently generates CI jobs to lint PHP, check code style, and run tests, including Dusk.

You may also use the Shift Workbench to automate common tasks for maintaining your Laravel and PHP applications.


Pipeline: support ComponentGraph instance as input

In #2091 our pipelines now require a component_graph parameter. This parameter can either be a) a list of components, either by string name for our core set or a component class, or b) a dictionary describing the component graph in the format required by ComponentGraph
I think we should support a third option: providing a ComponentGraph instance directly to the pipeline init. It should be a small change :)
https://github.com/alteryx/evalml/pull/2091/files#diff-e3cc5bc8079883f5d6d5d526a2e769765d139a49d1c6528dbb0f6ccd83aa75d2R72

This might be added by #2332. I'll take this issue, and use it to make sure that we have test coverage for this :)


[Display news, Gallery view] Title can displays more than 170 characters and Content can't displays 200 characters.

Environment: macOS High Sierra 10.13, Google Chrome 81.0.4044.129 (64-bit)
Reproducable: always
Build found: commit 07bfeb2
Preconditions:

https://ita-social-projects.github.io/GreenCityClient/#/news is opened.

Postconditions:

Delete News from step 2.
(DELETE FROM eco_news_tags
WHERE eco_news_id=600;
DELETE FROM eco_news
WHERE id=600;)

Steps to reproduce

Go to DB (DataGrip);
Create News with Title more that 170 characters and Content more than 200 characters.
(e.g. Title  - 186 characters, Content- 241 characters)
(INSERT INTO eco_news
(ID, title, text, author_id, creation_date)
VALUES (600, 'Doctors and medical professionals from around the globe have called on world leaders in the Group of 20 (G20) to “recover better” from the economic decline caused by the COVID-19 crisis.', 'While greenhouse gas emissions are set to fall this year in the wake of the crisis, any positive impact on the climate could be short-lived and quickly outweighed by increased emissions if the economic recovery resumes on a high-carbon path.', 50 , '"2020-05-29 22:00:00.000000');
INSERT INTO eco_news_tags
(eco_news_id, tags_id)
VALUES (600, 6);)

Actual result:

Title displays 186 characters.
Content displays 199 characters.

Expected result:

Title displays 170 characters.
Content displays 200 characters.

User story: #459

text have cutting for 197 symbols + 3 symbol dots what give us in summary 200 symbols.
Title dont have any validation as we can create in the page 'create news' title with more than 170 symbols. As you did it manually in DB itsnot a bug


Research spotlight CDP-DAG Synthase Tam41

Needs finalising, will add text later

PMID:31178220
Structures of the Mitochondrial CDP-DAG Synthase Tam41 Suggest a Potential Lipid Substrate Pathway from Membrane to the Active Site.

Template
{
"title": "XXXXX et al., YYYY",
"title_link": null,
"panel_type": "spotlight",
"head_image": ["assets/spotlight/YYYY-MM-DD-PMID-name*.png"],
"content": "TEXT.\nOriginally published in JOUNAL.",
"reference_id": "PMID:*******",
"link_label": "Publication record in PomBase ...",
"date_added": "YYYY-MM-DD",
"show_on_front_page": true
},

Template
{
"title": "XXXXX et al., YYYY",
"title_link": null,
"panel_type": "spotlight",
"head_image": ["assets/spotlight/YYYY-MM-DD-PMID-name*.png"],
"content": "Structures of the Mitochondrial CDP-DAG Synthase Tam41 Suggest a Potential Lipid Substrate Pathway from Membrane to the Active Site.\nOriginally published in Structure.",
"reference_id": "PMID:*******",
"link_label": "Publication record in PomBase ...",
"date_added": "YYYY-MM-DD",
"show_on_front_page": true
},

I did it. Can somebody check that it looks OK I think I did everything.
It would be good to move these requests to a config tracker and have a template?

It would be good to move these requests to a config tracker

You're the one who keeps opening them here instead of https://github.com/pombase/pombase-config/issues ;)

Nobody has ever used the config tracker for spotlights ?

True up to date, but your comment yesterday said you thought they should move to "a config tracker". Have you changed your mind, or do you want to switch to using the config tracker for spotlights? I have no preference, really, but your last couple of comments don't seem mutually consistent re what you want to do.

My (complete) thought was, that if we used the config tracker for the spotlights etc, we could template them, a bit like this:

Which would provide a template for each config.
I will put this on the group meeting list of things to discuss.
Or if people think this is a good plan I can open a ticket for it.

I did it.! Can somebody check that it looks OK I think I did everything.

It looks OK.
In the older Spotlights we have made the journal name a link to the journal article.  i.e. the "Cell Reports" in "Originally published in Cell Reports" is a link.  Should we keep doing that?

yes, sorry I  thought that must happen automagically

yes, sorry I thought that must happen automagically

No problem.  I'll fix those.  It's a nice quick Friday afternoon job.


How do I update gulpfile on a live server?

Hello,
I've been using understap's template for a live server. I've been working locally to minify CSS and gulp for refreshing the changes but when I tried it on a live server it was not working properly. I would love some suggestions on this please.

Can you give more details about your live server? OS, node version, error messages, etc.?

The server is running on Linux OS I'm trying to replace some codes in CSS, but it's not reflecting on the live server.

I don't have enough information to help 😕
As said, this gulpfile is supposed to be unmaintained 😕


UX improvements based on meeting June 1 (Tom and Juan)

See Tom's Google Slides. Goal is to visualise CA and WA models provided by Kevin

Some relatively quick notes from the meeting/Tom's slides
Home page:

Auto-counter for model scales located near/above images

Portal page:

Inge's water table depth (and maybe head) as basemaps
Page name: "Explore models"/"Find models"/etc

Organization:

4 total pages: Home/Landing, Portal, Share Data, and About
Statement about model "ownership" and opportunity for model developers to update/override database entries, even if they didn't originally submit it to the repository

Juan, can you add Kevin officially to repository? then he can be added as assignee on issue...

Juan, what is happening with this? any help/support i can provide to get these two things done for the sprint next week? Tom

Juan, can you add Kevin officially to repository? then he can be added as assignee on issue...

Done! @kbefus should have an invite in his inbox

Juan, what is happening with this? any help/support I can provide to get these two things done for the sprint next week? Tom

Hi @tomglee  I've been swamped with other deadlines the last couple of weeks. I'll sit down for a couple of hours now to make some progress. It's a public holiday in Australia today so I'll do what I can...

Done! Changes should be reflected on the app


"internal error: entered unreachable code" when expanding function-like proc macros

editor: vscode (official build, version 1.52.0, commit 940b5f4bb5fa47)
operating system: Arch Linux
rust-analyzer extension: matklad.rust-analyzer v0.2.408
rustc: 1.50.0-nightly (803c60218 2020-12-13)

I have a workspace with two crates defining various proc macros and one crate using them. I don't use any proc macros from crates outside this workspace. I only use derive macros and function-like macros, and the derive macros don't seem to be affected.
About half of the function-like proc macro invocations result in the error proc macro returned error: Cannot perform expansion for say: error String("internal error: entered unreachable code") (with the name of the relevant macro in place of "say"):

When I close vscode, delete the "target" directory, and reopen vscode, the same invocations produce errors every time. Whether the error occurs seems to have some strange relationship with the tokens passed into the macro. For instance, this is okay:
say!(sink, (), "Could you rephrase? I don't know if you want to ");

But this errors:
say!(sink, (), ":");

The difference in this case seems to be that the source of the string in the latter is exactly one byte long. ":", "C", and " " all error, for instance, but "::", "", "ü", and "\n" don't. But that's just in this case. This, for instance, also errors despite having no one-byte string literals:
say!(sink, &*world, "or <>.", current_verbs.last().unwrap());

Which macro is being called and where and in what file the invocation is haven't made a difference in my experiments. When editing, the feedback on whether or not the error is triggered is instantaneous, even without saving.
The error only seems to occur, at least visibly, with the latest version of the extension, v0.2.408. If I downgrade to v0.2.400, I stop getting the red squiggly lines.
The project isn't public, and I haven't managed to create a minimal reproduction, but it's a personal project, so I could send a copy privately to a trusted rust-analyzer contributor if you need it.

Which macro is being called and where and in what file the invocation is haven't made a difference in my experiments.

Do you mean that it might still happen with a proc macro that returns its input unchanged? That might be a path to a minimized test case.

If I downgrade to v0.2.400, I stop getting the red squiggly lines.

The expansion still fails, but the errors are not reported.

Do you mean that it might still happen with a proc macro that returns its input unchanged? That might be a path to a minimized test case.

It does still happen if I replace the macro implementations with just input as you say. Some other aspect of the codebase seems to make the difference, and I'm not sure what.

Ah, I was wrong, actually. If I replace the macro implementations with a passthrough, close vscode, delete target, and reopen vscode, the "entered unreachable code" error goes away. The main two macros I use (say and say_para) do have a lot of commonality between them, so it could be related to their logic. They don't have any unreachable! invocations, though.

Never mind, I just forgot to set the options that let rust-analyzer evaluate proc macros :p
I have a minimal reproduction now: repro.zip

Hmm, do I need to do anything special? It works for me (when built from source):

The error no longer occurs for any of my macros with the new version that was published about an hour ago.

Okay, maybe we can close it, but I found it really easy to make it crash: https://github.com/rust-analyzer/rust-analyzer/issues/6880.

Well, let's close this. I still haven't figured why it's crashing on my computer, but if it works for you, that's great.


settings: create properly sized fcb-record when record content is unaligned

settings_line_len_calc() is used to determine key-value record size.
It unnecessary aligned this size to write-block-size.
Record size in flash layout is actually adjusted independently by
fcb itself and setting settings_line_write().
fixes #12967

Codecov Report

Merging #13625 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #13625      +/-   ##
==========================================
+ Coverage   52.45%   52.45%   +<.01%
==========================================
  Files         322      322
  Lines       46592    46592
  Branches    10768    10768
==========================================
+ Hits        24441    24442       +1
  Misses      17247    17247
+ Partials     4904     4903       -1

Impacted Files
Coverage Δ

arch/posix/core/posix_core.c
91.91% <0%> (+1.01%)
:arrow_up:

Continue to review full report at Codecov.

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


Fix service name in docker-compose.yml

The docker-compose.yml file contained a mention of monitor as service name for the zeebe-script-worker. This is probably a copy paste error, and confused me for a second.

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


Apache Jena Fuseki and Virtuoso Incompatibility

Wondering if you could provide some examples of Apache Jena Fuseki and Virtuoso incompatibilities. I am keen to test this system using Virtuoso solely for the following:

SPARQL & Graph Database Functionality
SQL & conventional RDBMS Functionality
Full Text Search and Indexing Functionality
Security Functionality

Incompatibilities between Apache Jena Fuseki and OpenLink Virtuoso are currently not known to us. In order to use Amazon Neptune, we had to make minor adjustments to the SPARQL queries, which we have documented here. However, these may have been eliminated by Amazon by now.
You are very welcome to test COLID together with OpenLink Virtuoso. In our docker environment, Apache Jena Fuseki is currently in use, which is connected to the Registration Service and the Indexing Crawler Service. Via the ColidTripleStoreOptions configuration section of the appsettings.docker.json files here  and here the query and update connections can be customized.

Incompatibilities between Apache Jena Fuseki and OpenLink Virtuoso are currently not known to us.

But your README  listed that as the reason for switching to Amazon Neptune. My goal was to look into such incompatibilities.
Ultimately, we do want to have a go at porting this system to Virtuoso bearing in mind Virtuoso's ability can handling the combined functionality in a single instance:

Graph Database (Neptune)
Relational Data Services (RDS)
Test Search & Indexing (Elastic Search)
Identity Management


[WIP Draft PR]: Creating new structural focus indicator styles in AM's core and focus indicators stylesheet

Per step 1 of HCM Focus Indicator DD ([http://shortn/_QfjugJram1]), in this draft PR, I did the following:

Removed the styles that add display: none on HCM
Removed the per-component customizations in the strong-focus-indicators mixin for both the old lib and MDC
Created new structural focus indicator styles in the "strong-focus-indicators-base" mixin which are located in the focus indicator stylesheets for both the old and MDC. These mixins are then included by default in the AM core stylesheet.

Just some early comments, although I know you're still in early WIP/draft mode.


Integrate App Center

Use App Center to deliver newest chains, tokens, features and bug fixing.

Version test: PR #1236 11:58 13/12/2023
Device test: IP 11, S20 FE 5G
Validation passed in case perform all feature


Add filter by Parameter Label

Hi,
I couldn't find a way to use labels to filter parameters,  with the Path, a Label could be used to retrieve a specific labeled version of parameters set, for example a set of parameters labeled with a specific release version.
Suggested change:

Add Label property to SystemsManagerConfigurationSource .
Use the Label if it is not null as a ParameterFiler in GetParametersByPathRequest
Something like this
 var response = await client.GetParametersByPathAsync(new GetParametersByPathRequest                  {                      Path = Source.Path,                      Recursive = true,                      WithDecryption = true,                      NextToken = nextToken,                      ParameterFilters = CreateLabelFilter(Source.Label)                  }).ConfigureAwait(false);

public static List<ParameterStringFilter> CreateLabelFilter(string label)         {             if (string.IsNullOrWhiteSpace(label))                 return null;             return new List<ParameterStringFilter> { new ParameterStringFilter             {                 Key="Label",                 Option="Equals",                 Values = new List<string>{label}             }};         }
Usage:
 config.AddSystemsManager(configurationSource=>                      {                          configurationSource.Path = "mypath";                          configurationSource.Optional = false;                          configurationSource.ReloadAfter = TimeSpan.FromMinutes(10);                          configurationSource.Label="release_v1.2.3"                      });
Update
Maybe it's more helpful to add ParameterFilters property to SystemsManagerConfigurationSource ParameterFilters would of type List<ParameterStringFilter>   , to keep it more open to the user?

if any of these suggested changes is accepted I can create a PR.

I think you should be able to use the label filter using the same method as in your CreateLabelFilter method.  Did you have issues with that?
If adding to the SystemsManagerConfigurationSource, I think adding the Label property might be the better route for the sake of consistency with 'Path'.

@klaytaybai  Thank you for your reply.
I'm not sure if I got what you mean by :

use the label filter using the same method ,

What I meant is that I couldn't find a  suitable overload of the method AddSystemsManager in SystemsManagerExtensions  to use  parameter filters, specifically a Label.

If adding to the SystemsManagerConfigurationSource, I think adding the Label property might be the better route for the sake of consistency with 'Path'. ,

OK great, I have a working fork with the Label property added, it gives us exactly what we needed.

PR was merged and shipped as part of version 1.2.0


uptime value exceeds 100%

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description

👟 Reproduction steps
I don't know.
👀 Expected behavior
The max. uptime value should be 100%.
😓 Actual Behavior
The max. uptime value is over 100%.
🐻 Uptime-Kuma Version
1.19.3
💻 Operating System and Arch
Raspbian bullseye
🌐 Browser
Google Chrome, Safari, Mozilla Firefox
🐋 Docker Version
2.14.1
🟩 NodeJS Version
No response
📝 Relevant log output
No response

I think we just need a sanity check when displaying the uptime. I will look into implementing this tomorrow.

I think this most likely is because of inaccurate system clock (common for raspberry pis), and the time went backwards. The question is, is hiding the real problem by e.g. clamping the value to 100% a better solution?

I cant find the old issue, but as @chakflying said, it is common issue for pi users.
Capping at 100% visually is good, but it will be hard to identify issues if we have make the calculation wrong in the future. I prefer to keep it as is for now.

Not sure if this affects both the status page and the dashboard, I assume it would. I would suggest only capping it on the status page, the thing that is shown to the public. This way we don't have obvious public facing errors whilst still having the ability to check if we broke the calculations but the bug isn't visible to the public.

This should have been fixed in #2635


Make it impossible to set a security policy with pinning on insecure URLs

Before this commit
Setting a security policy configured with AFSSLPinningModeCertificate or AFSSLPinningModePublicKey on a AFHTTPSessionManager instance configured with an insecure http base URL was valid. Requests made with this manager would always succeed since the -[AFURLSessionManager URLSession:didReceiveChallenge:completionHandler:] would never be called and thus the security policy would never be evaluated.
After this commit
Setting a security policy configured with AFSSLPinningModeCertificate or AFSSLPinningModePublicKey on a AFHTTPSessionManager instance configured with an insecure http base URL will throw an exception. This will force the manager to be configured with a secure https URL.
Note that properly configuring App Transport Security (ATS) would also solve this issue since insecure connections would fail anyway, but this is a belt and suspenders solution.

Current coverage is 87.91% (diff: 100%)

No coverage report found for master at f51f0b8.

Powered by Codecov. Last update f51f0b8...e66ffb1

After much struggling, all test finally pass!

@0xced awesome!
I think it would make sense to cherry-pick the tests stability into its on PR, so we can have a direct reference to that and it doesn't get lost in this changeset. Would you be able to do that? If not, I can take a stab at it.

Yes, I will do it.

Can you rebase this with master to get Xcode 8 coverage?

I rebased, but I think you should be able to rebase and merge from the GitHub interface now.

I wanted to see the green check before merging!

I realized right after posting. 😄


[AIRFLOW-891] Make webserver clock include date

Dear Airflow maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA

[x] My PR addresses the following Airflow JIRA issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-891

Description

[x] Here are some details about my PR, including screenshots of any UI changes:

Currently the webserver clock has only hour and minute.
We change the clock format to "yyyy-MM-dd HH:mm:ss",
because date information is helpful for user and
this format is universal.
I updated jqClock.min.js with the latest version for now
(https://github.com/JohnRDOrazio/jQuery-Clock-Plugin/tree/v2.3.0).

Tests

[x] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Added no test. Instead, I ran webserver manually and confirmed the clock was displayed expectedly. Also, I confirmed all unit tests passed.
Commits

[x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Codecov Report

Merging #2399 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2399      +/-   ##
==========================================
- Coverage   69.26%   69.21%   -0.05%
==========================================
  Files         146      146
  Lines       11231    11231
==========================================
- Hits         7779     7774       -5
- Misses       3452     3457       +5

Impacted Files
Coverage Δ

airflow/jobs.py
74.87% <0%> (-0.41%)
:arrow_down:

airflow/models.py
87.12% <0%> (-0.05%)
:arrow_down:

Continue to review full report at Codecov.

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

+1

Thanks for the review @msumit! Could you merge this PR?

@sekikn done.

@msumit Thanks!


Error while calling GetAsync method of DiscoveryClient

Hi,
We have to two identity server setup of different machines as below.

https://IdentitySvr1:44333/IdentityServer4
https://IdentitySvr2:53535/IdentityServer4

I want to validate token issued by IdentitySvr2 using IdentitySvr1. So, I am using "AddValidationKeys" method to add keyId issued by IdentitySvr2 in list of keys of IdentitySvr1. To achieve this I have created DiscoveryClient object by passing authority value as url of other identity server i.e. "https://IdentitySvr2:53535/IdentityServer4".
Now when I call GetAsync() method to get JsonWebKey of IdentitySvr2, I get following error. Any idea why I am getting this error.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.WinHttpHandler.d__105.MoveNext()
Thanks.

Well - that exception doesn't tell us anything about the real reason.

Hi Dominick,
To provide more details I have pasted the code and error details for the same.
Code: var discoveryClient = new DiscoveryClient(baseUrl);
var doc = await discoveryClient.GetAsync();
RsaSecurityKey rsaSecurityKey = null;
if (doc.KeySet != null && doc.KeySet.Keys.Count > 0)
{
var rsa = RSA.Create();
rsaSecurityKey = new RsaSecurityKey(rsa);
var jsonWebKey = doc.KeySet.Keys[0].Kid;
rsaSecurityKey.KeyId = jsonWebKey;
}
return rsaSecurityKey;
Error in doc mentioned below:
Error: Error connecting to https://IdentitySvr2:53535/IdentityServer4/.well-known/openid-configuration: An error occurred while sending the request.
Exception:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: A security error occurred
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()    at System.Net.Http.WinHttpHandler.<StartRequest>d__105.MoveNext()    --- End of inner exception stack trace ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.HttpClient.d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at IdentityModel.Client.DiscoveryClient.d__15.MoveNext()
Stack Trace:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.WinHttpHandler.d__105.MoveNext()
Thanks.

System.Net.Http.WinHttpException: A security error occurred

Sounds to me like an HTTPS problem.

Dominick Baier
On 16 March 2017 at 07:25:28, muffadal53<EMAIL_ADDRESS>wrote:
System.Net.Http.WinHttpException: A security error occurred

Hi Dominick,
We also tried by setting discoveryClient.Policy.RequireHttps = false; before calling discoveryClient.GetAsync(); but no luck.
Thanks.

I rather mean HTTPS problem at the transport layer.

What would you suggest then?

We are implementing a scenario where we would be consuming token generated from one server which will do authentication based on the certificate key which is used to create this token. This works fine when we do for same machine (delegation custom grant for same STS) but for token from another STS (custom delegation grant from another STS) is not working. This seemed to be blockers for us

Sorry - I don't know what your problem is.

Any update on the issue? closing for now - feel free to re-open if it needs further discussion.


fb-flo status blocked on "connecting"

Hello,
I've install a webserver with vagrant and puphpet. I've checked if the file changed are detected and it works when node.js is launched. But when I tried connecting fb-flo to my server it just blocks in the chrome panel on 'connecting' status:
[connection] Reconnecting in 500
[connection] Connecting to ws://local.dev:8888/
[connection] Failed to connect with 1006
Any clues? Thanx in advance.

Might be a problem with port forwarding?


[BUG] Can't get custom font to load on Google Function

Environment

chrome-aws-lambda Version: 5.2.1
puppeteer / puppeteer-core Version: 5.2.1
OS:
Node.js Version:  10
Lambda / GCF Runtime:  10

Expected Behavior

The custom google font should load on my page as it's rendered to PDF.
I'm having a hard time using the font function to load a custom font. I'm using Google firebase functions.
Here's my server code:
        await chromium.font('https://fonts.googleapis.com/css2?family=Josefin+Sans');

        const browser = await chromium.puppeteer.launch({
            args: chromium.args,
            defaultViewport: chromium.defaultViewport,
            executablePath: (config.app && config.app.firebase_chromium_exe_path) || await chromium.executablePath,
            headless: chromium.headless,
            ignoreHTTPSErrors: true,
          });
        const page = await browser.newPage();
        await page.setContent(data);
        const pdfBuffer = await page.pdf({ printBackground: true });
        res.set("Content-Type", "application/pdf");
        res.status(200).send(pdfBuffer);
        await browser.close();

data is pointing to a raw HTML file. For this example I'll use:
<!DOCTYPE html>
<html>
    <head>
        <style>
        * {
            font-family: 'Josefin Sans';
            font-size: 100px;
        }
        </style>
    </head>

    <body>
        This should be in Roboto
    </body>
</html>

Am I just doing something wrong? How exactly are we able to access the fonts that are pre-loaded?

Just an update here -
I realized that the css it's downloading isn't actually a font but a references to the font URLs. So I downloaded the fonts directly and tried importing them. await chromium.font('./Roboto-Regular.tt'); (using Roboto for this example). They still don't show up in the rendered PDF...

I have the exact same problem. I am trying to import the google font
await chromium.font('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap')
It doesn't render.

Yep, me too and all font's becomes Open Sans it seems... Following!

I have the same problem. It works on puppeteer locally but not on aws

@mohamad-agha
.font seems to work for me.

I have the exact same problem. I am trying to import the google font
await chromium.font('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap')
It doesn't render.

await chromium.font('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap') will not work because it links to a css, and not a valid ttf font
Try like this: chromium.font('https://rawcdn.githack.com/openmaptiles/fonts/e1c6ea642b612abcbdd6e48fc2400162c1b531da/roboto/Roboto-Regular.ttf?raw=true')

Any update ?

any updates?

Any update ?

I downloaded the .ttf files and added them to the repository with a fonts.conf file as I never got it loading from a URL and that worked...
However, we have since abandoned Puppeteer and moved to use PDFKit instead... Unfortunately much more complex "templating" but no more issues with large deployments, messed up dependencies (or fonts) and page-breaks etc. are so much easier to handle...
Nothing against chrome-aws-lambda!!! I really appreciate your efforts, guys, but as a "Production" setup it wasn't feasible for us anymore... :(


Cannot set kubeconfig file in Cluster.

Issue Type: Bug
With the latest update in VS Code to 1.44.2, I cannot set the kubeconfig file. This was not an issue in VS Code 1.44.0/1
Steps to reproduce,

In the Kubernetes extension, open the cluster tray.
Hover on the left side of the cluster bar, click on the three hortizontal icons
Select the 'Set Kubeconfig' option, No options arises to actually set the file.

This is only reproducible on a Windows Machine, Did not face it on Mac OS.
Extension version: 1.1.1
VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T16:36:23.138Z)
OS version: Windows_NT x64 10.0.18363

Looks like when we click on Set Kubeconfig, in the vscode settings vs-kubernetes.kubeconfig gets a json value rather than a string.
    "vs-kubernetes": {
        "vs-kubernetes.kubeconfig": {
            "isTrusted": true
        }
    }

@abishD I mitigated it by manually removing this and manually adding the kubeconfig file path in the settings.json.

This is super weird.  Looks like VS Code is invoking the command handler with an object of the form { isTrusted: true } when previously it passed nothing.  Why would it suddenly start doing that?  So strange!

Looks like an unintended change in VS Code (though other people report it in 1.44.0 as well).  @abishD  I don't know when/if the Code folks will fix it - I will add a patch but for now please use @raushan2016's workaround.  https://github.com/microsoft/vscode/issues/94872

Thank you @raushan2016, that was a good catch. I was able to set the kubeconfig manually via the settings.json as you mentioned.
Thank you @itowlson for linking & reporting it. This works for me so that's alright.


Cannot resolve symbol 'GraphQLQueryResolver'

Describe the bug
GraphqlQueryResolver suddenly disappeared in kickstart.tools.
Expected behavior
I've been using it well until recently, but it shows that I can't find it when I started working today.

build.gradle
plugins {
    id 'org.springframework.boot' version '2.4.2'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

group = 'dd'
version = '1.0.0-SNAPSHOT'

sourceCompatibility = '11'
targetCompatibility = 11

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-validation'

    implementation 'com.graphql-java-kickstart:graphql-spring-boot-starter:11.0.0'
    implementation 'com.graphql-java-kickstart:playground-spring-boot-starter:11.0.0'

    compile group: 'org.hibernate', name: 'hibernate-spatial', version: '5.4.25.Final'
    compile group: 'org.n52.jackson', name: 'jackson-datatype-jts', version: '1.2.8'

    runtimeOnly 'mysql:mysql-connector-java'
    compile group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'

    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'

    compile group: 'org.modelmapper', name: 'modelmapper', version: '2.3.0'

    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'com.graphql-java-kickstart:graphql-spring-boot-starter-test:11.0.0'
}

test {
    useJUnitPlatform()
}

@gowoonsori This seems to have something to do with your local setup or gradle config or something, because nothing has changed recently. The GraphQLQueryResolver is still available in the package graphql.kickstart.tools. This is therefore not a bug, but you should have registered this as a Discussion here to try to get some help instead.


index_not_concurrently should verify that DDL transactions/migrations lock are disabled

Hello 👋
First, thanks for working on this library. It seems helpful to enforce good practices while you do data migrations. In particular, I'm interested in the index_not_concurrently check. On my quick review, it seems to detect the lack of the concurrently option in your index., but apparently, the check doesn't verify for:
@disable_ddl_transaction true
@disable_migration_lock true

Both module attributes are recommended when you add or drop an index concurrently, from the Ecto docs we have:

PostgreSQL supports adding/dropping indexes concurrently (see the docs). However, this feature does not work well with the transactions used by Ecto to guarantee integrity during migrations.
Therefore, to migrate indexes concurrently, you need to set both @disable_ddl_transaction and @disable_migration_lock to true:
Disabling DDL transactions removes the guarantee that all of the changes in the migration will happen at once. Disabling the migration lock removes the guarantee only a single node will run a given migration if multiple nodes are attempting to migrate at the same time.
Since running migrations outside a transaction and without locks can be dangerous, consider performing very few operations in migrations that add concurrent indexes. We recommend to run migrations with concurrent indexes in isolation and disable those features only temporarily.

Also, based on the last paragraph, the calls that should be allowed while you have disabled the DDL transactions and the migration lock are create/drop index(...., concurrently: true), but I don't know if that's feasible with this check.

@Artur-Sulej, I will work on a proposal PR to add this checker since I'm running into the same issue.
I think we will need to do this to go through the entire code_ast for the module and see if those module attributes exist and their values are true, and one of the database operations should be an index concurrently.
Should we show an error per attribute? what the name of these errors looks like (index_concurrently_without_MODULE_ATTR_NAME)?
What do you think?

@Artur-Sulej After closing MR #14. I think we can close this issue as well.


Fix clippy lints

r? @burrbull
(rust_highfive has picked a reviewer for you, use r? to override)

bors try

bors r+


Storage kvm

storage_kvm primitives to use formatted rcc and errors and added tests
removed storageimg_kvm as it is a part of kvm primitive

When testing the storage_kvm as robot user:
`
(navenv) administrator@dev-pod:~/naveen/primitives/tools$ python test_storage_kvm_primitive.py build
Status: False
Message:
3021: Failed to connect to the host 2a02:2078:9::30:0:8 for the payload create_storage_file
Channel response from the host: 2a02:2078:9::30:0:8
channel_code: 404
channel_message: Could not eastablish a SSH connection to 2a02:2078:9::30:0:8 for username robot.
channel_error: Authentication failed.
`

Test results:


Suite of Security Vulnerability Fixes

NOTE: To preserve version history for these fixes independently, this PR should be rebased, not squashed, on main when merging.
From FOSSA, we see 11 security vulnerabilities in main: https://github.com/TBD54566975/tbdex-kt/actions/runs/7937580619/job/21675028471#step:4:34

This PR turns those to 0:

Satisfies:

#166
#167
#168
#169
#170

@jiyoontbd This is ready for merge - would you mind handling it so you can "rebase" not "squash"? Thanks!


Add Content-Type and Accept CORS headers for analysis requests

Codecov Report

Merging #234 into dev will not change coverage.
The diff coverage is 0%.

@@            Coverage Diff            @@
##                dev     #234   +/-   ##
=========================================
  Coverage     22.79%   22.79%
  Complexity      103      103
=========================================
  Files            63       63
  Lines          2426     2426
  Branches        219      219
=========================================
  Hits            553      553
  Misses         1838     1838
  Partials         35       35

Impacted Files
Coverage Δ
Complexity Δ

...rc/main/java/com/conveyal/taui/AnalysisServer.java
42.7% <0%> (ø)
4 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Trace zips not viewable

This may be more of a Playwright issue, but I thought I would ask here to see if anyone else had it as well:
I've been running playwright on ADO, and sending test result pass/fail back to ADO test cases with the playwright-azure-reporter
It is all working fine, and storing the screenshots, videos and trace files on the ADO test result. I set it to save this stuff in the config file:
attachmentsType: ['screenshot', 'video', 'trace'],
However, when I try to download a trace zip (from the ADO test case that has the execution result) and open it in the trace viewer (npx playwright show-trace), the viewer says it is not a valid trace file!
I've unzipped the file and tried to compare it against a trace zip produced locally on my computer - I don't see any difference between the two. The resources folder on the failing one has css, json, jpeg, etc files just like the first one does.

i check some cases and see the next issue
in Safari trace file is downloaded as folder and if you pack it back in zip archive manually and try to open in trace-viewer library what used playwright trace viewer produce error Error: Compression method not supported

open DevTools in trace viewer and see console tab

I'm at now run test and download trace file from ADO - it will downloaded as .zip file on all works fine - it opened as well
can you check downloading file in deferent browsers and let me know the result?

You analysis was correct. When I downloaded the trace zips on Safari, it unzipped them and when I recompressed, it failed to open in trace viewer - the error in the console was about a JSON file incorrectly formatted.
I switched to Chrome, it download the zip file intact without unzipping, and I can open those fine in the trace viewer. That works for me, I will just use Chrome with ADO Test Plan to download traces from now on.


Restrict permissions on the GITHUB_TOKEN for GitHub Actions

You can now restrict permissions on the GITHUB_TOKEN for GitHub Actions
Python team has done this, we should do the same.

There's a GitHub app that we can configure to publish test results. However it also requires write access for checks:

Is that preferable? If not, I would suggest we add the current GitHub Action to the allowlist and turn off write access for all other GitHub scopes.

Reading through this thread, this GitHub app is new since we last discussed this, but only supports third party CI. I think our options are to

Enable write access for the current GitHub Action we use (https://github.com/ScaCap/action-surefire-report)
Write our own GitHub Action

Can we go with option 3. Restrict the permissions and then decide on 1 or 2 later.

That would block us from viewing test output immediately. Given we're still working on tests now might not be the best time to fully restrict permissions? I'm in favor of just enabling write access for the current action, as follows:

That would block us from viewing test output immediately. Given we're still working on tests now might not be the best time

This will be the case every day, we will be looking at our tests in every pr.

Validated. Via GitHub settings.


choco package "dotnet-7.0-sdk-3xx" has issues on validation testing

see
https://community.chocolatey.org/packages/dotnet-7.0-sdk-3xx/
https://docs.chocolatey.org/en-us/community-repository/moderation/package-validator/rules/cpmr0031
https://docs.chocolatey.org/en-us/community-repository/moderation/package-validator/rules/cpmr0061

Thanks!

to @jberezanski
have seen that auto review still report error because of "." in id
https://docs.chocolatey.org/en-us/community-repository/moderation/package-validator/rules/cpmr0061
but what's about all the other packages with same pattern?
https://community.chocolatey.org/packages/dotnet-7.0-sdk-2xx
is this a new rule?
will it be happen for all your packages?
do you have a possibility to reach a real person of choco repo that they can fix there auto reviewer bot / rules?

cpmr0061 is categorized as a Note, I don't think it will be an issue. Certainly I have no intention of changing the established naming scheme of .NET packages. I've responded in moderation discussion.
However, the validator still reports an issue for the PackageSourceUrl, for some reason. I'll need to investigate.

I'm not sure what's going on. This time I'm absolutely positive I pushed the correct package, yet the validator still complains. Perhaps a caching issue on chocolatey.org...?

OK, the validator problem seems to have resolved itself.

The package is approved now (and already got another version, after this week's Patch Tuesday).


Support of spanning-tree bpduguard in eos_l3ls_evpn port profiles in SERVERS.yml

Issue Type

[x] Template enhancement

Describe the solution you'd like
Support of spanning-tree bpduguard enabled to fabric edge ports to enable a kind of loop detection.
This should be available via port-profiles and/or individual server definitions in the DC_SERVERS.yml file.
Feature should be available on individual ethernet interfaces and port-channels.
spanning_tree_bpduguard: < true | false >
should render "spanning-tree bpduguard enabled"
port_profiles:
< port_profile_1 >:
"snip"
spanning_tree_portfast: < edge | network >
spanning_tree_bpdufilter: < true | false >
spanning_tree_bpduguard: < true | false >
A clear and concise description of what you want to happen.
Describe alternatives you've considered
I might enable it globally for all interfaces via the eos_cli_config_gen template
spanning_tree:
edge_port:
bpduguard_default: < true | false >
and disable it manually individually on (edge) ports, to which addtional switches are connected to.

+1


Add missing side-effects import to nativeEngine.ts

Without this, UMD works, but ES6 will not.

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/15194/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15194/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15194/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/15194/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/15194/merge
https://gui.babylonjs.com/?snapshot=refs/pull/15194/merge
https://nme.babylonjs.com/?snapshot=refs/pull/15194/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/15194/merge#BCU1XR#0

WebGL2 visualization test reporter:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15194/merge/testResults/webgl2playwright/index.html

Visualization tests for WebGPU (Experimental)
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15194/merge/testResults/webgpuplaywright/index.html


[React Native] Virgil Crypto slow performance with large number of messages

Hi,
I'm using virgil-crypto and virgil-sdk in a React Native project, in which I'm building a real-time chat with Firestore through react-native-firebase. I'm trying to reproduce eThree kit.
I noticed that Virgil Crypto is very slow to perform decryptThenVerify method in a loop of snapshot docs, specially when I call messages for the first time.
I have this situation:
componentDidMount = async () => {
  ...
  this._currUser = firebase.auth().currentUser;
  this.publicKey = await this._eThree.lookupPublicKeys(receiverUid);
  this.unsubscribe = this.chatRoomRef.orderBy('createdAt', 'desc').limit(20).onSnapshot(this._chatRoomListener);
  ...
}
_chatRoomListener = async (querySnapshot) => {
  console.log(querySnapshot.docs); // <-- THIS LOG APPEARS IMMEDIATELY
  const messages = await Promise.all(
    querySnapshot.docs.map(async doc => {
      let _publicKey = doc.data().uid !== this._currUser.uid
        ? this._eThree.parsePublicKey(this.publicKey) // <-- MY CUSTOM METHOD, SEE BELOW
        : null;
      let isDeleted = typeof doc.data().text === 'boolean' && !doc.data().text;
      let decryptedText = !isDeleted ? await this._eThree.decrypt(doc.data().text, _publicKey) : i18n.t('chat.messages.deleted_message');
      let loadedMessage = { ...doc.data(), text: decryptedText, deleted: isDeleted };
      return createGiftedChatItem(doc.id, loadedMessage);
    })
  );
  console.log(messages); // <-- THIS LOG APPEARS AFTER FEW SECONDS
  this.setState({messages});
}

and in my custom EThree class I have this situation:
...
async decrypt(message, publicKey) {
  const isMessageString = isString(message);

  const privateKey = await this._keyLoader.loadLocalPrivateKey();
  if (!privateKey) throw new Error('This identity is not registered');
  if (!publicKey) publicKey = this.virgilCrypto.extractPublicKey(privateKey);

  const res = this.virgilCrypto.decryptThenVerify(message, privateKey, publicKey);
  if (isMessageString) return res.toString('utf8');
  return res;
}
...
parsePublicKey = (publicKey) => {
  return this.virgilCrypto.importPublicKey(publicKey);
}
...

What could the performance problem be related to?

Hi @paolospag!
I see few places that you can improve in your code:

First, you don't need to import the same public key in your loop:this._eThree.parsePublicKey(this.publicKey) // this method is called on each iteration

Second, you don't need to load key multiple times for the same identity and extract public key:// in your decrypt method
const privateKey = await this._keyLoader.loadLocalPrivateKey();
if (!privateKey) throw new Error('This identity is not registered');
if (!publicKey) publicKey = this.virgilCrypto.extractPublicKey(privateKey);

Make sure that you query paginated data in your app. This way you will need to decrypt fixed amount of messages (for example 30) instead of the whole dialog.

Also I created rough benchmark that can provide you the general idea of time required for each action.
Results(time in ms):
signThenEncrypt 100 messages:<PHONE_NUMBER>987512
decryptThenVerify 100 messages:<PHONE_NUMBER>000734
importPublicKey 100 times:<PHONE_NUMBER>000734
extractPublicKey 100 times:<PHONE_NUMBER>9895203

Note that results in React Native may vary because I ran the benchmark on MBP 13" 2015 - Node.js v8.16.0

Source code:
const { VirgilCrypto } = require('virgil-crypto');
const { performance } = require('perf_hooks');

const TOTAL_MESSAGES = 100;
const virgilCrypto = new VirgilCrypto();
const keyPair = virgilCrypto.generateKeys();

const messages = [];
for (let i = 0; i < TOTAL_MESSAGES; i += 1) {
  messages.push(Buffer.from('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'utf8'));
}

const signThenEncryptStart = performance.now();
const encryptedMessages = messages.map(message =>
  virgilCrypto.signThenEncrypt(message, keyPair.privateKey, keyPair.publicKey),
);
const signThenEncryptEnd = performance.now();
console.log(`signThenEncrypt ${TOTAL_MESSAGES} messages:`, signThenEncryptEnd - signThenEncryptStart);

const decryptThenVerifyStart = performance.now();
const decryptedMessages = encryptedMessages.map(encryptedMessage =>
  virgilCrypto.decryptThenVerify(encryptedMessage, keyPair.privateKey, keyPair.publicKey),
);
const decryptThenVerifyEnd = performance.now();
console.log(`decryptThenVerify ${TOTAL_MESSAGES} messages:`, decryptThenVerifyEnd - decryptThenVerifyStart);

const exportedPublicKey = virgilCrypto.exportPublicKey(keyPair.publicKey);
const importPublicKeyStart = performance.now();
for (let i = 0; i < TOTAL_MESSAGES; i += 1) {
  virgilCrypto.importPublicKey(exportedPublicKey);
}
const importPublicKeyEnd = performance.now();
console.log(`importPublicKey ${TOTAL_MESSAGES} times:`, decryptThenVerifyEnd - decryptThenVerifyStart);

const extractPublicKeyStart = performance.now();
for (let i = 0; i < TOTAL_MESSAGES; i += 1) {
  virgilCrypto.extractPublicKey(keyPair.privateKey);
}
const extractPublicKeyEnd = performance.now();
console.log(`extractPublicKey ${TOTAL_MESSAGES} times:`, extractPublicKeyEnd - extractPublicKeyStart);

Hope it will help!

Hi @sun1x ,
I will try to follow your advice and I hope to improve the performance!
I will keep you updated

@sun1x I tried to optimize the code, then I'm loading the private key and extracting the public key one time in loop... but, at least in React Native, for just 4 encrypted messages it takes ~1600ms
The React Native's JS Thread seems to suffer these methods:
virgilCrypto.signThenEncrypt
virgilCrypto.decryptThenVerify

1600ms for 4 messages is indeed very slow.  How many users are the messages encrypted for? Do you use the default type of keys (i.e. call new VirgilCrypto and generateKeys() without parameters)?
It would be helpful to know more about your environment. Where do you run your code, in simulator or on a real device and if so, which one? Do you use Expo client?
Also, could you show us the code with time measurements where you get 1600ms?

I try to answer all the questions, I hope they are exhaustive
How big are the messages?
Decrypted messages are really short (max 100 characters) because they are test messages. That's why I'm worried.
How many users are the messages encrypted for?
Just two users, one is the authenticated user and one is other user from which I get the public key
let _publicKey = msg.doc.data().uid !== this._currUser.uid ? this.publicKey : null; // <-- this.publicKey contains other user public key
let decryptedText = await this._eThree.decrypt(msg.doc.data().text, _publicKey);

Do you use the default type of keys (i.e. call new VirgilCrypto and generateKeys() without parameters)?
Yes, I created a Firebase Cloud Function to generate keys-pair and protect private key with password in this way:
const virgil = await require('virgil-crypto');
const virgilCrypto = new virgil.VirgilCrypto();
const keyPair = virgilCrypto.generateKeys();
const publicKeyData = virgilCrypto.exportPublicKey(keyPair.publicKey);
const privateKeyData = virgilCrypto.exportPrivateKey(keyPair.privateKey, keyPsw); // <-- keyPsw is a user password
const payload =  {
  identity: uid, // <-- user identity from firebase
  publicKey: publicKeyData.toString('base64'),
  privateKey: privateKeyData.toString('base64')
};

Where do you run your code, in simulator or on a real device and if so, which one?
Both simulators and real devices and both iOS and Android environment. The problem is much more evident in real devices (Huawei Honor 8 and iPhone 7 Plus). In particular, the performances of JS fps have been tested on Honor 8 (Android).
Do you use Expo client?
No, I'm working on a pure react-native project.
Also, could you show us the code with time measurements where you get 1600ms?
In RoomScreen, when component did mount, the _bootstrapChatRoom method is called. I measured exactly that. In the chat room I've tested there are only 4 messages.
// RoomScreen
...
import PerformanceNow from 'performance-now';
...
  _bootstrapChatRoom = (limit = 10) => {
    const { roomData } = this.state;
    this.chatRoomRef = database.chatRoomMessagesByPath(roomData.path);
    this.unsubscribe = this.chatRoomRef.orderBy('createdAt', 'desc').limit(limit).onSnapshot(this._chatRoomListener);
  }
  _chatRoomListener = async (querySnapshot) => {
    let perfStart = PerformanceNow(); // <-- PERFORMANCE START
    const messages = await Promise.all(
      querySnapshot.docChanges
        .filter(msg => msg.type === 'added')
        .map(async msg => {
        let _publicKey = msg.doc.data().uid !== this._currUser.uid ? this.publicKey : null;
        let decryptedText = await this._eThree.decrypt(msg.doc.data().text, _publicKey);
        let loadedMessage = { ...msg.doc.data(), text: decryptedText};
        return createGiftedChatItem(msg.doc.id, loadedMessage);
      })
    );
    if (messages.length === 0) return;
    this.setState(prevState => {
      let prevMessages = prevState.messages.filter(m => !m.isOutgoing);
      let roomCount = messages.length === 1
        ? [...prevMessages, messages[0]].length
        : querySnapshot.size
      return {
        ...prevState,
        messages: messages.length === 1
          ? GiftedChat.append(prevMessages, messages[0])
          : messages,
        roomCount: roomCount
      }
    }, () => {
      let perfEnd = PerformanceNow(); // <-- PERFORMANCE END
      alert( (perfEnd - perfStart).toFixed(3)+'ms' ); // <-- THIS RETURNS ~1800ms, BUT ~200ms ARE COMPUTABLE TO FIRESTORE
    });
  }
...

This is my custom implementation of EThree class. I tried to store private key and the extracted public key of current authenticated user respectively in this.privateKey and this.publicKey to avoid  to load key multiple times for the same identity, but honestly I don't know if I did well
// EThree
...
  constructor(identity, options) {
    ...
    this.privateKey = null;
    this.publicKey = null;
    ...
  }
...
  async encrypt(message, publicKeys) {
    let isMessageString = isString(message);

    let privateKey = this.privateKey;
    if (!privateKey) {
      this.privateKey = await this._keyLoader.loadLocalPrivateKey();
      privateKey = this.privateKey;
    }
    if (!privateKey) throw new Error('This identity is not registered');

    if (publicKeys == null) argument = [];
    else if (isVirgilPublicKey(publicKeys)) argument = [publicKeys];
    else argument = getObjectValues(publicKeys);

    const publicKeysArray = this._addOwnPublicKey(privateKey, publicKeys);

    const res = this.virgilCrypto.signThenEncrypt(message, privateKey, publicKeysArray);
    if (isMessageString) return res.toString('base64');
    return res;
  }
  async decrypt(message, publicKey) {
    const isMessageString = isString(message);

    let privateKey = this.privateKey;
    if (!privateKey) {
      this.privateKey = await this._keyLoader.loadLocalPrivateKey();
      privateKey = this.privateKey;
    }
    if (!privateKey) throw new Error('This identity is not registered');

    if (!this.publicKey) this.publicKey = this.virgilCrypto.extractPublicKey(privateKey);
    if (!publicKey) publicKey = this.publicKey;

    const res = this.virgilCrypto.decryptThenVerify(message, privateKey, publicKey)
    if (isMessageString) return res.toString('utf8');
    return res;
  }
...
  _addOwnPublicKey(privateKey, publicKeys) {
    let argument;
    if (publicKeys == null) argument = [];
    else if (isVirgilPublicKey(publicKeys)) argument = [publicKeys];
    else argument = getObjectValues(publicKeys);
    let ownPublicKey = this.publicKey;
    if (!ownPublicKey) {
      this.publicKey = this.virgilCrypto.extractPublicKey(privateKey);
      ownPublicKey = this.publicKey;
    }
    if (!this._isOwnPublicKeysIncluded(ownPublicKey, argument)) {
      argument.push(ownPublicKey);
    }
    return argument;
  }
...

There is a lot going on in the code between the PerformanceNow() calls to say that decryptThenVerify method is to blame for performance degradation. You are measuring the time it takes to decrypt, transform and render the messages. The first time the code is executed it will load the private key from storage and extract the public key even before the decryption. I suggest that you rewrite your code so that the private key is already in memory at the time the messages are loaded. Also, instead of decrypting all of the messages in parallel and then rendering them, you may get a better perceived performance by decrypting and rendering messages one by one, i.e. roughly, instead of this:
const messages = await Promise.all(
  messages.map(async msg => {
    const decrypted = await decrypt(msg);
    return createGiftedChatItem(decrypted);
  })
);
this.setState({ messages });

you could try this:
messages.map(async msg => {
  const decrypted = await decrypt(msg);
  const chatItem = createGiftedChatItem(decrypted);
  this.setState(prevState => {
    return { messages: [...prevState.messages, chatItem] };
  });
})

I hope this helps

I tried to recalculate the beginning and the end of the PerformanceNow in this way:
    let perfStart = PerformanceNow(); // <-- PERFORMANCE START
    const messages = await Promise.all(
      querySnapshot.docChanges
        .filter(msg => msg.type === 'added')
        .map(async msg => {
        let _publicKey = msg.doc.data().uid !== this._currUser.uid ? this.publicKey : null;
        let isDeleted = typeof msg.doc.data().text === 'boolean' && !msg.doc.data().text;
        let decryptedText = !isDeleted
          ? await this._eThree.decrypt(msg.doc.data().text, _publicKey)
          : i18n.t('chat.messages.deleted_message');
        let loadedMessage = { ...msg.doc.data(), text: decryptedText, deleted: isDeleted };
        return createGiftedChatItem(msg.doc.id, loadedMessage);
      })
    );
    let perfEnd = PerformanceNow(); // <-- PERFORMANCE END
    alert( (perfEnd - perfStart).toFixed(3)+'ms' ); // <-- LOW PERFORMANCE

but the performances remain more or less the same.
I'll try to rewrite the code as you suggest and I'll let you know as soon as possible.

I rewrote the code following your suggestions, but the performances remain low on real devices and with the release configuration (no debug mode or simulator).
I have also tried to decrypt and render messages one by one, but it takes ~300-400ms to decrypt single message and the messages appear one by one on the screen at a distance of this time, creating a bad experience.
I also created this method:
  async cacheKeysPair() {
    let privateKey = await this._keyLoader.loadLocalPrivateKey();
    let publicKey = this.virgilCrypto.extractPublicKey(privateKey);
    return this.cachedKeys = { privateKey, publicKey };
  }

to store both privateKey and publicKey in the EThree instance, but I didn't improve the situation much.
I believe that the JS thread suffers all the methods of virgil-crypto library.
My enviroment:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

I'll take a look on my side

If it can help you understand the problem, when I run the app in debug mode and launch Debug JS remotely with Chrome Developer Tools, the performance (strangely) increases. Probably because it runs the Chrome JS engine and not the React Native one

I also tried to reproduce the @sun1x  example by creating a TestScreen component and I created two videos, in the second I launch Debug JS remotely and the performance improves sharply.
...
import { VirgilCrypto } from 'virgil-crypto';
import PerformanceNow from 'performance-now';

class TestScreen extends React.Component {
  componentDidMount = () => {
    const TOTAL_MESSAGES = 100;
    const virgilCrypto = new VirgilCrypto();
    const keyPair = virgilCrypto.generateKeys();

    const messages = [];
    for (let i = 0; i < TOTAL_MESSAGES; i += 1) {
      messages.push(Buffer.from('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'utf8'));
    }

    const signThenEncryptStart = PerformanceNow();
    const encryptedMessages = messages.map(message =>
      virgilCrypto.signThenEncrypt(message, keyPair.privateKey, keyPair.publicKey),
    );
    const signThenEncryptEnd = PerformanceNow();
    alert(`signThenEncrypt ${TOTAL_MESSAGES} messages: ${signThenEncryptEnd - signThenEncryptStart}ms`);

    const decryptThenVerifyStart = PerformanceNow();
    const decryptedMessages = encryptedMessages.map(encryptedMessage =>
      virgilCrypto.decryptThenVerify(encryptedMessage, keyPair.privateKey, keyPair.publicKey),
    );
    const decryptThenVerifyEnd = PerformanceNow();
    alert(`decryptThenVerify ${TOTAL_MESSAGES} messages: ${decryptThenVerifyEnd - decryptThenVerifyStart}ms`);

    const exportedPublicKey = virgilCrypto.exportPublicKey(keyPair.publicKey);
    const importPublicKeyStart = PerformanceNow();
    for (let i = 0; i < TOTAL_MESSAGES; i += 1) {
      virgilCrypto.importPublicKey(exportedPublicKey);
    }
    const importPublicKeyEnd = PerformanceNow();
    alert(`importPublicKey ${TOTAL_MESSAGES} times: ${importPublicKeyEnd - importPublicKeyStart}ms`);

    const extractPublicKeyStart = PerformanceNow();
    for (let i = 0; i < TOTAL_MESSAGES; i += 1) {
      virgilCrypto.extractPublicKey(keyPair.privateKey);
    }
    const extractPublicKeyEnd = PerformanceNow();
    alert(`extractPublicKey ${TOTAL_MESSAGES} times: ${extractPublicKeyEnd - extractPublicKeyStart}ms`);
  }
  render() {
    return (
      <View>
        <Text>Test screen for VirgilCrypto</Text>
      </View>
    )
  }
}

First video (low performance):
https://streamable.com/ioa6j
Second video (high performance):
https://streamable.com/w5vis
The TestScreen is activated clicking on the "Chat" tab at the bottom. In the first video, from the moment of the click to the first alert (ie signThenEncrypt method) pass  ~43 seconds while in the second video the same method takes ~ 2 seconds

@vadimavdeev @sun1x do you have any updates to give me?
Do you see what I showed in the videos?
I looked at the v4 branch of this repo, and noticed that for React Native the approach will be different due to WebAssembly.
The problem of slow performance could be related?

I don't have any updates for you yet. I managed to reproduce the problem on Android and I'm still investigating on what's causing it.
React Native does not support WebAssembly. the asm.js fallback will be used in v4

Ok, I await your updates
Just to be clear, the same happens on a real iOS device (I tried on an iPhone 7 plus)

Unfortunately, after running some benchmarks I've found that most of the time is spent in the generated asm.js code, which means there is nothing we can do on the wrapper (i.e. this library) side. My guess is that React Native does not optimize for asm.js, but I haven't been able to verify that. Hopefully the version 4 of this library that is about to be released will not have this problem as the underlying native library and code generation for JS have been rewritten with performance in mind. We will get back to this issue when the new version is out.
For now, to get the maximum performance you can create native modules for Android and \ or iOS that use Virgil Crypto library for Android and iOS respectively. We might consider creating a separate package that does this later on if there is a demand and \ or performance of the v4 library is not satisfactory

@vadimavdeev probably, the solution to create a package with native modules would be the best solution.
Unfortunately, I'm not an expert of Android and iOS and I don't have time to create native modules.
When will version 4 be released? Can I already try it somehow?
Really there is no way to optimize asm.js for React Native?

@vadimavdeev I'm not a security expert and I don't know how virgil-crypto works, so what I'm doing must be taken with caution.
On React Native, could it affect the little memory available to run signThenEncrypt / decryptThenVerify methods? I found the following code, but I don't know if it's the correct intuition:
https://github.com/VirgilSecurity/virgil-crypto-javascript/blob/master/src/lib/browser.ts#L3-L11
I await your suggestions on JavaScript side

When will version 4 be released? Can I already try it somehow?
I'm afraid I was wrong. Version 4 will not run on React Native due to lack of cryptographically secure random number generator there. I turns out that current version (v2) uses insecure random number generator in React Native, so having a separate package with native modules for React Native is the only way to go. We will start building it asap. I'll ping you when we have something to look at.
Really there is no way to optimize asm.js for React Native?
It was a guess that asm.js is not optimized. Maybe it is, I haven't been able to verify that. Anyway, even if it isn't, I don't think there's something that can be done in the user space to have it optimized by the JS engine.
On React Native, could it affect the little memory available...
No, I don't think the amount of memory has any effect on performance. It would have thrown an error if there wasn't sufficient memory.

@vadimavdeev this is not good news at all, I have to finish a project and I don't have much time. Could you estimate the development time of the separate package with native modules?
The lack of cryptographically secure random number generator compromises production apps?

I can't tell how long it will take right now. I guess it's on the order of a couple of days to a week.
The The lack of cryptographically secure random number generator makes the crypto system predictable and thus vulnerable to a wide range of attacks.

@paolospag For now, you can use this library to workaround the RNG issue. This will polyfill the crypto.getRandomValues function that exists in browsers and is cryptographically secure with a native implementation for each platform (iOS and Android). You just need to install and link this module and then import 'react-native-get-random-values' in your index.js file (as the per instructions in the repo)
One caveat is that it will slow down your code even further because the random values will have to cross the bridge from native side to the JS side.

@vadimavdeev I need something to help me improve performance, not slow it down.
Is there any polyfill that can optimize asm.js to be combined withreact-native-get-random-values?

Unfortunately there is no such polyfill that I am aware of. I started working on the package with native module bindings for react native. Hopefully, it will be ready early next week.

@vadimavdeev do you think this "native" package could compromise all messages already encrypted? or compromises the user generated private/public keys?
Consider that the keys are generated with a Cloud Function (Node v8) at the time of user registration.

Using insecure rng makes both the keys and encrypted data easy to compromise. In Node.js this library uses cryptographically secure random number generator.

@vadimavdeev ok, thanks for making this clear.
I await your updates

+1

@vadimavdeev do you have any update? do you think something will come out in the next few days?

In the meantime, I updated my app React Native from 0.59.10 to 0.60.4, I activated Hermes for Android and with this configuration:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
I get this error:

now I am no longer able to work on the app, I have to disable Hermes…
All this is frustrating!

@paolospag  Writing react native bridge for native Virgil Crypto libraries is taking a bit longer that I anticipated, but something will come out in the next few days.
As for the Hermes issue, apparently the problem is that Hermes does not allow custom Error implementations like this:
function MyError(msg) {
      this.message = msg;
      if (this.stack) { // this line throws
        console.log('never printed');
      }
    }
    MyError.prototype = new Error();
    MyError.prototype.constructor = MyError;

    const myError = new MyError('crash_app');

and Emscripten uses this pattern in it's FS implementation
which is emitted in the asm.js code of virgil-crypto. Unfortunately, I don't see a workaround for this issue as it seems to be a problem with Hermes itself.

@paolospag Let me introduce the React Native bridge for native Virgil Crypto - https://github.com/VirgilSecurity/react-native-virgil-crypto

Closing because this library should not be used with React Native

@vadimavdeev good job!
Unfortunately, I won't be able to test it these days, I'll try it in two weeks.
I'll let you know something when I test it and, if necessary, I'll open an issue in the new repo.

Sounds good. Thanks


Minecells (1.20.1) crashes when exiting creative menu

Describe the bug
Minecells (1.20.1) crashes when trying to exit creative menu
Steps to reproduce

Connector Beta 13
Forgified-fabric-api 1.9.9
minecells-1.20.1-1.5.4
[1.20.1] oωo - 0.11.1
Open creative menu and when trying to exit it. It freezes for a bit and crashes

...
Logs
No response
Additional context
Mod links here:
https://www.curseforge.com/minecraft/mc-mods/minecells
https://www.curseforge.com/minecraft/mc-mods/owo-lib
For some reason It didn't give me a crash log

Am not sure if it's Minecells mod itself or it could be owo lib

This also happened when I use Alloy Forgey and Owo lib and I opened the creative menu and when grab something or not from the creative menu it's crashes! So I guess there is some Incompatibility with owo-lib.

This also happened when I use Alloy Forgey and Owo lib and I opened the creative menu and when grab something or not from the creative menu it's crashes! So I guess there is some Incompatibility with owo-lib.

show your latest log file atleast when the crash occurs

Here Is the latest log:

I tried to reproduce this with the mods you listed, but could not trigger the crash. Your log also indicates there are far more mods installed than you listed in the report. Please try to reproduce the crash with only minecells installed, or identify the mod causing the crash.

Its owo-lib thats causing the crash

Its not owo, I play with owo just fine and it doesnt crash, its probably conflicting with another mod, does it not have a crash report? since you crash during the game

Here is the new log file:


Add reusable client tests and refactor

In Python 3.12, its required to close the writer to stop the server. unless its hangs on wait_closed
how to reproduce:
python=3.12.x
import pytest
from sanic import Sanic, response

from sanic_testing.reusable import ReusableClient

@pytest.fixture
def reusable_app():
    sanic_app = Sanic(__name__)

    @sanic_app.get("/")
    def basic(request):
        return response.text("foo")

    return sanic_app

@pytest.mark.asyncio
def test_basic_asgi_client(reusable_app):
    client = ReusableClient(reusable_app)
    with client:
        request, response = client.get("/")

        assert request.method.lower() == "get"
        assert response.body == b"foo"
        assert response.status == 200

Hey @ahopkins
Sorry for asking: when could we expect the merging of this PR / releasing a new version of sanic-testing?
Thanks a lot!


shadowed trait in a generic argument causes incorrect name resolution.

Consider this code:
trait A {
    fn woop(&self);
}
trait B {
    const X: usize;
    fn woop(&self);
}

impl<A> B for A
where
    A: B,
{
    const X: usize = 1;

    fn woop(&self) {
        println!("{}", A::X);
        //             ^ this is considered as `trait A` not the generic param `A` by r-a.
    }
}

fn main() {}

See:

This also impacts rename, which gets a tad confused:

Rustc however does resolve this properly and the program provided compiles fine.

The might be two issues here:

we don't support const generics much outside of parsing
this still happens if you replace the const with an associated type, which may or may not be https://github.com/rust-analyzer/rust-analyzer/issues/8282

we don't support const generics much outside of parsing

This occurs if you were to do:
     fn woop(&self) {
        println!("{}", A::woot());
        //             ^ this is considered as `trait A` not the generic param `A` by r-a.
    }

As well, so probably not related to const generic 🤔

A::X gets correctly resolved, so this seems to be a problem purely in the IDE layer name resolution.


Implement the capability to change the language between tests

This PR implements the capability to change the language between tests for iOS by adding flags to xcrun. It looks like this is straightforward for Android as well. I didn't make that change because I'm not set up to verify it works on Android at the moment. I'm hoping someone else can make a change in my branch, or can just make another PR later.
Basically I just added a new optional language field to the params object that gets passed to device.launchApp().
Example usage:
init.js
beforeAll(async () => {
  await detox.init(config, {launchApp: false});
});

test.spec.js
const LOCALES = ["es-MX", "fr-FR"];

LOCALES.forEach(locale => {

  describe("Run tests in various languages", () => {

    beforeAll(async () => {
      await device.launchApp({
        newInstance: true,
        language: locale
      });
    });

    beforeEach(async () => {
      await device.reloadReactNative();
    });

    it(`Example test in ${locale}`, doStuff());

  });

});

Thanks for this PR.
Locale is something different from language and it is incorrect to tie them together in all cases. I think it would be better to give an option for providing a different locale than the language, and if no locale is provided, use the system one (nothing passed, like it is now for language).

Thanks for taking the time to submit this PR!
There are a few things that need to be resolved before we can continue:

Regarding the API, Android must be taken into account. It seems to not be straightforward (as far as I tested). I'm not sure these params can be passed at launch. There are a few resources regarding changing locale during tests
https://developer.android.com/guide/topics/resources/localization#testing
https://stackoverflow.com/questions/16760194/locale-during-unit-test-on-android
Every feature must be tested with the test app. This means, that we need to add language support to the test app, and use the new API to test it actually triggers language/locale change in the app.
@LeoNatan's comment is very important, and on top of that, the two platforms seem to construct the locale/language/country in a slightly different way.
Android: Locale locale = new Locale(language, country); "de", "DE"
iOS:  -AppleLanguages "(de)" or -AppleLocale "fr_FR"

Testing on the test suite can be very easy to handle: Just put the app language and app locales to text fields and test that they are correct.

@rotemmiz Regarding API, I am not sure I understand.
In iOS settings, setting the country is really setting the locale. So en_GB, en_CA, en_US, de_DE, etc. Setting the language changes the interface language, but it's also given in the same notation, so en_GB, en_CA, en_US, de_DE, etc. It might also accept shorter notation ("de") and that is mapped to a default country.
In Android, is there no way to define the locale different than device/app language? Seems like a big design flaw as the two are really unrelated.

Hey, just thought I'd pop in and give an update -
Basically I haven't had any bandwidth to work on this in a while. I'm hoping I'll have some time in 1-2 weeks. If anyone else is free to work on this, feel free to fork my fork or work directly in my fork (I'll grant anyone access that asks me).
I still plan on doing my best to address all the requested changes and feedback, just haven't had any time :(

Here is one approach we could take for implementing this on Android

Check this apk into the Detox source code. Document its usage and provide credit to the author
Use adb to install this APK and grant it CHANGE_CONFIGURATION permission when this language API is invoked

adb install path/to/adb-change-language.apk
adb shell pm grant net.sanapeli.adbchangelanguage android.permission.CHANGE_CONFIGURATION

Change the language by deeplinking to this 3rd party app via adb

adb shell am start -n net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language pt-rBR

The API would need to be slightly different for Android. The deep-linking syntax for this language switching app takes a single 'language' parameter in : syntax (e.g. "es-MX"). As @LeoNatan pointed out, the language/locale system in Android is not as robust as iOS.

I still think this should be done in a separate PR, but I just wanted to share how I think this could be achieved :)

Looks like the CI results went from passing to failing when I closed and re-opened the PR.
Some of the e2e animations started failing. Anyone have any idea why? Seems completely unrelated.
22:21:21     ✕ should detect loops with final number of iterations (driver: Native) (481822ms)
22:21:21     ✕ should not wait during delays longer than 1.5s (driver: Native) (960341ms)
22:21:21     ✕ :ios: should wait during delays shorter than 1.5s (driver: Native) (960301ms)

I am OK with this change. @luisnaranjo733 Could you please update documentation with the new API? Thanks

Awesome! I just merged the latest from master into my branch, and confirmed that unit and e2e tests are still passing.
I've also added some doc changes to the device API page.

Thank you!


Wrong notification action button removed.

fixes #10
I've removed the complete action button on notifications.

Hey @somenath1435,
This issue has been resolved.


Clean Up Code

It's clearly not optimized or DRY

https://github.com/AbdulDevHub/Local-Video-Player/blob/main/scripts/scriptNew.js

I heard that you can nest css selectors for better readablity, please try and do that wherever applicable, don't break my code.
I want to clean up my code, and make it more DRY (Don't repeat yourself). Make sure the changes you make don't break any of the functionality.

Go through all files and clean them up as best as possible.


Implement a method to clean up a collection without destroying the collection and re-creating it.

done


Silently ignore pingImage failure and load number of pages lazily

For some reason, pingImage fails for me when I try to convert a small pdf (latex generated formula), with the general message "Failed to read the file". However, when the pingImage method is not used or its exception catched, the conversion completes just fine for me. As it has been added as speedup only in https://github.com/spatie/pdf-to-image/commit/b0d7ab03ae7d556a4fb92ad4baf8e6322c4d2025, I am confident we can safely ignore its failure. If something really is wrong, it will throw later anyways.
That is why I propose to silently catch the pingImage method, but also to move the whole number of page retrieval outside of the constructor. Its result value is never used until explicitly called using either setPage, getNumberOfPages or saveAllPagesAsImages. So, why retrieve it when it might not even be used?
Note that this might be considered BC-incompatible: I changed the $numberOfPages class property to private, to enforce the usage of the already existing getter method, which triggers the lazy load.

Thanks!

I'm reverting this. The "it will correctly return the number of pages in pdf file" test fails because of this PR and there was an error in the logic ($pdfFile doest not exist).
For future PRs make sure that the functionality is working and all tests pass.

Well, I was waiting for the checks to be run, but they needed to be started manually... You can just add $this-> before the $pdfFile, that should fix it.


feat(RHINENG-1232): Ability to enable / disable signatures Part 1

Started doing some work on https://issues.redhat.com/browse/RHINENG-1232

Work done so far ...
Showing disabled rules in the Signature Table:

Disabled signature details:

Thanks for the review @mkholjuraev .  However there is still much more to do on this PR.  I am a bit slow to figure out the frontend stuff, but I'm getting there.

Added a button that enables a disabled signature ...
Before pressing the button the signature is disabled:

Pressed the button to enable the signature:

Rule is enabled again after pressing the button:

Added the Actions dropdown for enabling and disabling a particular signature.
Enabling a signature ...

Disabling a signature ....

Filtering on Disabled signatures:

Filtering on All signatures (both enabled and disabled):

Thanks for the review @bastilian .  I learnt a lot from doing this.


Missing ClusterRole permissions for poddisruptionbudgets

With v0.8.0 introducing HA replica configuration for flagd-proxy FlagSources, open-feature-operator now attempts to list, create, and watch PodDisruptionBudget resources.
I observed rbac permission denied errors from openfeature operator trying to reconcile FlagSource and added these permissions manually until errors no longer showed up:
Index: config/rbac/role.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml
--- a/config/rbac/role.yaml	(revision bcdafd29a0bd5a64f8de35bfe573566155021226)
+++ b/config/rbac/role.yaml	(date<PHONE_NUMBER>791)
@@ -147,3 +147,11 @@
   verbs:
   - get
   - update
+- apiGroups:
+    - policy
+  resources:
+    - poddisruptionbudgets
+  verbs:
+    - list
+    - create
+    - watch

Sorry, looks like I missed the update verb 🤦♂


SW-2003 Use ArbitraryJsonObject for automation settings

In preparation for changing the JSON deserialization settings to treat empty
strings as null values, update the automation payloads' settings fields to use
ArbitraryJsonObject instead of Map<String, Any?>.
Client-visible behavior remains the same as before.

Current dependencies on/for this PR:

main

PR #839   👈

PR #840

This comment was auto-generated by Graphite.


Implement common error handling in the ingest scripts and tests

Let sqlalchemy catch errors, like this:
try:
        db.Publications.insert().execute(new_ref)
        print(f'Added {name_add} to Publications table')
except sqlalchemy.exc.IntegrityError as err:
        print("\nSIMPLE ERROR: It's possible that a similar publication already exists in database\n"
              "SIMPLE ERROR: Use search_publication function before adding a new record\n")
        with disable_exception_traceback():
           raise

And test like this:
# should fail if trying to add a duplicate record
with pytest.raises(sqlalchemy.exc.IntegrityError):
     add_publication(db, name='Ref 1',bibcode='2020MNRAS.496.1922B')

@Will-Cooper implemented a SIMPLE Error class. Could you paste an example implementation here?

Using your example; we essentially catch the sqlalchemy IntegrityError and replace that error and traceback with a more helpful message via raise SimpleError("error message").
try:
     db.Publications.insert().execute(new_ref)
     print(f'Added {name_add} to Publications table')
except sqlalchemy.exc.IntegrityError:
    raise SimpleError("It's possible that a similar publication already exists in database\n"
                                 "Use search_publication function before adding a new record")

And testing:
# should fail if trying to add a duplicate record
with pytest.raises(SimpleError):
     add_publication(db, name='Ref 1',bibcode='2020MNRAS.496.1922B')

done in #204


Assess the features of the geoprocessor as built (20)

[ ] Reproduce command line usage.
[ ] Determine deployment strategy.
[ ] Handoff to geoprocessor.
[ ] Geoprocessor posts to SQS.
[ ] Geoprocessor sends resulting tiles to S3.
[ ] Delete original images.

-2 for #168

-1 for https://github.com/azavea/raster-foundry/issues/174

+1 for moving #155 to the backlog

-1 for https://github.com/azavea/raster-foundry/issues/175

-1 for https://github.com/azavea/raster-foundry/issues/186

-2 for https://github.com/azavea/raster-foundry/issues/188

-2 for https://github.com/azavea/raster-foundry/issues/176

-1 for https://github.com/azavea/raster-foundry/issues/187

-1 for https://github.com/azavea/raster-foundry/issues/193

-1 for https://github.com/azavea/raster-foundry/issues/179

-5 for #202

-1 for https://github.com/azavea/raster-foundry/issues/179

-1 for https://github.com/azavea/raster-foundry-tiler/issues/4


Fix graphql queries argument requirement

Proposal

hash argument as required CryptoHash for graphql queries

Thanks for fixing this! :+1:
(I forgot to do this in https://github.com/linera-io/linera-protocol/pull/902.)


Update README.md

added link to the Flax implementation
renamed gradient standardization into gradient normalization

Thanks @nestordemeure!