🐛 [firebase_storage] getData crashes the application on Windows for some files

Bug report
Describe the bug
Calling getData crashes the app on Windows for some files. It seems very similar to this fixed issue, but it happens only for some files. I don't know what's the difference between files where it works and files where it doesn't work.
In Visual Studio Debugger:
Exception thrown at 0x00007FFE30CCF84B (vcruntime140d.dll) in wintest.exe: 0xC0000005: Access violation writing location 0x0000025329189000.

vcruntime140d.dll!00007ffe30ccf84b()
wintest.exe!firebase::storage::internal::GetBytesResponse::ProcessBody(char const *,unsigned __int64)
000000875a3fe530()
000000875a3fe508()
cccccccccccccccc()
cccccccccccccccc()
0000000000004000()
000000000090057b()
000000875a3fe768()
wintest.exe!firebase::rest::CurlThread::ProcessRequests(void *)
0000025323c479e0()
0000025323fa4760()
0000000000004000()
cccccccccccccccc()
cccccccccccccc01()
0000025323c479e0()
0000008700000001()
wintest.exe!00007ff7470255c0()
000000875a3fe768()
wintest.exe!f_b_Curl_debug()
0000025323fa4760()
0000000000000001()
0000000000004000()
0000025323c479e0()
0000025323fce6f0()

Steps to reproduce
Steps to reproduce the behavior:

Create a Firebase project with Firebase Storage.
Start it on Windows (flutter run -d windows)
Run the code below anywhere in it:

FirebaseStorage.instance
    .refFromURL(
        // This file is publically readable.
        // It's a font file downloaded from
        // https://fonts.google.com/specimen/M+PLUS+Rounded+1c
        'https://storage.googleapis.com/anton-ff.appspot.com/public/MPLUSRounded1c-Thin.ttf')
    .getData()
    .then((d) {
  print('Success, length: ${d?.lengthInBytes}');
});

Observe the crash.

Expected behavior
No crash. On web it prints: Success, length: 2900340.
Sample project
N/A: see the code sample above.
Additional context
N/A

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.7, on Microsoft Windows [Version 10.0.22621.2861], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.3)
[!] Android Studio (not installed)
[✓] VS Code (version 1.85.1)
[✓] Connected device (3 available)
[✓] Network resources

I know my version of Flutter is outdated, but I don't believe it has anything to do with the error.
Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 3.1.3
Flutter SDK 3.13.7
wintest 1.0.0+1

dependencies:
- cupertino_icons 1.0.6
- firebase_core 2.24.2 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_storage 11.6.0 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine]

dev dependencies:
- flutter_lints 2.0.3 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web]

transitive dependencies:
- _flutterfire_internals 1.3.16 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.17.2
- fake_async 1.3.1 [clock collection]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.10.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_storage_platform_interface 5.1.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.6.17 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web]
- http 1.1.0 [async http_parser meta]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- js 0.6.7 [meta]
- lints 2.1.1
- matcher 0.12.16 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.5.0 [collection]
- meta 1.9.1
- path 1.8.3
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.0 [path]
- stream_channel 2.1.1 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.6.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- typed_data 1.3.2 [collection]
- vector_math 2.1.4
- web 0.1.4-beta

Reproducible using the code snippet shared above.
When I tested on windows, the app just crashed with the lost connection to device message. I also tested on web, but on the web, it worked just fine.


csrf required for triggering build via http auth authenticated webhook

Details
Hi,
In OpenStack, we've been using authentication with the webhook endpoints to trigger builds.
The way this has been working is that projects add a common openstackci user as an admin, and then in their project configuration inside our platform they add their webhook URL.
When new releases are made, our CI system uses the openstackci account (with the password only known to it) to authenticate and trigger RTD builds for the releasing project with a POST.  The exact code that does this is https://git.openstack.org/cgit/openstack-infra/zuul-jobs/tree/roles/trigger-readthedocs/tasks/main.yaml#n11
But in essence that boils down to (for, say jenkins-job-builder project)
curl --request POST -u openstackci:OURPASSWORD https://readthedocs.org/api/v2/webhook/jenkins-job-builder/47271/

Our jobs starting failing around 2018-12-05 (http://zuul.openstack.org/builds?job_name=trigger-readthedocs-webhook).  The jobs don't log the output of this POST so we don't leak the password into logs.
However, testing manually, the responses indicate a content-length is now required, and a referer, which ends up with
$ curl --request POST -H "Content-Length:0" -u openstackci:PASSWORD -e https://readthedocs.org/api/v2/webhook/jenkins-jo2/webhook/jenkins-job-builder/47271/ https://readthedocs.org/api/v2/webhook/jenkins-jo2/webhook/jenkins-job-builder/47271/
{"detail":"CSRF Failed: CSRF cookie not set."}

So I'm guessing all this points to CSRF has been somehow enabled for webhook endpoints when using HTTP basic-auth?  Is this possibly a new configuration?
We don't use the token-based webhook method because this system means we only have one common secret to keep -- the openstackci user password -- and everything else is self-service for projects who simply add the common user as an admin and include in their configuration their endpoint URL.
Any help with this will be greatly appreciated, thanks

On 2018-12-05 we did a deploy: https://docs.readthedocs.io/en/latest/changelog.html#version-2-8-3 but I don't find anything relevant there. I need to research a little more what has happened here.
Also, I got a different error:
$ curl -X POST -d "branches=datetime" -u humitos:$RTD_PASS https://readthedocs.org/api/v2/webhook/test-builds/56359/
{"detail":"CSRF Failed: Referer checking failed - no Referer."}

@humitos thanks - yes I saw that at first to.  If you add a "-e" with your URL to the request, it will set a referer.
I sort of had 3 steps to get to the csrf error; first it wanted a request-length>0, then the referer, then it failed with the csrf error

@humitos did you manage to find anything?

@humitos any update on this?
I see it's been tagged with a milestone that seems closed, but per http://zuul.openstack.org/builds?job_name=trigger-readthedocs-webhook all our publishing jobs are still failing.  If it expected to be fixed, I can look closer and see what's going on (as mentioned before, the logging isn't very helpful as we don't want to leak the password, so I'll have to dig into it more manually).

@ianw the PR is still under review. I'm pinging @agjohnson here since he had different opinions about this.

Hello team. Airship project (lives under OpenStack) is affected by this bug. Is there anything I can help with? Thank you.

This should now be deployed.

Thank you, it seems our jobs are working again
http://zuul.openstack.org/builds?job_name=trigger-readthedocs-webhook


Editor area graphics glitch

This seems to be the universal problem I'm having. That picture in the workspace is my wallpaper, and it seems the graphics are glitching and preventing anything from being displayed in the editor.
I can open folders, toggle dropdowns, and even open files without a problem but nothing is displayed in the center besides a glitched screenshot.

I'd say this is related to wine opengl and graphics drivers
Can I get the following info;
Operating system (Fedora 34, ...)
Desktop environment (XFCE 4.16, ...)
Graphics card model
Graphics card driver (Version number)

Sure, here you go @Thermionix
Operating system: Pop! OS 20.04
DE: GNOME 3.36.8
Graphics card: Nvidia RTX 2060 Mobile
Graphics card driver: 465.31

Can you provide the output of dpkg -l | awk '{print $2}' | grep nvidia

I think you probably need sudo apt-get install libnvidia-gl-465:i386

output of dpkg -l | awk '{print $2}' | grep nvidia
libnvidia-cfg1-470:amd64
libnvidia-common-470
libnvidia-compute-460:amd64
libnvidia-compute-465:amd64
libnvidia-compute-470:amd64
libnvidia-compute-470:i386
libnvidia-decode-470:amd64
libnvidia-decode-470:i386
libnvidia-encode-470:amd64
libnvidia-encode-470:i386
libnvidia-extra-470:amd64
libnvidia-fbc1-470:amd64
libnvidia-fbc1-470:i386
libnvidia-gl-465:i386
libnvidia-gl-470:amd64
libnvidia-gl-470:i386
libnvidia-ifr1-470:amd64
libnvidia-ifr1-470:i386
nvidia-compute-utils-465
nvidia-compute-utils-470
nvidia-dkms-470
nvidia-driver-465
nvidia-driver-470
nvidia-kernel-common-470
nvidia-kernel-source-470
nvidia-settings
nvidia-utils-470
xserver-xorg-video-nvidia-470

I actually did what you suggested, also ran it from the command line and set my dedicated GPU flags manually and the bug disappeared.
However, now fusion 360 seems to have encountered another error. I'll open another issue.


intergation: test lease promote

/cc @heyitsanthony

@heyitsanthony PTAL.

closed in favor of #4386


Document creating stacker bucket with CloudFormation.

As talked about in https://github.com/remind101/stacker/pull/497#issuecomment-373598384, this documents how more advanced stacker users might setup a stacker bucket, when they want more control over creation of the bucket (e.g. tags, default encryption, bucket policies, created in a specific AWS account or region, etc).

Hey @troyready / @GarisonLotus. This is a slightly more generalized version of what we do internally.
Eventually, I'd like to support automating this more in the config, like I talk about in https://github.com/remind101/stacker/pull/497#issuecomment-366143771, but it's probably worth documenting that his method can be used already.


Group imports at the top of the file. Fixes #119

Fix #119

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks broke.

Comments from Reviewable

@Konstantin8105 Why did you close this?

Because I don't understand- why it is fail

It is still a good change, we should leave it open until the issue is found.

Ok

Reviewed 2 of 2 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks broke.

Comments from Reviewable


Add documentation on how to change the default design

Fixes #292.

GOV.UK branding remains in the title element, as at https://x-govuk.github.io/govuk-eleventy-plugin/options/
<title>Options - Eleventy Plugin - GOV.UK</title>

@hickford good point! Looks like this can be overridden by setting organisationName. We should at that to the documentation (and set it for our own sites).

Documentation now on the website, and now possible to remove GOV.UK from page titles. Thanks all.


Add missing actions RemovePermission and ListDeadLetterSourceQueues

Adds empty shell for RemovePermission action and fully functional (sans pagination) ListDeadLetterSourceQueues. Implementation of ListDeadLetterSourceQueues is rough because it requires loading QueueData for every existing queue. However I'm not aware of any better way to do this inside the elasticmq framework.
Branched off of open commit to use JSON responses, so this can be merged afterwards. Review last two commits for new changes. Tested and working locally.
Open to all feedback as this is my first contribution to the project. NBD if not wanted, mainly did this for my own exploration.
Closes #818

Thanks for PR! We merged the original PR, so please rebase on origin/master, so GH doesn't show conflicts.

Rebased on latest master

I added CLI and SDK tests for listing dlq sources, however I can't figure out an issue with the SDK test. Even though everything looks okay when debugging the Directive (the correct action is hit and response returned), the AmazonSQSClient always gets a 404 response.
null (Service: AmazonSQS; Status Code: 404; Error Code: 404 Not Found; Request ID: null; Proxy: null) com.amazonaws.services.sqs.model.AmazonSQSException: null (Service: AmazonSQS; Status Code: 404; Error Code: 404 Not Found; Request ID: null; Proxy: null) 	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1819) 	... 	at com.amazonaws.services.sqs.AmazonSQSClient.listDeadLetterSourceQueues(AmazonSQSClient.java:1274)
The dlq CLI test and the other SDK tests work perfectly in my environment so I can't figure out what's wrong here. Any thoughts?

I added CLI and SDK tests for listing dlq sources, however I can't figure out an issue with the SDK test. Even though everything looks okay when debugging the Directive (the correct action is hit and response returned), the AmazonSQSClient always gets a 404 response.
null (Service: AmazonSQS; Status Code: 404; Error Code: 404 Not Found; Request ID: null; Proxy: null)
com.amazonaws.services.sqs.model.AmazonSQSException: null (Service: AmazonSQS; Status Code: 404; Error Code: 404 Not Found; Request ID: null; Proxy: null)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1819)
	...
	at com.amazonaws.services.sqs.AmazonSQSClient.listDeadLetterSourceQueues(AmazonSQSClient.java:1274)

The dlq CLI test and the other SDK tests work perfectly in my environment so I can't figure out what's wrong here. Any thoughts?

I tried to debug it as well. Endpoint is definitely being hit and cli test pass, so not sure what's going on with SDK, I tried lifting version to newest but with no avail.
I think CLI tests are good enough, I'd just remove/comment out the sdk test for now. We can add it later on.

I added CLI and SDK tests for listing dlq sources, however I can't figure out an issue with the SDK test. Even though everything looks okay when debugging the Directive (the correct action is hit and response returned), the AmazonSQSClient always gets a 404 response.
null (Service: AmazonSQS; Status Code: 404; Error Code: 404 Not Found; Request ID: null; Proxy: null)
com.amazonaws.services.sqs.model.AmazonSQSException: null (Service: AmazonSQS; Status Code: 404; Error Code: 404 Not Found; Request ID: null; Proxy: null)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1819)
	...
	at com.amazonaws.services.sqs.AmazonSQSClient.listDeadLetterSourceQueues(AmazonSQSClient.java:1274)

The dlq CLI test and the other SDK tests work perfectly in my environment so I can't figure out what's wrong here. Any thoughts?

There were 3 tests failing, I left comments how to fix them. I also left some small remarks, please check it. I'll merge PR next week and we should also release new version at the end of next week.
Thanks again for your help!

There were 3 tests failing, I left comments how to fix them. I also left some small remarks, please check it. I'll merge PR next week and we should also release new version at the end of next week.
Thanks again for your help!

Fixed tests, nice find! Thanks for the quick and helpful feedback!

There were 3 tests failing, I left comments how to fix them. I also left some small remarks, please check it. I'll merge PR next week and we should also release new version at the end of next week.
Thanks again for your help!

Fixed tests, nice find! Thanks for the quick and helpful feedback!

Sorry, I didn't reply earlier, I was away from keyboard because of family affairs. I approved the PR :)


WIP. Adds Pre-Processing feature. Related issue #40

Closes #40
After serial questions about manipulation for modules together with our tool and some misunderstanding such for "How do I do this without the /ndebug flag" https://twitter.com/GitHub3F/status/1248621686930337795
I decided to add configurable Pre-Processing where we can configure like ILMerge, Conari, and others.
"WIP" since PackageReference is missing copy files to output if .NET Core/SDK-style

https://github.com/NuGet/Home/issues/4837

But GeneratePathProperty feature https://github.com/NuGet/Home/issues/4837#issuecomment-474184722 will require additional processing to find related platform:

<PackageReference Include="Conari" Version="1.4.0" GeneratePathProperty="true" />
...
<Copy SourceFiles="$(PkgConari)\lib\netstandard2.0\Conari.dll" DestinationFolder="$(OutDir)" />

Thus CopyLocalLockFileAssemblies still is more suitable for this case. But I'm still not sure, I'll try to review this later.

Well, CopyLocalLockFileAssemblies is here; Actually I don't want to see all dependencies inside output folder because it can be confusing. But ...
+Pre-Proc feature has been splitted into separate PreProcGear implementation (IProjectGear)

Rebased onto 2131353e5c


mat2: init at 0.11.0

Motivation for this change
Adds mat2, a program designed to remove metadata information from a variety of file types. This can be useful for not accidentally revealing personal information when sending files.
Upstream is at: https://0xacab.org/jvoisin/mat2/
doCheck = false was set, as there was an issue with internal library detection during the check phase. If there is a known solution to this, please let me know.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 90160 1

1 package built:
- mat2

Result of nixpkgs-review pr 90160 run on x86_64-darwin 1

1 package built:

mat2

Closing because the author is a ghost.


PnP fails with right coordinate points

The trained network produces correct keypoints, but the PnP algorithm gives very incorrect poses. For example, depth values of zero or very large negative numbers.
I visualized and verified the 2D coordinates predicted are correct. Also, the error doesn't happen with all predictions. Sometimes within the same image, there are correct and incorrect poses.
The object is a thin cuboid, 8x8x2 cm. I tried to change to solvePnPRansac() as in this line. There are now fewer incorrect poses but it didn't solve the problem completely.
Are there any other alternatives to correctly match 2D-3D correspondences?

Thanks for your feedback. I wonder if this is related to the opencv version you are using. Did you have this problem earlier as well? Which version of opencv are you using? I am currently traveling but will look into this as soon as possible.

For reference, my opencv version is 3.4.3 and pnp provides accurate results on LINEMOD using this version.

Thanks for the reply @btekin.
I still get the same results when I use opencv version 3.4.3.
Also, the results were accurate for some other objects that I tested using the same algorithm. I was wondering if this has something to do with the algorithm itself.
The object for which PnP fails has a size of 8x8x2 cm.
For example,
points3d = [[ 0.        ,  0.        ,  0.        ],
   ....:        [-0.0860909 , -0.050275  , -0.03634   ],
   ....:        [-0.0860909 , -0.050275  ,  0.0042    ],
   ....:        [-0.0860909 ,  0.050275  , -0.03634   ],
   ....:        [-0.0860909 ,  0.050275  ,  0.0042    ],
   ....:        [ 0.00720001, -0.050275  , -0.03634   ],
   ....:        [ 0.00720001, -0.050275  ,  0.0042    ],
   ....:        [ 0.00720001,  0.050275  , -0.03634   ],
   ....:        [ 0.00720001,  0.050275  ,  0.0042    ]]

points2d = [[ 955.289  ,  420.2667 ],
   ....:        [ 919.0348 ,  363.02173],
   ....:        [ 948.9853 ,  328.90167],
   ....:        [ 879.16986,  423.60797],
   ....:        [ 905.62866,  389.72952],
   ....:        [1003.7523 ,  447.08157],
   ....:        [1031.7747 ,  413.8837 ],
   ....:        [ 959.3554 ,  502.82587],
   ....:        [ 983.0211 ,  469.66736]]

cameraMatrix = [[1.0790131e+03, 0.0000000e+00, 6.4000000e+02],
   ...:        [0.0000000e+00, 1.0790131e+03, 4.8000000e+02],
   ...:        [0.0000000e+00, 0.0000000e+00, 1.0000000e+00]]

pnp(points3d, points2d, cameraMatrix)
results in a translation of [  9.04003410e-05, 4.37270641e-02, 4.40896472e-02] if 'solvePnP' is used in the pnp method.
The same inputs result in a translation of [2.931641604603839046e-01, -3.187160154882406199e-02, 8.774756454979734110e-01] if 'solvePnPRansac' is used.
Sometimes both methods provide incorrect values.
Though 'solvePnPRansac' works in most cases, I was curious to know why it doesn't work sometimes.

Is your object a symmetric object? If it is the case, the 2D keypoint predictions might seem accurate but in fact they might there might be left/right ambiguity in the predictions.
In LineMod there is a similar thin object, e.g. glue but the accuracy is reasonably good in that case.
SolvePnPRansac could indeed be powerful in the case of predictions with outliers. In that case, using more keypoints could also prove useful.

Yes, my object is kinda symmetric.
I am already working on training with additional keypoints. Will let you know if it is successful.

Hi, all. Did you solve the problem? My model is symmetric also, and the predicted keypoints are almost the same with GT, but the PnP result is completely reversed in three axes.


Mapster returning null for Collections instead of empty collection

I recently migrated to Mapster from Automapper.
We have a huge application and applied mapster and it looks good.
But we are facing an issue that When collections are mapped they are returning as null instead of empty collection when source object property is null.
Is there any workaround or feature so that we can have Empty collection instead of null just like Automapper.
Thanks

You can use AddDestinationTransform.
TypeAdapterConfig.GlobalSettings.Default
    .AddDestinationTransform((IReadOnlyList<ChildDto> list) => list ?? new List<ChildDto>());

Problem is you need to list all target types to handle null.
I think Mapster need to support this in future version.

Added generic support for AddDestinationTransform.
config.Default.AddDestinationTransform(DestinationTransform.EmptyCollectionIfNull);

Thank you very much. This is great

@chaowlert  This is working great when Collections are a property of a class however when we map Collections directly its still returning null
var lst3 = mapster.Map<List<CA2>>(lst); returns null
Here I have tried using both config.Default.AddDestinationTransform((List<CA2> list) => list ?? new List<CA2>());  and config.Default.AddDestinationTransform(DestinationTransform.EmptyCollectionIfNull);


updates to acronym search pr

@jjw24 please see the last commit

Well...Seems that we should include number for scoring deduction, because sometimes the count of number may be large.
Maybe we can include number as a bump but not a scoring deduction?

solved it by separating the acronym check and count

Wow... Amazing, I will take a deep look soon.

I optimize some logic chain, please take a look. @jjw24

lgtm, shall we merge it in?

Yes!

you will have to do it, i dont have write access haha


⚠ Bofrost.at has degraded performance

In 47fd9bd, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 952 ms

Resolved: Bofrost.at performance has improved in 278275f after 6 minutes.


Test-network  error "Cannot run peer because error when setting up MSP of type bcssp"

I have followed the test-network documentation this command in the Interacting With The Network section causes and error:
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'
Error:
"Cannot run peer because error when setting up MSP of type bcssp"

I have a similar problem to yours, did you solve this problem?

Below is my problem
2023-03-3120:48:19.385 CST ERRO001 Cannot run peer because error when setting up MSP of type bccsp from directory /home/upc/fabric-samples/test-network/organizations/peerorganizations/org1.example.com/users/Admindorg1.example.com/msp:KeyMaterial not found in signingIdentityInfo

And I utilize this command line to solve above problem:
sudo chmod -R 777 ~/fabric-samples/

I think the mainly reason maybe is the permission of current user is not allowed to execute some commands

When execute next command:
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n fabcar --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"changeCarOwner","Args":["CAR9","Dave"]}'

Maybe you will also encounter a problem like this:
Error:error getting endorser client for invoke:unable to load TLS root cert file from /home/upc/fabric-samples/test-network/organizations/organizations/peerOrganizations/org1.example.com/peers/peero.org1.example.com/tls/ca.crt:open /home
/upc/fabric-samples/test-network/organizations/organizations/peerorganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:no such file or directory

I think the method to solve above problem is to bring up the fabric blockchain network with below command:
sudo ./network.sh up createChannel -ca

Rather than
sudo ././network.sh up createChannel

FYI, I'm using Fabric 2.1.1

Sorry for the late response. Thanks for the reply I have put block chain down for now the tech is too spontaneous some days it works more often then not it doesn't for some weird reason.

do
sudo chmod -R 777  where this MSP is located
make sure to have recursive access to the organizations and peer organizations and subdirectories in it


Master

Adding ImageProvider

Sorry that it took so long but I had a weekend off. Thanks for contributing to the project! I also updated the project for Xcode 8 and I will publish new pod version over the weekend.


Fix jitter in wide corners

It seems like if you try to walk into corner that is is wider than 90 degrees character starts to jitter a lot in place.
To solve it I checked source code for PhysX character controller and here is something I found:
// https://github.com/NVIDIAGameWorks/PhysX-3.4/blob/master/PhysX_3.4/Source/PhysXCharacterKinematic/src/CctCharacterController.cpp
// From Quake2: "if velocity is against the original velocity, stop dead to avoid tiny occilations in sloping corners"
if((currentDirection.dot(direction)) <= 0.0f)
    break;

Surprisingy enough, adding this to sweep test loop indeed solved the problem.
direction represents initial direction of the sweep and currentDirection is projected since last hit

Hey @SanielX, thanks for reporting the bug and a possible fix. There are still a few bugs with tight corners and narrow hallways (one funny one where if a hallway's width is the same as the player's the player will get stuck in it). I'm adding formal test scenarios and I'll add this to the integration tests in the next few days.
I was able to reproduce the error you're talking about by walking into the curved stairwell in the testing area, here is a gif sample. This is the same error you were talking about, correct?

I did some work to refactor the existing KCC Movement code recently and broke it into smaller functions instead of the large monolithic function that existed before. I think the best place to address this error is the function would be the GetProjectedMomentumSafe method in the KCCUtils class Link to method
This character controller design is based off Quake and Nvidia's KCC so it makes sense that this would fix the errors.
Method code:
        public static Vector3 GetProjectedMomentumSafe(bool snappedUp, Vector3 momentum, Vector3 planeNormal, Vector3 up)
        {
            Vector3 projectedMomentum = snappedUp ? momentum : Vector3.ProjectOnPlane(
                momentum,
                planeNormal).normalized * momentum.magnitude;

            // If projected momentum is less than original momentum (so if the projection broke due to float
            // operations), then change this to just project along the vertical.
            if (projectedMomentum.magnitude + Epsilon < momentum.magnitude)
            {
                return Vector3.ProjectOnPlane(momentum, up).normalized * momentum.magnitude;
            }
            else
            {
                return projectedMomentum;
            }
        }

Probably checking if projectedMomentum and currentDirection are perpendicular (aka have a dot product close to zero), then we should stop the current motion (return a remaining momentum of zero).
I'm in the process of adding some more test coverage for scenarios and full unit test coverage for the project. That way we can make sure if we fix a bug it will stay fixed in the future.

Yes, I believe this staircase represents issue the same way I had it. Though to be precise, I had weirder setup which looks like this.

I guess it would make sense to compare current direction, but in my case (own KCC) this worked pretty well
        void Move(ref Vector3 resolvedPosition, in Vector3 velocity, in GroundCheckResult groundedInfo)
        {
            int iterations = 0;

            Vector3 tempPosition = resolvedPosition;
            Vector3 remainingMove     = velocity.normalized;
            float   remainingDistance = velocity.magnitude * Time.deltaTime;
            Vector3 initialVelocityNormalized = remainingMove;
            while (remainingDistance > 0f && iterations < MaxIterationsPerFrame)
            {
                // From Quake2: "if velocity is against the original velocity, stop dead to avoid tiny occilations in sloping corners"
                // From myself: Do not care for this fact if player happens to be on slope or in air
                if (groundedInfo.IsOnStableGround && Vector3.Dot(remainingMove, initialVelocityNormalized) <= 0.0f)
                {
                    remainingDistance = 0.0f;
                    break;
                }
                /* raycast n' stuff */
             }
             /* apply motion n' stuff */
         }

Hey @SanielX, I was able to address this issue in PR #50. You can look over the changes in that branch, they are very similar to what you suggested, and I did have to compare it to the original momentum and not the momentum of the last bounce.
There are a few build errors in the PR right now for the CI/CD, but the main fixes are added!


CI improvement tracking

Description:
This is a tracking issue for CI improvement, from what discussed in last community meeting on 1/29.
Target:

At least one gcc build with full test suite for GCC compatibility
CI on each PR runs under 45 mins vs currently ~2 hour for release run

AI:

[x] 1. Add build profiling to existing CI pipeline and store in artifacts for analysis
[x] 2. Investigate other resource provision: Other hosted CI services, GCP, etc
[x] 3. Use Clang for release #4158
[ ] 4. move remaining circleci jobs to azp.

Any suggestions are welcome.
Relevant Links:
#3741

Calling this done for now. We can track individual issues as needed.


pub serve crashes when a path-package has a lib with a symbolic link to packages

This issue was originally filed by<EMAIL_ADDRESS>
What steps will reproduce the problem?
I was not able to reproduce this in a smaller example:
The basic problem is, that pub apparently goes into an endless loop when I have a symbolic link (to packages) in one of my libs.
=> I have one dart project:
  merchant_dashboard
which depends on
  merchant_dashboard_server
In my merchant_dashboard_server/lib I have a json2protobuf library with an example directory:
merchant_dashboard_server/lib/json2protobuf/example
and in this directory I have a symbolic link to ../../packages
When trying to serve merchant_dashboard (the client, not the server) pub serve exhausts the memory and aborts with the following error messages:
From Dart editor: »Could not start pub serve or connect to pub«
From pub output: »...
Exhausted heap space, trying to allocate 96 bytes.
Unhandled exception:
Out of memory«
I tried to reproduce this with 2 small projects but couldn't trigger this.
However. Please simply contact me and I will give you a zip with my code.  (I just don't want it publicly visible).
What version of the product are you using?
Dart Editor version 1.6.0.release
Pub 1.6.0
On what operating system?
Linux mininc 3.16.3-1-ARCH #1 SMP PREEMPT Wed Sep 17 21:54:13 CEST 2014 x86_64 GNU/Linux
What browser (if applicable)?
dartium (but not important)

This issue has been moved to dart-lang/pub#1139.


Sign commits on GH Actions using GH API

Given the push for signed commits, set Skuba to use signed commits on GH Actions.

Closing this for now, let's reopen when we have time to revisit 🙏


Update sarama and cache function port

Issue Ref: https://github.com/kubeless/kubeless/issues/826
Description:
It has been reported that the performance of the kafka-trigger-controller is limited to 5qps.
To speed up the processing, it has been suggested to cache the request to k8s API server fetching the Kubeless function port.
Added

integration test for the latest runtime python37

Removed

deprecated dependency github.com/bsm/sarama-cluster
integration test using the now removed runtime python34
dead code for runtime python36 integration test

Changed

upgrade github.com/Shopify/sarama from v1.19.0 to v1.27.0 with support for consumer groups
retrieve Kubeless function port from k8s API server once per group consumer

TODOs:

[x] Ready to review
[X] Automated Tests
[ ] Docs

With the above changes I managed to increase the throughput almost 4 times.
Test Environment:

MacBook Pro, 3 GHz Dual-Core Intel Core i7, 16 GB 1600 MHz DDR3
Docker Desktop for Mac <IP_ADDRESS> with Kubernetes v1.16.5

Test Scenario
k6 -> nginx ingress -> http handler -> kafka -> kafka-trigger-controller -> kafka handler

Test Case: image kafka-trigger-controller v1.0.4
Load test started on 2020-09-25T14:20:25Z. The last message was published from the http handleron 2020-09-25T14:23:25Z, and the last message was consumed by the kafka handler on 2020-09-25T14:33:19Z. This makes for 10 mins delay in processing of kafka messages.
          /\      |‾‾|  /‾‾/  /‾/
     /\  /  \     |  |_/  /  / /
    /  \/    \    |      |  /  ‾‾\
   /          \   |  |‾\  \ | (_) |
  / __________ \  |__|  \__\ \___/ .io

  execution: local
     script: /Users/stan/Projects/typeform/kubeless-poc/function/insights/load-test.js
     output: -

  scenarios: (100.00%) 1 executors, 10 max VUs, 3m30s max duration (incl. graceful stop):
           * default: 10 looping VUs for 3m0s (gracefulStop: 30s)

running (3m00.5s), 00/10 VUs, 3884 complete and 0 interrupted iterations
default ✓ [======================================] 10 VUs  3m0s

    ✓ response status is 200

    checks.....................: 100.00% ✓ 3884 ✗ 0
    data_received..............: 1.1 MB  5.9 kB/s
    data_sent..................: 1.0 MB  5.7 kB/s
    http_req_blocked...........: avg=15.92µs  min=2µs     med=5µs      max=3.47ms p(90)=7µs      p(95)=10µs
    http_req_connecting........: avg=6.07µs   min=0s      med=0s       max=1.76ms p(90)=0s       p(95)=0s
    http_req_duration..........: avg=463.9ms  min=73.63ms med=363.57ms max=3.1s   p(90)=856.56ms p(95)=1.25s
    http_req_receiving.........: avg=97.52µs  min=28µs    med=84µs     max=5.55ms p(90)=137.7µs  p(95)=164µs
    http_req_sending...........: avg=34.35µs  min=10µs    med=30µs     max=971µs  p(90)=45µs     p(95)=60µs
    http_req_tls_handshaking...: avg=0s       min=0s      med=0s       max=0s     p(90)=0s       p(95)=0s
    http_req_waiting...........: avg=463.77ms min=73.43ms med=363.43ms max=3.1s   p(90)=856.4ms  p(95)=1.25s
    http_reqs..................: 3884    21.522489/s
    iteration_duration.........: avg=464.17ms min=74.02ms med=363.82ms max=3.1s   p(90)=856.82ms p(95)=1.25s
    iterations.................: 3884    21.522489/s
    vus........................: 10      min=10 max=10
    vus_max....................: 10      min=10 max=10

Test Case: image kafka-trigger-controller #32
The requests sent by k6 were going virtually immediatelly from the http handler though the kafka-trigger-controller to the  kafka handler.
          /\      |‾‾|  /‾‾/  /‾/
     /\  /  \     |  |_/  /  / /
    /  \/    \    |      |  /  ‾‾\
   /          \   |  |‾\  \ | (_) |
  / __________ \  |__|  \__\ \___/ .io

  execution: local
     script: load-test.js
     output: -

  scenarios: (100.00%) 1 executors, 10 max VUs, 3m30s max duration (incl. graceful stop):
           * default: 10 looping VUs for 3m0s (gracefulStop: 30s)

running (3m00.5s), 00/10 VUs, 3377 complete and 0 interrupted iterations
default ✓ [======================================] 10 VUs  3m0s

    ✓ response status is 200

    checks.....................: 100.00% ✓ 3377 ✗ 0
    data_received..............: 918 kB  5.1 kB/s
    data_sent..................: 892 kB  4.9 kB/s
    http_req_blocked...........: avg=18.88µs  min=2µs     med=5µs      max=4.52ms p(90)=9µs      p(95)=15µs
    http_req_connecting........: avg=10.09µs  min=0s      med=0s       max=3.81ms p(90)=0s       p(95)=0s
    http_req_duration..........: avg=533.6ms  min=93.21ms med=477.09ms max=1.99s  p(90)=879.26ms p(95)=1.04s
    http_req_receiving.........: avg=107.34µs min=28µs    med=88µs     max=1.79ms p(90)=164µs    p(95)=202.19µs
    http_req_sending...........: avg=38.94µs  min=13µs    med=31µs     max=2.15ms p(90)=56µs     p(95)=77µs
    http_req_tls_handshaking...: avg=0s       min=0s      med=0s       max=0s     p(90)=0s       p(95)=0s
    http_req_waiting...........: avg=533.46ms min=93.11ms med=476.97ms max=1.99s  p(90)=879.13ms p(95)=1.04s
    http_reqs..................: 3377    18.708299/s
    iteration_duration.........: avg=533.9ms  min=93.42ms med=477.36ms max=1.99s  p(90)=879.5ms  p(95)=1.04s
    iterations.................: 3377    18.708299/s
    vus........................: 10      min=10 max=10
    vus_max....................: 10      min=10 max=10

It makes sense to release a new version for this right @sepetrov ? (v1.0.5)

@andresmgot thanks! Yes, I would suggest new release  :)

published: https://github.com/kubeless/kafka-trigger/releases/tag/v1.0.5


Compare and Get

when using the config files to configure components like CircuitBreaker etc. and then use the config class Resilience4JCircuitBreakerFactory to configure these components, the later one will not take effect because of the logic to get components from registry depends on [computeIfAbsent]
this PR provide method compareAndGet:
1] find component from registry
2] compare it's config with config that be configured by {@link Resilience4JCircuitBreakerFactory}
3] if not match, replace and return new one
4] return if match
5] register new one if absent

all the test case has been covered  and the coverage cannot be improved


[DO NOT MERGE]The buffer interlace info should change to frame by frame

So far the buffer interlace is set according to GRALLOC_USAGE_PRIVATE_0.
It will cause play some irregular size video has green line in screen bottom.
Change-Id: I2bff0bf84a056c1e313cb79c2762e788598fd7ac
Tests: Video play without issue.
Tracked-On: https://jira.devtools.intel.com/browse/OAM-79458
Signed-off-by: HeYue<EMAIL_ADDRESS>

This patch will be included in next merge by jenny.
Close this PR


initial hierarchical decoding commit

For hierarchical decoding work

replaced by new pull request to a feature branch instead of master branch


Global UI/React Configuration JSON File

Please provide us with the following information:

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

We are planning to deploy this multiple times, and having a central JSON config file for the UI would be very helpful. Things like:

Application Title
Header background color
Body background color
Chat tab visible/hidden
As a Question tab visible/hidden
Image at the top of the main page

etc.
OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful
I'm happy to contribute to this effort with a new branch.

Thanks! We'll be in touch soon.

This seems useful, as we often get asked how to customize those aspects of the UI. I would worry somewhat that it wouldn't be possible to encompass everything you might want to customize, but it sounds like you have experience with multiple deployments and have a good idea for what would be reasonably in scope. If you have time, please send a PR over. You'd also want to update docs/customization.md

This is highly appreciated. Now when the standard texts are in code files, it makes it harder to pull new updates.


Core: Type look up is slow

The current strategy for looking up expected type is to use a ClassTag, which is slow.
We could provide higher precedence strategies for well known types.

See benchmark results:

Success looks up for a Boolean session attribute that exists and is indeed a Boolean
FailureMissing looks up for a Boolean session attribute that is missing
FailureWrongType looks up for a Int session attribute that exists but is actually a Boolean
1 is the original implementation and 2 the new one

Note: it's impossible to beat Option on FailureMissing as it return None which is an object (no allocation).

Note: testValidate2Success is faster than testAsOption2Success because it returns constants for Success(true) and Success(false) while the latter has to allocate.

Benchmark                       Mode  Cnt          Score           Error  Units
testAsSuccess                  thrpt    3  793204457.421 ± 547622251.108  ops/s
testAsOption1Success            thrpt    3    6478412.792 ±   1491882.912  ops/s
testAsOption2Success           thrpt    3  491751338.539 ± 355678844.538  ops/s
testValidate1Success            thrpt    3    7321270.547 ±  10356687.041  ops/s
testValidate2Success           thrpt    3  697106500.721 ±  42678201.997  ops/s

testAsFailureMissing           thrpt    3    2361690.034 ±   1203718.677  ops/s
testAsOption1FailureMissing     thrpt    3  479217863.155 ± 260854266.883  ops/s
testAsOption2FailureMissing    thrpt    3  503493460.335 ± 101435460.904  ops/s
testValidate1FailureMissing     thrpt    3   28169253.466 ±   1835824.017  ops/s
testValidate2FailureMissing    thrpt    3   28158949.749 ±   5604041.775  ops/s

testAsFailureWrongType         thrpt    3   98037245.472 ±   4342836.373  ops/s
testAsOption1FailureWrongType   thrpt    3    1553109.600 ±    916526.353  ops/s
testAsOption2FailureWrongType  thrpt    3    1625525.330 ±    480249.293  ops/s
testValidate1FailureWrongType   thrpt    3    6594442.349 ±   4597743.362  ops/s
testValidate2FailureWrongType  thrpt    3   10032687.302 ±    371949.051  ops/s


feat(RHTAPREL-628): pyxis tasks get config data from data.json

This commit adds a new task collect-pyxis-params to retrieve the pyxis server and secret from the data file. It then exposes those as results so that the pyxis tasks can use them, instead of relying on them to be passed as pipeline params. As a result, the rhtap-service-push and push-to-external-registry pipelines were modified to use this new task.

Could you improve the title? add task to collect Pyxis params or something like that? PR title and commit one.

Could you improve the title? add task to collect Pyxis params or something like that? PR title and commit one.

done


Getting No ViewManager defined for class RNLinearTextGradient

"react-native-text-gradient": "0.0.13",
"react-native": "~0.55.2",

I ran rnpm link  react-native-text-gradient
npm-link info Android module react-native-text-gradient is already linked
rnpm-link info iOS module react-native-text-gradient is already linked
rnpm-link info Linking assets to ios project
rnpm-link info Linking assets to android project
rnpm-link info Assets has been successfully linked to your project

How can i fix this issue?

You need to use rntg 0.0.9 - https://github.com/iyegoroff/react-native-text-gradient#status
Use react-native link instead of rnpm link.

First of all, thanks for the quick response :) but i tried your suggestion and it still says the same,
i ran:

yarn remove react-native-text-gradient
react-native unlink react-native-text-gradiant
yarn add react-native-text-gradient
react-native link

but im still getting the same response :(

Im getting this error when trying to run npm start on the TextGradientExample
C:\Users\Admin\WebstormProjects\react-native-text-gradient\TextGradientExample\node_modules\react-native\local-cli\cliEntry.js:30
import type {CommandT} from './commands';
^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Module._compile (C:\Users\Admin\WebstormProjects\react-native-text-gradient\TextGradientExample\node_modules\pirates\lib\index.js:91:24)
    at Module._extensions..js (module.js:663:10)
    at Object.newLoader [as .js] (C:\Users\Admin\WebstormProjects\react-native-text-gradient\TextGradientExample\node_modules\pirates\lib\index.js:96:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)

Still not working, why did you close this issue?


Keys for RDF::Vocabulary::Term attributes should be symbols consistently.

The vocabulary writer currently only populates values with symbolic keys but the hash keys for term attributes are not all symbols, but a mix of strings and symbols. Keys that are not one of the vocabulary-specific predicates (e.g. dc:description) are not created as symbols, but as strings, and the objects of these string-keyed predicates are consequently not being populated in generated vocabularies.

Actually I think this was already fixed in fc06d1fa6cc234845ea846f192988bc676fd9287 by @gkellogg. I thought I was running the latest code, but I am running v2.0.2. :blush:

Request for new release?

We'll get one out in the next day or so.

:+1:  to a release.
I got #310 in, so we can have a real feature to ship with it. ;)
I noticed the inefficiency in #311 in the process. If we ship 2.1.0, I will probably backport this change to 2.0.x.

:+1: Thank you!


pkg/blobserver/union: staticcheck

Closing this, see my comment here:

https://github.com/perkeep/perkeep/pull/1405#issuecomment-894727096


🐛 [cloud_functions] Cloud function failed with exception. code: UNAUTHENTICATED

NB:  The similar too #3335 #1713 #2374 however none of their solutions have worked for me.
I am receiving this error every time I attempt to call a callable cloud function from my flutter app.
PlatformException (PlatformException(functionsError, Cloud function failed with exception., {code: UNAUTHENTICATED, details: null, message: UNAUTHENTICATED}, null))

I can confirm that I am authenticated via firebase_auth at time of calling the function. I have also been to GCP and made sure that the function is invokable by allAuthenticatedUsers.
I have exhausted all documentation around this, and none of the closed tickets solutions work for me. I did find a possible solution on Stack Overflow suggesting re-deploying the functions using Node 8 fixed the issue for one person, but as Firebase has deprecated Node 8 I haven't gone to the effort of trying this suggestion as would not be a viable long term fix.
Any assistance in resolving this would be greatly appreciated. Thanks

Stack trace

Click to Expand
I/flutter (13164): 54:34 ReduxLogging/INFO: {Action: Instance of 'AuthClaimUidAction', State: StoreState, ts: 2020-09-29 16:03:54.348706}
W/etware.onescen(13164): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
W/etware.onescen(13164): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
W/etware.onescen(13164): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
W/DynamiteModule(13164): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(13164): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(13164): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/etware.onescen(13164): The ClassLoaderContext is a special shared library.
I/etware.onescen(13164): The ClassLoaderContext is a special shared library.
V/NativeCrypto(13164): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
W/etware.onescen(13164): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed)
I/ProviderInstaller(13164): Installed default security provider GmsCore_OpenSSL
W/etware.onescen(13164): Accessing hidden method Lcom/android/org/conscrypt/ConscryptEngineSocket;->setUseSessionTickets(Z)V (greylist-max-q,core-platform-api, reflection, allowed)
W/etware.onescen(13164): Accessing hidden method Lcom/android/org/conscrypt/ConscryptEngineSocket;->setHostname(Ljava/lang/String;)V (greylist-max-q,core-platform-api, reflection, allowed)
W/etware.onescen(13164): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (greylist-max-q,core-platform-api, reflection, allowed)
W/etware.onescen(13164): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed)
W/etware.onescen(13164): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (greylist-max-q,core-platform-api, reflection, allowed)
E/flutter (13164): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(functionsError, Cloud function failed with exception., {code: UNAUTHENTICATED, details: null, message: UNAUTHENTICATED}, null)
E/flutter (13164): #0      StandardMethodCodec.decodeEnvelope
 package:flutter/…/services/message_codecs.dart
E/flutter (13164): #1      MethodChannel._invokeMethod
 package:flutter/…/services/platform_channel.dart
E/flutter (13164): <asynchronous suspension>
E/flutter (13164): #2      MethodChannel.invokeMethod
 package:flutter/…/services/platform_channel.dart
E/flutter (13164): #3      MethodChannelCloudFunctions.callCloudFunction
 package:cloud_functions_platform_interface/src/method_channel_cloud_functions.dart
E/flutter (13164): #4      HttpsCallable.call
 package:cloud_functions/src/https_callable.dart
E/flutter (13164): #5      AuthFirebase.claimUid
 package:onesceneapp/…/firebase/auth_firebase.dart
E/flutter (13164): #6      AuthMiddleware.call
 package:onesceneapp/…/middleware/auth_middleware.dart
E/flutter (13164): #7      Store._createDispatchers.<anonymous closure>
 package:redux/src/store.dart
E/flutter (13164): #8      NavigationMiddleware.call
 package:flutter_redux_navigation/src/navigation_middleware.dart
E/flutter (13164): #9      Store._createDispatchers.<anonymous closure>
 package:redux/src/store.dart
E/flutter (13164): #10     LoggingMiddleware.call
 package:redux_logging/redux_logging.dart
E/flutter (13164): #11     Store._createDispatchers.<anonymous closure>
 package:redux/src/store.dart
E/flutter (13164): #12     Store.dispatch
 package:redux/src/store.dart
E/flutter (13164): #13     AuthViewModel.fromStore.<anonymous closure>
 package:onesceneapp/…/view_models/auth_view_model.dart
E/flutter (13164): #14     _ClaimUidScreenState.build.<anonymous closure>.<anonymous closure>
 package:onesceneapp/screens/claim_uid.dart
E/flutter (13164): #15     _InkResponseState._handleTap
 package:flutter/…/material/ink_well.dart
E/flutter (13164): #16     _InkResponseState.build.<anonymous closure>
 package:flutter/…/material/ink_well.dart
E/flutter (13164): #17     GestureRecognizer.invokeCallback
 package:flutter/…/gestures/recognizer.dart
E/flutter (13164): #18     TapGestureRecognizer.handleTapUp
 package:flutter/…/gestures/tap.dart
E/flutter (13164): #19     BaseTapGestureRecognizer._checkUp
 package:flutter/…/gestures/tap.dart
E/flutter (13164): #20     BaseTapGestureRecognizer.handlePrimaryPointer
 package:flutter/…/gestures/tap.dart
E/flutter (13164): #21     PrimaryPointerGestureRecognizer.handleEvent
 package:flutter/…/gestures/recognizer.dart
E/flutter (13164): #22     PointerRouter._dispatch
 package:flutter/…/gestures/pointer_router.dart
E/flutter (13164): #23     PointerRouter._dispatchEventToRoutes.<anonymous closure>
 package:flutter/…/gestures/pointer_router.dart
E/flutter (13164): #24     _LinkedHashMapMixin.forEach  (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (13164): #25     PointerRouter._dispatchEventToRoutes
 package:flutter/…/gestures/pointer_router.dart
E/flutter (13164): #26     PointerRouter.route
 package:flutter/…/gestures/pointer_router.dart
E/flutter (13164): #27     GestureBinding.handleEvent
 package:flutter/…/gestures/binding.dart
E/flutter (13164): #28     GestureBinding.dispatchEvent
 package:flutter/…/gestures/binding.dart
E/flutter (13164): #29     RendererBinding.dispatchEvent
 package:flutter/…/rendering/binding.dart
E/flutter (13164): #30     GestureBinding._handlePointerEvent
 package:flutter/…/gestures/binding.dart
E/flutter (13164): #31     GestureBinding._flushPointerEventQueue
 package:flutter/…/gestures/binding.dart
E/flutter (13164): #32     GestureBinding._handlePointerDataPacket
 package:flutter/…/gestures/binding.dart
E/flutter (13164): #33     _rootRunUnary  (dart:async/zone.dart:1206:13)
E/flutter (13164): #34     _CustomZone.runUnary  (dart:async/zone.dart:1100:19)
E/flutter (13164): #35     _CustomZone.runUnaryGuarded  (dart:async/zone.dart:1005:7)
E/flutter (13164): #36     _invoke1  (dart:ui/hooks.dart:265:10)
E/flutter (13164): #37     _dispatchPointerDataPacket  (dart:ui/hooks.dart:174:5)
E/flutter (13164):

Flutter doctor
Click To Expand
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 1.22.0-12.1.pre, on Microsoft Windows [Version
    10.0.19042.541], locale en-GB)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[!] Android Studio (version 4.0)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.49.1)
[√] Connected device (4 available)

! Doctor found issues in 1 category.

Flutter dependencies
Click To Expand
Dart SDK 2.10.0-110.3.beta
Flutter SDK 1.22.0-12.1.pre
onesceneapp 1.0.0+1

dependencies:
- badges 1.1.1 [flutter]
- chat_pickers 0.2.2 [flutter http giphy_client shared_preferences material_design_icons_flutter emoji_picker flutter_hooks universal_io]
- cloud_firestore 0.14.0+2 [flutter meta quiver firebase_core firebase_core_platform_interface cloud_firestore_platform_interface cloud_firestore_web]
- cloud_firestore_platform_interface 2.0.1 [flutter meta collection firebase_core plugin_platform_interface]
- cloud_functions 0.6.0 [meta flutter firebase_core cloud_functions_platform_interface cloud_functions_web]
- confetti 0.5.4+1 [flutter random_color vector_math]
- core 0.0.1 [redux redux_logging bloom_filter intl uuid http encrypt key_value_store built_value built_collection quiver archive]
- cupertino_icons 0.1.3
- dotted_border 1.0.6 [flutter path_drawing]
- emoji_picker 0.1.0 [flutter shared_preferences]
- encrypt 4.0.2 [args asn1lib clock collection crypto pointycastle]
- equatable 1.2.4 [collection meta]
- firebase_analytics 6.0.0 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface]
- firebase_auth 0.18.0+1 [meta firebase_core firebase_core_platform_interface firebase_auth_platform_interface firebase_auth_web flutter]
- firebase_core 0.5.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
- firebase_remote_config 0.4.0 [flutter firebase_core]
- firebase_storage 4.0.0 [flutter firebase_core]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_image 3.0.0 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math]
- flutter_page_transition 0.1.6 [flutter]
- flutter_redux 0.6.0 [meta redux flutter]
- flutter_redux_navigation 0.6.0 [flutter redux]
- geolocation 1.1.2 [flutter streams_channel]
- google_sign_in 4.5.3 [google_sign_in_platform_interface flutter meta google_sign_in_web]
- googleapis 0.55.0 [_discoveryapis_commons http]
- googleapis_auth 0.2.12 [crypto http]
- great_circle_distance 1.0.1
- image 2.1.14 [archive xml]
- image_cropper 1.3.1 [flutter]
- image_picker 0.6.7+7 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- in_app_purchase 0.3.4+5 [async collection flutter json_annotation meta]
- intl 0.16.1 [path]
- intl_translation 0.17.10 [analyzer args dart_style intl path petitparser]
- logging 0.11.4
- mdi 3.0.0 [flutter]
- meta 1.3.0-nullsafety.2
- onescene_brand 1.0.0 [flutter core]
- package_info 0.4.3 [flutter]
- palette_generator 0.2.3 [flutter collection path]
- path_provider 1.6.14 [flutter path_provider_platform_interface path_provider_macos path_provider_linux]
- quiver 2.1.3 [matcher meta]
- redux 4.0.0+3
- redux_logging 0.4.0 [redux logging]
- reorderables 0.3.2 [flutter]
- uuid 2.2.2 [crypto convert]
- video_player 0.10.12+2 [meta video_player_platform_interface video_player_web flutter]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- _discoveryapis_commons 0.2.0 [http]
- analyzer 0.38.5 [args charcode collection convert crypto front_end glob html kernel meta package_config path pub_semver source_span watcher yaml]
- analyzer_plugin 0.2.1 [analyzer charcode dart_style html meta path pub_semver]
- archive 2.0.13 [crypto args path]
- args 1.6.0
- asn1lib 0.6.5
- async 2.5.0-nullsafety [collection]
- bloom_filter 0.3.0 [crypto fixnum collection]
- boolean_selector 2.1.0-nullsafety [source_span string_scanner]
- build 1.3.0 [analyzer async convert crypto logging meta path glob]
- build_config 0.4.2 [checked_yaml json_annotation meta path pubspec_parse yaml]
- built_collection 4.3.2 [collection quiver]
- built_value 6.8.2 [built_collection built_value_generator collection fixnum quiver]
- built_value_generator 6.8.2 [analyzer analyzer_plugin build build_config built_collection built_value source_gen quiver]
- characters 1.1.0-nullsafety.2
- charcode 1.2.0-nullsafety
- checked_yaml 1.0.2 [json_annotation source_span yaml]
- clock 1.1.0-nullsafety
- cloud_firestore_web 0.2.0+1 [flutter flutter_web_plugins firebase http_parser meta firebase_core cloud_firestore_platform_interface js]
- cloud_functions_platform_interface 2.0.0 [flutter meta firebase_core plugin_platform_interface]
- cloud_functions_web 2.0.0 [cloud_functions_platform_interface flutter flutter_web_plugins firebase http_parser meta]
- collection 1.15.0-nullsafety.2
- convert 2.1.1 [charcode typed_data]
- crypto 2.1.5 [collection convert typed_data]
- csslib 0.16.2 [source_span]
- dart_style 1.3.3 [analyzer args path source_span]
- fake_async 1.1.0-nullsafety [clock collection]
- file 5.2.1 [intl meta path]
- firebase 7.3.0 [http http_parser js]
- firebase_analytics_platform_interface 1.0.3 [flutter meta]
- firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta]
- firebase_auth_platform_interface 2.0.1 [flutter meta firebase_core plugin_platform_interface]
- firebase_auth_web 0.3.0+1 [flutter flutter_web_plugins firebase meta http_parser
intl firebase_core firebase_auth_platform_interface js]
- firebase_core_platform_interface 2.0.0 [flutter meta plugin_platform_interface quiver]
- firebase_core_web 0.2.0 [firebase firebase_core_platform_interface flutter flutter_web_plugins meta js]
- fixnum 0.10.11
- flutter_hooks 0.10.0 [flutter]
- flutter_plugin_android_lifecycle 1.0.8 [flutter]
- flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
- front_end 0.1.27 [kernel package_config meta]
- giphy_client 0.2.0 [meta http]
- glob 1.2.0 [async collection node_io path pedantic string_scanner]
- google_sign_in_platform_interface 1.1.2 [flutter meta quiver]
- google_sign_in_web 0.9.1+1 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
- html 0.14.0+3 [csslib source_span]
- http 0.12.2 [http_parser path pedantic]
- http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
- image_picker_platform_interface 1.1.0 [flutter meta http plugin_platform_interface]
- js 0.6.2
- json_annotation 3.0.1
- kernel 0.3.27 [args meta]
- key_value_store 1.0.0
- matcher 0.12.10-nullsafety [stack_trace]
- material_design_icons_flutter 4.0.5555 [flutter]
- node_interop 1.1.1 [js]
- node_io 1.1.1 [node_interop path]
- package_config 1.9.3 [path charcode]
- path 1.8.0-nullsafety
- path_drawing 0.4.1+1 [vector_math meta path_parsing flutter]
- path_parsing 0.1.4 [vector_math meta]
- path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 0.0.4+3 [flutter]
- path_provider_platform_interface 1.0.3 [flutter meta platform plugin_platform_interface]
- pedantic 1.9.0
- petitparser 3.0.4 [meta]
- platform 2.2.1
- plugin_platform_interface 1.0.2 [meta]
- pointycastle 1.0.2
- process 3.0.13 [file intl meta path platform]
- pub_semver 1.4.4 [collection]
- pubspec_parse 0.1.5 [checked_yaml json_annotation pub_semver yaml]
- random_color 1.0.5 [flutter]
- shared_preferences 0.5.10 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web]
- shared_preferences_linux 0.0.2+2 [file flutter meta path path_provider_linux shared_preferences_platform_interface]
- shared_preferences_macos 0.0.1+10 [shared_preferences_platform_interface flutter]- shared_preferences_platform_interface 1.0.4 [meta flutter]
- shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
- sky_engine 0.0.99
- source_gen 0.9.4+6 [analyzer async build dart_style glob meta path pedantic source_span]
- source_span 1.8.0-nullsafety [charcode collection path term_glyph]
- stack_trace 1.10.0-nullsafety [path]
- stream_channel 2.1.0-nullsafety [async]
- streams_channel 0.3.0 [flutter]
- string_scanner 1.1.0-nullsafety [charcode source_span]
- term_glyph 1.2.0-nullsafety
- test_api 0.2.19-nullsafety [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0-nullsafety.2 [collection]
- universal_io 1.0.1 [meta zone_local]
- vector_math 2.1.0-nullsafety.2
- video_player_platform_interface 2.1.1 [flutter meta]
- video_player_web 0.1.3+2 [flutter flutter_web_plugins meta video_player_platform_interface]
- watcher 0.9.7+15 [async path pedantic]
- xdg_directories 0.1.0 [path process flutter]
- xml 4.2.0 [collection convert meta petitparser]
- yaml 2.2.1 [charcode collection string_scanner source_span]
- zone_local 0.1.2

Firebase CLI
firebase -V
8.11.2

Node
node --version
v10.22.1

@jimmyff Do you any additional code samples to demonstrate how you are calling the functions that are causing the issue?
Ideally we could use a sample to recreate locally for investigation.

If you need me to try and create a standalone project highlighting the issue then I can, but it will take me some time to get it all setup.
I've included the relevant parts of the code below, I can confirm that auth state is updated (as an authenticated user) before the callable function is called.

   try {
      app = await Firebase.initializeApp(
        name: options.name,
        options: fbOptions,
      );
    } on FirebaseException catch (e) {
      log.warning('Caught Firebase Exception $e');
      if (e.code == 'duplicate-app') {
        app = Firebase.app(options.name);
      } else {
        rethrow;
      }
    }

...

    _auth = FirebaseAuth.instance;
    _auth.authStateChanges().listen((firebaseUser) {
      log.info('Auth state changed: $firebaseUser');
      _onAuthStateChanged(firebaseUser);
    });

...

  Future claimUid(String uid) async {
    log.fine('Claiming uid $uid');

    final callable = CloudFunctions.instance.getHttpsCallable(
      functionName: 'claim_uid',
    );
    final result = await callable.call({'uid': uid});
    log.info(result.data);
    log.fine('Done.');
  }

Thanks @jimmyff.
Sorry for the delay, i've been able to replicate the issue.
Could you try creating a brand new function and deploying, something like...
exports.example = functions.https.onCall((data, context) => {
  return ["Apple", "Banana", "Cherry", "Date", "Fig", "Grapes"];
});

And running the execution with somthing similar to ...
  Future<void> getFruit() async {
    final callable = CloudFunctions.instance.getHttpsCallable(
      functionName: 'claim_uid',
    );
    final results = await callable.call();
    List fruit =
        results.data; // ["Apple", "Banana", "Cherry", "Date", "Fig", "Grapes"]

    print('$fruit');
  }

If this works i'm inclined to say that your has something to with cloud permissions on the functions and may not be Flutter related? Also is this function to run manually outside of Flutter?

I had to make the function available to allUsers rather than just authentciatedUsers.
I have a feeling this is related to my issue #3922 -I wonder if I'm doing something wrong so my authentication status isn't being used when calling functions or calling firestore?

Hi @jimmyff
This seems to be one source as you mention, as confirmed https://github.com/FirebaseExtended/flutterfire/issues/3692#issuecomment-704981622 not an issue with cloud_functions itself,
Closing this in favor of https://github.com/FirebaseExtended/flutterfire/issues/3922


Bug Alt+] AZERTY(FR) keyboard

Hello,
Alt + ] or AltGr + ] not working in AZERTY(FR) keyboard please fix or help :'(.
Thanks ! ;)

Duplicate of atom/atom-keymap#35, please subscribe there for updates.


stake-pool: Add preferred deposit / withdraw validator accounts

Problem
Stake pools can be arbitraged by depositing to one validator and withdrawing from another.
Solution
Cover a lot of potential attack vectors, and allow the stake pool staker to restrict deposits and withdrawals to specific validators.  If the preferred deposit validator is set, all deposits must go through it.  If a preferred withdrawer is set, all withdrawals must go through it if it has any stake at all.  If it's empty, then normal rules apply.
cc @aeyakovenko

I don't think this is a good idea as the pool's intention may not be to allow users to arbitrarily "bankrupt" a single validator. It's also fairly complex from the perspective of users.
From the perspective of the stake pool manager, needing to respond whenever a particular validator's funds have been "bankrupted" and defaulting to the previous behaviour doesn't seem to solve any issue whatsover.
Further, once warp stake is implemented in stake program V2, this sort of workaround is pointless since in that case, a user can ask for withdrawals of stake directly to any stake account on an arbitrary validator of preference at the turn of the epoch.
Thus, I don't think one can solve the problem adequately, unless one resorts to the reserve model.

Here is the alternative extension of the current design which I think would solve these issues:
https://hackmd.io/@gPH8I-Z5RcSMH2KTXLDeDg/HyQ5TRJ5u

@jon-chuang Absolutely, the concept isn't to make the free-warp attack impossible, but rather to make it much more expensive to carry it out.  If the pool doesn't want to "bankrupt" a validator account, then they likely would not want to use this feature.

It's also fairly complex from the perspective of users.

I'm not sure I understand what you mean about this.

From the perspective of the stake pool manager, needing to respond whenever a particular validator's funds have been "bankrupted", and failing that, defaulting to the previous behaviour, with attendant security issues, doesn't seem to solve anything.

The pool manager should be rebalancing every epoch, so even if a validator is bankrupt one epoch, it should get refilled soon after.  And if the preferred deposit accout is the same as the withdraw, then the account will get refilled at the start of the attack, rendering it impossible.  Remember, to carry out the attack, you need to deposit in one place and withdraw from another.  If those places are the same, then it's impossible.  The only possibility is if you already have stake in the pool and have enough to deplete the preferred withdraw account.

Further, once warp stake is implemented in stake program V2, this sort of workaround is pointless since in that case, a user can ask for withdrawals of stake directly to any stake account on an arbitrary validator of preference at the turn of the epoch.

The warp stake instruction will work differently, since it will take the previous validator into account when figuring out your rewards.  With the stake pool attack we've been discussing, you would instantly get normal active stake on another validator, bypassing any potential slashing events.

A program that respects epoch boundaries is what's needed here.

Heck yeah, absolutely :smile:

Hey Jon thanks again for the detailed replies.
Some thoughts:
If this direction is to be pursued, one idea could be to have a pool parameter single_validator_withdrawal_limit, which sets the percentage withdrawal/deposit limit from a single Validator before cycling to the next Validator, and thereafter proceeding in round-robin fashion. If funds are added, it goes the opposite direction.
For instance, if we set the value to be 10, then if Validator A has has had 999 out of initial 10,000 SOL withdrawn, a new withdrawal of 10 SOL would withdraw 1 SOL from A, and 9 SOL from B.
At the very least, this keeps the allocation fairly balanced, and limits the degree a single delegator can "skew" stake.
So in addition to the idea of this PR, one also has an automatic "round robin" behaviour and a deposit/withdrawal limit to each Validator.
I could probably live with that, except for the "manual" part of the picture where the user has to do this staking, activating, and depositing themselves.
The other downside is that a user would hardly have stake that's already happened to have activated in the right Validator at the right time...
To facilitate manager reshuffling, a pool can also designate an allocator authority, which can circumvent the above round robin and limits.

@jon-chuang Hm, that's an interesting idea, and would solve some of the balancing issues.  This all assumes that a stake pool wants even distribution between validators, of course.
Let's keep in mind that the usability for the deposit side of this would extremely tricky -- remember that people need to warm up stake to a validator in order to deposit it.  With a model like this, to safely deposit, they would need to create total_deposited_stake / single_validator_churn_limit stake accounts, respecting the order of validators.  And if there are a lot of validators, they just need to hope that deposits are constantly happening so that "their turn" can come up to deposit, and that no one else is trying to deposit.
From the withdraw side, it'll be much more workable.  If multiple people are trying to withdraw at the same time, they may just see a bunch of failures, ie. you and me both try to withdraw from the "current validator", one of us fails and has to try again on the next one.

Yeah. I was thinking it could be good just for the withdrawal side. Maybe for the deposit side, you could set a limit for how much can be deposited to one Validator that deviates from the desired distribution. And you could have the same thing for withdrawal.

This all assumes that a stake pool wants even distribution between validators, of course.

This is not quite correct. If you read carefully, I suggest that the limit is in terms of the percentage of the current amount staked in that Validator. So it proportionally increments or decrements the values in a round robin fashion, based on the initial distribution (say at the epoch boundary, when the manager redistributes).

Ah fair enough, proof that I did not read carefully :smile:

Haha no worries, fastest way to get the right answer is to tentatively state the wrong one 😇


Warn about "doing it wrong" / WP 4.9.6

WP 4.9.6 came out last week, but the auto-update has been left off because of WSOD caused by a number of plugins hooking into the new privacy functions from the wrong (non-admin) context - see https://core.trac.wordpress.org/ticket/44142
While by far not all "doing it wrong" situations will be sniffable, I imagine there will be some which are, so I'm opening this ticket to try and collect examples of code which is "doing it wrong".
Based on the examples received we can then decide what can reliably be sniffed.

Marking this issue with "Help wanted" as we need code samples of things this sniff should detect.


name 'MultivariateSample' is not defined before use

When running the block of code:
if __name__ == '__main__':
    subscription_key = ""
    anomaly_detector_endpoint = ""

    # Create a new sample and client
    sample = MultivariateSample(subscription_key, anomaly_detector_endpoint, data_source=None)

    # Train a new model
    model_id = sample.train(datetime(2021, 1, 1, 0, 0, 0), datetime(2021, 1, 2, 12, 0, 0))

    # Reference
    result = sample.detect(model_id, datetime(2021, 1, 2, 12, 0, 0), datetime(2021, 1, 3, 0, 0, 0))
    print("Result ID:\t", result.result_id)
    print("Result summary:\t", result.summary)
    print("Result length:\t", len(result.results))

    # Export model
    sample.export_model(model_id, "model.zip")

    # Delete model
#     sample.delete_model(model_id)

We get the error:
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-10-ee96743489cf> in <module>
      4
      5     # Create a new sample and client
----> 6     sample = MultivariateSample(subscription_key, anomaly_detector_endpoint, data_source=None)
      7
      8     # Train a new model

NameError: name 'MultivariateSample' is not defined

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5fa9db9e-bc31-35e6-a243-107276a37a5e
Version Independent ID: 3ffb903f-6d42-6411-0478-2fab35e1f2df
Content: Quickstart: Anomaly detection using the Anomaly Detector client library for multivariate anomaly detection - Azure Cognitive Services
Content Source: articles/cognitive-services/Anomaly-Detector/quickstarts/client-libraries-multivariate.md
Service: cognitive-services
Sub-service: anomaly-detector
GitHub Login: @mrbullwinkle
Microsoft Alias: mbullwin

I added all this in a class MultivariateSample and it is going through.

Right now one error I am facing:
Datetime with no tzinfo will be considered UTC.
Datetime with no tzinfo will be considered UTC.
5 available models before training.
Training new model...
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-26-ee96743489cf> in <module>
      7
      8     # Train a new model
----> 9     model_id = sample.train(datetime(2021, 1, 1, 0, 0, 0), datetime(2021, 1, 2, 12, 0, 0))
     10
     11     # Reference

<ipython-input-25-f45cde38e1c6> in train(self, start_time, end_time, max_tryout)
     37         tryout_count = 0
     38         while (tryout_count < max_tryout and model_status != "READY"):
---> 39             model_status = self.ad_client.get_multivariate_model(trained_model_id).additional_properties["summary"][
     40                 "status"]
     41             tryout_count += 1

KeyError: 'summary'

@anirbansaha96 Thanks for the question. We are investigating the issue and will update you shortly.

I tried running the above code for my data-source and also facing the same error:
Here is the code I ran:
class MultivariateSample():
def __init__(self, subscription_key, anomaly_detector_endpoint, data_source=None):
    self.sub_key = subscription_key
    self.end_point = anomaly_detector_endpoint

    # Create an Anomaly Detector client

    # <client>
    self.ad_client = AnomalyDetectorClient(AzureKeyCredential(self.sub_key), self.end_point)
    # </client>

    if not data_source:
        # Datasource needs to be a url to a zip file stored in Azure Blob storage and accessible via shared access storage SAS.
        # Zip file should contain csv files of time series data for each variable with one column for timestamp, and one for value.
        self.data_source = "my-data-source"
    else:
        self.data_source = data_source

def train(self, start_time, end_time, max_tryout=500):

    # Number of models available now
    model_list = list(self.ad_client.list_multivariate_model(skip=0, top=10000))
    print("{:d} available models before training.".format(len(model_list)))

    # Use sample data to train the model
    print("Training new model...")
    data_feed = ModelInfo(start_time=start_time, end_time=end_time, source=self.data_source)
    response_header = \
    self.ad_client.train_multivariate_model(data_feed, cls=lambda *args: [args[i] for i in range(len(args))])[-1]
    trained_model_id = response_header['Location'].split("/")[-1]

    # Model list after training
    new_model_list = list(self.ad_client.list_multivariate_model(skip=0, top=10000))

    # Wait until the model is ready. It usually takes several minutes
    model_status = None
    tryout_count = 0
    while (tryout_count < max_tryout and model_status != "READY"):
        model_status = self.ad_client.get_multivariate_model(trained_model_id).additional_properties["summary"][
            "status"]
        tryout_count += 1
        time.sleep(2)

    assert model_status == "READY"

    print("Done.", "\n--------------------")
    print("{:d} available models after training.".format(len(new_model_list)))

    # Return the latest model id
    return trained_model_id

def detect(self, model_id, start_time, end_time, max_tryout=500):

    # Detect anomaly in the same data source (but a different interval)
    try:
        detection_req = DetectionRequest(source=self.data_source, start_time=start_time, end_time=end_time)
        response_header = self.ad_client.detect_anomaly(model_id, detection_req,
                                                        cls=lambda *args: [args[i] for i in range(len(args))])[-1]
        result_id = response_header['Location'].split("/")[-1]

        # Get results (may need a few seconds)
        r = self.ad_client.get_detection_result(result_id)
        tryout_count = 0
        while r.summary.status != "READY" and tryout_count < max_tryout:
            time.sleep(1)
            r = self.ad_client.get_detection_result(result_id)
            tryout_count += 1

        if r.summary.status != "READY":
            print("Request timeout after %d tryouts.".format(max_tryout))
            return None

    except HttpResponseError as e:
        print('Error code: {}'.format(e.error.code), 'Error message: {}'.format(e.error.message))
    except Exception as e:
        raise e

    return r

def export_model(self, model_id, model_path="model.zip"):

    # Export the model
    model_stream_generator = self.ad_client.export_model(model_id)
    with open(model_path, "wb") as f_obj:
        while True:
            try:
                f_obj.write(next(model_stream_generator))
            except StopIteration:
                break
            except Exception as e:
                raise e

#def delete_model(self, model_id):

    # Delete the mdoel
 #   self.ad_client.delete_multivariate_model(model_id)
  #  model_list_after_delete = list(self.ad_client.list_multivariate_model(skip=0, top=10000))
   # print("{:d} available models after deletion.".format(len(model_list_after_delete)))

if name == 'main':
subscription_key = "my_key"
anomaly_detector_endpoint = "my_endpoint"
# Create a new sample and client
sample = MultivariateSample(subscription_key, anomaly_detector_endpoint, data_source=None)

# Train a new model 2020-05-28T12:37:00Z
model_id = sample.train(datetime(2020, 5, 28, 12, 37, 0), datetime(2020, 5, 31, 23, 59, 0))

# Reference 2020-05-31T12:37:00Z
result = sample.detect(model_id, datetime(2020, 5, 31, 12, 37, 0), datetime(2020, 5, 31, 23, 59, 0))
print("Result ID:\t", result.result_id)
print("Result summary:\t", result.summary)
print("Result length:\t", len(result.results))

# Export model
sample.export_model(model_id, "model.zip")

# Delete model

sample.delete_model(model_id)
Below is the same error I encountered:
KeyError                                  Traceback (most recent call last)
 in
7
8     # Train a new model
----> 9     model_id = sample.train(datetime(2020, 5, 28, 12, 37, 0), datetime(2020, 5, 31, 23, 59, 0))
10
11     # Reference 2020-05-31T12:37:00Z
 in train(self, start_time, end_time, max_tryout)
38         tryout_count = 0
39         while (tryout_count < max_tryout and model_status != "READY"):
---> 40             model_status = self.ad_client.get_multivariate_model(trained_model_id).additional_properties["summary"][
41                 "status"]
42             tryout_count += 1
KeyError: 'summary'

adding @DavidZeLiang on the engineering team for any recommendations on troubleshooting this error with the sample code.

Hello, @SajalSood43 . The problem is because of the change of the response format recently. To solve that issue, you can change the line with error to model_status = self.ad_client.get_multivariate_model(trained_model_id).model_info.status. I will fix it in the sample code asap too. Sorry for the inconvenience.

Thank you, Its working now.

Thank you, I am closing the issue since it is resolved. Thank you @SajalSood43 for testing it out @DavidZeLiang for the solution.


Preprocess and cache cv splits

New GreenGuardPipeline with intermediate outputs caching to speed up the cross validation and tuning process.

Codecov Report

Merging #22 into master will increase coverage by 0.38%.
The diff coverage is 32.35%.

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
+ Coverage   18.95%   19.33%   +0.38%
==========================================
  Files           6        7       +1
  Lines         459      481      +22
==========================================
+ Hits           87       93       +6
- Misses        372      388      +16

Impacted Files
Coverage Δ

greenguard/pipeline.py
36.15% <29.68%> (-2.21%)
:arrow_down:

greenguard/metrics.py
75% <75%> (ø)

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 b5f8c23...43c4011. Read the comment docs.


Feature/chart one

WIP branch to display bar charts. Pie charts and charts that display medians will need different handling.
Not convinced that the workflow of raw data -> ACSAggregate -> nvd3 series transformation is the easiest way to go about this, open to other suggestions on how to clean this up without taking a ton of extra time on the task.

It might be nice to have a transformation step from tract arrays (data for a specific tract) into tract objects, where the variables are named and stored as properties of the object. This might make the code further down the line easier to follow.
+1

Can you think of a case where we would want the data in the format in which it comes back from the API? If not, I can add the transformation you suggest to the transformResponse of the ACS API call.

No, I don't think there is a good reason we want the response in the "header-row, data-rows" format. The reason they cite for outputting in this format as opposed to objects with properties is that it is supposed to parse faster, but don't think that is actually a problem.

Agree. I'll swap to the suggested format then, and rework the current charts to use it before merging.

Updated, and fixed the bug where the chart in the household tab wouldn't draw properly when its drawn while the tab is hidden.
There could be some more significant refactoring done here in the TabControllers and the getACSRequest transforms, but I'm going to defer those in the interest of time, since they're not critical ATM.


How to identify Cluster Heath status?

Hi Guys,
I know currently this item, in your Dev plan. for time being any tool or any admin API available?

sort of. visit http://your-master-node:9333/


cRASHI NG ingame with a custom song + chart.

Describe your bug here.
whenever i press notes, it sometimes crashes right away, and sometimes in the middle of the song.
Command Prompt/Terminal logs (if existing)
Failed to update resources

Steps to Reproduce (if existing)
I dont know
Are you modding a build from source or with Scripts?
Source
What is your build target?
Windows
Did you edit anything in this build? If so, mention or summarize your changes.
Nothing in the source.

check if psych events are present on the chart by any means, they can crash the game due to how the current WIP event system functions

fixed a while ago

oh ig im using an older version of feu then
ill try installing the latest version and playing the song

also just saying, where it says that we can join ur discord, it doesnt redirect to a server.

fixed a while ago

oh ig im using an older version of feu then ill try installing the latest version and playing the song

Okay now im crashing in every single song in the newest version what

also just saying, where it says that we can join ur discord, it doesnt redirect to a server.

it's not a discord server, it's just my profile

does your chart file contains an "events" label?

temporarily closing this due to inactivity


Update STM32H7 targets

I rebuilt the STM32H7 targets with the latest target-gen, including a modification to sort Flash blocks. I then removed the algorithms for writing to external flash and checked that the RAM and flash addresses and lengths are correct for each STM32 based on its part number. In the process I changed all the addresses to hex to make it easier to check manually.
Compared to what was here previously, I've also removed the stm32h7xx_mt25tl01g and stm32h7xx_mt25tl01g_dual algorithms; I don't think they should have been included in the first place as they're used for programming off-chip MT25TL01 memories.
I'm fairly confident all these STM32H7 entries now:

Have correct flash start and end addresses for their entire onboard flash memory
Have suitable RAM start and end addresses for at least loading flash algorithms into RAM

However they do not have all the system RAM available since it is not contiguous. Each target now uses the AXI SRAM block, but there's also the AHB SRAM and the DTCM SRAM (and the backup SRAM too), which are at different addresses. I don't think the current target spec has any way to encode this, though.
PR for target-gen coming soon to enable flash sorting. This PR should replace #299.

Do you want to regenerate those with the fix you made after that merges flashes?

These ones already include that fix.

Ohhh, sorry, I didn't understand, thank you very much :)


Type hint additions

Description:
Bunch of type additions again. This time goal is towards making it possible to use follow_imports = error for mypy for improved checking and dmypy goodness. Not quite there yet though.
Checklist:

[ ] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
[ ] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
[ ] Untested files have been added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

This needs a rebase after device automation refactor.


Fix #8105

Fix for https://github.com/vuejs/core/issues/8105

It also fixes https://github.com/nuxt/nuxt/issues/13350 btw

I'm sorry, I've found that the 1st patch was wrong. (sometimes didn't work)
This time, make the anchor selection step robust. It works perfectly, so far.
The last patch could be PoC, but it surely means the bug exists nearby.
Noticeable point is, unmount and move could trigger remove operation multiple time internally via hooks.
The anchor selection used here was not robust for this situation.

Thanks for the PR. The mentioned issue has been fixed by https://github.com/vuejs/core/pull/9309 and was shipped in 3.3.10.
So I'm closing this PR.


Strange error

Terminal Log I see this:
Error: The hook `grunt` is taking too long to load.
Make sure it is triggering its `initialize()` callback, or else set `sails.config.grunt._hookTimeout to a higher value (currently 60000)
    at Timeout.tooLong [as _onTimeout] (/app/node_modules/sails/lib/app/private/loadHooks.js:85:21)
    at ontimeout (timers.js:386:11)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
/app/node_modules/sails-mysql/lib/adapter.js:58
      if (evName === 'error') { throw data; }
                                ^

AdapterError: Invalid connection name specified
    at getConnectionObject (/app/node_modules/sails-mysql/lib/adapter.js:1211:35)
    at spawnConnection (/app/node_modules/sails-mysql/lib/adapter.js:1126:7)
    at Object.update (/app/node_modules/sails-mysql/lib/adapter.js:958:16)
    at update (/app/node_modules/waterline/lib/waterline/adapter/dql.js:239:13)
    at child.updateRecords (/app/node_modules/waterline/lib/waterline/query/dql/update.js:208:16)
    at /app/node_modules/waterline/lib/waterline/query/dql/update.js:58:21
    at /app/node_modules/waterline/node_modules/async/lib/async.js:726:13
    at /app/node_modules/waterline/node_modules/async/lib/async.js:52:16
    at /app/node_modules/waterline/node_modules/async/lib/async.js:269:32
    at /app/node_modules/waterline/node_modules/async/lib/async.js:44:16
    at /app/node_modules/waterline/node_modules/async/lib/async.js:723:17
    at /app/node_modules/waterline/node_modules/async/lib/async.js:167:37
    at /app/node_modules/waterline/node_modules/async/lib/async.js:52:16
    at /app/node_modules/waterline/node_modules/async/lib/async.js:269:32
    at /app/node_modules/waterline/node_modules/async/lib/async.js:44:16
    at child.<anonymous> (/app/node_modules/waterline/lib/waterline/utils/schema.js:152:44)
    at fn (/app/node_modules/waterline/lib/waterline/utils/callbacksRunner.js:79:10)
    at /app/node_modules/waterline/node_modules/async/lib/async.js:181:20
    at iterate (/app/node_modules/waterline/node_modules/async/lib/async.js:262:13)
    at Object.async.forEachOfSeries.async.eachOfSeries (/app/node_modules/waterline/node_modules/async/lib/async.js:281:9)
    at Object.async.forEachSeries.async.eachSeries (/app/node_modules/waterline/node_modules/async/lib/async.js:214:22)
    at Object.runner.beforeUpdate (/app/node_modules/waterline/lib/waterline/utils/callbacksRunner.js:82:9)
    at /app/node_modules/waterline/lib/waterline/query/dql/update.js:175:17
    at /app/node_modules/waterline/node_modules/async/lib/async.js:718:13
    at iterate (/app/node_modules/waterline/node_modules/async/lib/async.js:262:13)
    at /app/node_modules/waterline/node_modules/async/lib/async.js:274:29
    at /app/node_modules/waterline/node_modules/async/lib/async.js:44:16
    at /app/node_modules/waterline/node_modules/async/lib/async.js:723:17
    at /app/node_modules/waterline/node_modules/async/lib/async.js:167:37
    at /app/node_modules/sails-hook-validation/lib/validate.js:45:21
    at /app/node_modules/waterline/lib/waterline/query/validate.js:80:7
    at /app/node_modules/waterline/node_modules/async/lib/async.js:726:13
    at /app/node_modules/waterline/node_modules/async/lib/async.js:52:16
at /app/node_modules/waterline/node_modules/async/lib/async.js:269:32

Not sure what is going on, only recently did I add a liveness probe to the app with these details:
livenessProbe:
failureThreshold: 3
httpGet:
path: /#!/login
port: 1337
scheme: HTTPS
initialDelaySeconds: 300
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 5
Supposedly this should hit the login page after waiting 300 seconds on konga to launch and every 30 seconds it makes sure that login page works with 10 second timeout delay on the page load..
EDIT, i may have to rethink how i probe to make sure konga is up, my container has restarted 600 times the last 2 days so i think the liveness probe and konga do not play nice. Might just remove liveness probe all together.

@jeremyjpj0916 , try setting env var  KONGA_HOOK_TIMEOUT to something like 120000.
In some cases the gulp tasks take too long to load. This has to do with the server performance as well.

Done and the issue is not revealing itself any longer, if anyone wants a helpful hint for a liveness probe against konga that will work I altered to this now and it seems fine:
livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 1337
              scheme: HTTP
            initialDelaySeconds: 300
            periodSeconds: 30
            successThreshold: 1
timeoutSeconds: 5


No visual mode when booting an android4.4 image

Hi,
I tried preparing an Android x86 image following the instructions for windows. I use the iso from here: http://sourceforge.net/projects/android-x86/files/Release 4.4/android-x86-4.4-RC2.iso/download
While the vm boots in visual mode using virt-manager, when I start it from rancher-vm the vm/container starts in console mode immediately after grub is done.

@sheng-liang I would guess there is no framebuffer defined in qemu.

Since Android x86 does not support virtio drivers, you cannot use Windows image instructions. I have created a new image/android-x86 directory that containers Dockerfile, Makefile, and instructions. I was able to get Android x86 VMs created.


opae-sdk: add product name or pcie card name  to fpgainfo

Fpgainfo tool prints product name using Device ID and Sub System Device id
Vendor ID    Device ID   SubVendorID      SubDevice ID         Product Name
0x8086	     0xbcce      0x8086           0x17d4               Intel Acceleration Development Platform C6100
0x8086	     0xbcce      0x8086           0x1770               Intel Acceleration Development Platform N6000
0x8086	     0xbcce      0x8086           0x1771               Intel Acceleration Development Platform N6001
0x1c2c	     0x1000      0x1c2c           0x0                  Silicom FPGA SmartNIC N5010 Series
0x1c2c	     0x1000      0x1c2c           0x0                  Silicom FPGA SmartNIC N5010 Series
0x8086	     0x09c5      0x8086           0x0                  Intel Programmable Acceleration Card with Intel Arria® 10 GX FPGA
0x8086	     0x09c5      0x8086           0x0                  Intel FPGA Programmable Acceleration Card N3000
0x8086	     0x0b2b      0x8086           0x0                  Intel FPGA Programmable Acceleration Card D5005
Signed-off-by: anandaravuri<EMAIL_ADDRESS>

Coverage decreased (-0.02%) to 65.362% when pulling<PHONE_NUMBER>3f5aa21d9e3c92aa72475821fb8333 on aravuri/fpgainfo_product_name into bfd82d8cd49943be87bf85e0d4224cfdcd78597a on master.