Add Card in Front and remove after down

Dear, congrats for your beautiful work! i have a question, is it possible to add new card in front of the current one and not on the bottom?
another question, is it possibile do have a func do delete a card after down effect? something like
func cardDidChangeState(cardIndex: Int) {
        removeFromStack(cardIndex)
}

thanks!

Up

Hi

to show new card as first in top stack you should make newCardShouldAppearOnTheBottom = false in layout (property is available in version 0.3.0, published today)

to hide cards in bottom stack you can put
layout.bottomStackMaximumSize = 0
layout.bottomStackCardHeight = 0
It is workaround, as there are no such functionality as remove cards. probably we will provide it in future


fix: remove overlap in deserialization of incoming responses

This PR fixes Client requests not working, because they were being parsed as ServerRequest::Invalid. This overlap between ServerRequest::Invalid and Response has now been removed.

So, it seems that while this fixes the specific serde error described, it actually breaks some intentional behavior defined by the JSON-RPC 2.0 spec, namely:

Responding with status code -32600 (invalid request) to invalid requests missing a "method" and/or "id", e.g. {"jsonrpc":"2.0","params":{}}. Instead, we return -32700 (parse error), which is incorrect according to the spec.
Not responding to notifications lacking a "method" or other fields, e.g. {"jsonrpc":"2.0"}. Instead, we return -32700 (parse error).

As such, I don't think that this PR is actually viable as a fix. :disappointed: However, it seems that there exists an even simpler solution that preserves the above invariants, as seen in #269, if you're curious.
Nonetheless, thanks for identifying the problem and for the contribution, @lucacasonato! Sorry again for the slow response.


psycopg2.errors.UniqueViolation duplicate key value violates unique constraint

Hey guys,
might be related to #10579.

git: 2b95f54593a2d226c25b0a24a4b85a44399c24de (2.1.4)
two realms
account zulip.zerver_userprofile.email are all like<EMAIL_ADDRESS>
When inviting a new user via email clicking the registration url results in http 500 internal server error. As I delegated admin control to non-tech guys I'm unaware what might have happened.
What I see from the database (zerver_userprofile) is that there is one email address (delivery_email) available in both realms, with id being empty (see stack below) in one of the realms (id 2).
delete from zulip.zerver_userprofile where id = 123;

fails with
ERROR:  update or delete on table "zerver_userprofile" violates foreign key constraint "zerver_useractivity_user_profile_id_3f3c3ea8_fk_zerver_us" on table "zerver_useractivity"
DETAIL:  Key (id)=(123) is still referenced from table "zerver_useractivity".

I'm interested in two things:

You understand the error and can fix its origins.
I can invite people to the zulip instance again.

Any help greatly appreciated!
Logs from clicking a registration url:
==> errors.log <==
2020-07-13 15:08:16.577 ERR  pid:7320 [django.request] Internal Server Error: /accounts/register/
Traceback (most recent call last):
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "./zerver/lib/db.py", line 31, in execute
    return wrapper_execute(self, super().execute, query, vars)
  File "./zerver/lib/db.py", line 18, in wrapper_execute
    return action(sql, params)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "zerver_userprofile_realm_id_email_13360e45_uniq"
DETAIL:  Key (realm_id, email)=(2, ) already exists.

Traceback (most recent call last):
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "./zerver/decorator.py", line 133, in wrapper
    return func(request, *args, **kwargs)
  File "./zerver/views/registration.py", line 332, in accounts_register
    realm_creation=realm_creation)
  File "./zerver/lib/actions.py", line 522, in do_create_user
    source_profile=source_profile)
  File "./zerver/lib/create_user.py", line 115, in create_user
    user_profile.save()
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/contrib/auth/base_user.py", line 80, in save
    super(AbstractBaseUser, self).save(*args, **kwargs)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/base.py", line 808, in save
    force_update=force_update, update_fields=update_fields)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/base.py", line 838, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/base.py", line 924, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/base.py", line 963, in _do_insert
    using=using, raw=raw)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/query.py", line 1079, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1112, in execute_sql
    cursor.execute(sql, params)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/srv/zulip-venv-cache/6176a52fab8737c09656fc8ad0352547e9801c07/zulip-py3-venv/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "./zerver/lib/db.py", line 31, in execute
    return wrapper_execute(self, super().execute, query, vars)
  File "./zerver/lib/db.py", line 18, in wrapper_execute
    return action(sql, params)
django.db.utils.IntegrityError: duplicate key value violates unique constraint "zerver_userprofile_realm_id_email_13360e45_uniq"
DETAIL:  Key (realm_id, email)=(2, ) already exists.

Thanks for the report!
I'd recommend using ./manage.py shell for trying to delete objects; that will properly CASCADE deletions allowing you to do whatever you're trying to do.  That said, see https://github.com/zulip/zulip/issues/10533 for how to delete a user object correctly.

But bug here is in part a missing index, though I'm sure there must be some other issue that made it possible to create this semi-duplicate user in the first place.  In any case our solution will start with adding the missing index.

First of all: Thanks a lot @timabbott, great support, as usual!
For reference. I had trouble following the manage.py shell user deletion process referenced in #10533.
Wrong:
ssh zulip
sudo -u zulip -i
# note: manage.py is sym-linked to /home/zulip/deployments/current/manage.py
./bin/manage.py shell

UserProfile was not imported in IPython shell, probably because there was no readlink to derive the real directory of manage.py, or something.
Correct was:
ssh zulip
sudo -u zulip -i
/home/zulip/deployments/current/manage.py shell

That's correct -- I often make the mistake in this issue tracker of assuming readers are familiar with how to run management commands.  I should probably make a saved reply for it.


SQL connection remains active on the server

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.

Example Code
from langchain.sql_database import SQLDatabase
from langchain_experimental.sql import SQLDatabaseChain
from langchain.chat_models import AzureChatOpenAI

DB = SQLDatabase.from_uri(SQLCONNECTION, schema=SQLSCHEMA, include_tables=[SQL_TBL1, SQL_TBL2])

LLM = AzureChatOpenAI(model=OPENAI_MODEL_NAME, temperature=0, openai_api_key=OPENAI_API_KEY,
                      openai_api_version=OPENAI_DEPLOYMENT_VERSION, azure_endpoint=OPENAI_DEPLOYMENT_ENDPOINT,
                      deployment_name=OPENAI_DEPLOYMENT_NAME)

db_chain = SQLDatabaseChain(llm=LLM, database=DB, verbose=True)

db_chain.run(USERQUESTION)

Error Message and Stack Trace (if applicable)
N/A
Description
Each time a question is asked, the SQL query is created and remains pending on the server even after the answer is returned to the user. The SQL query is only discarded after killing the console where the script runs.
System Info
langchain==0.1.7
langchain-experimental==0.0.51
Windows 11 Pro
Python 3.11.4

Hi @keenborder786 !
SQLCONNECTION= "mssql+pyodbc://USER:PASSWORD@SERVER:1433/DATABASENAME?&driver=ODBC+Driver+18+for+SQL+Server&Encrypt=yes&TrustServerCertificate=yes&Authentication=SqlPassword"
SQLAlchemy==2.0.27
Thanks!

any update?


[Merge] micropthalmia, Lenz type

Mondo term (ID and Label)
MONDO:0018924 / microphthalmia, Lenz type
MONDO:0010671/microphthalmia, syndromic 1
MONDO:0010261/microphthalmia, syndromic 2
MONDO:0100124/NAA10-related syndrome
Reason for review  (I think there is a merge in here somewhere, or maybe just revision of relationships)
Orphanet uses microphthalmia, Lenz type and provides the pointers to MCOPS1 and MCOPS2 in OMIM (https://www.orpha.net/consor/cgi-bin/OC_Exp.php?lng=EN&Expert=568), suggesting that Lenz type is defined by X-linked inhertance, to which NAA10 (type 1) and BCOR (type 2) contribute.  If that is the case, Lenz should not be a child of NAA10-related syndrome; only MCOPS1 should be and MONDO:0010261 should be sibling of MONDO:0010671
I am not sure of the distinction between MONDO:0100124/NAA10-related syndrome and MONDO:0010671/microphthalmia, syndromic 1, given that both are based on NAA10.  Are they just different labels for the same syndrome?

Hello @maglott
I'm Sabrina, a new curator who recently joined the Mondo team.
We will address your issue as soon as possible. Thank you for your patience.
If this is a high priority, please let me know and we can prioritize it. Thank you!

I am not sure of the distinction between MONDO:0100124/NAA10-related syndrome and MONDO:0010671/microphthalmia, syndromic 1, given that both are based on NAA10. Are they just different labels for the same syndrome?

MONDO:0100124 NAA10-related syndrome is a grouping class that clingen requested.
@sabrinatoro and I addressed your other comments above, thanks for reporting this.


The raw HTML for the /cloud endpoint is visible

The raw HTML for the openbci-xxxx.local/cloud endpoint is visible for 1s instead of rendering the page.

can you please provide a picture of what HTML you are seeing?


xFirewall throws error when correcting Profile changes

Hi,
On windows2k12/WMF5.0 I found an issue.
When I create a firewall rule with DSC and later on change the profile settings xFirewall throws an error:
Parameter set cannot be resolved using the specified named parameters.
+ CategoryInfo          : InvalidArgument: (:) [], CimException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Set-NetFirewallRule
+ PSComputerName        : localhost
Original resource setting:
xFirewall AllowRDP
{
Name = 'Remote Desktop Admin Connections'
DisplayName = 'Remote Desktop Admin Connections'
Group = "DSC - Remote Desktop"
Ensure = 'Present'
Enabled = 'True'
Action = 'Allow'
Profile = 'Domain', 'Private', 'Public'
}
Changed resource settings:
xFirewall AllowRDP
{
Name = 'Remote Desktop Admin Connections'
DisplayName = 'Remote Desktop Admin Connections'
Group = "DSC - Remote Desktop"
Ensure = 'Present'
Enabled = 'True'
Action = 'Allow'
Profile = 'Domain', 'Private'
}
This error also occurs when changing profile settings by GUI and letting DSC correct it.
Greetings,
Ramon.

Hi @RamonPalmieri - thanks for reporting this. I actually think this is actually the same cause as this issue: https://github.com/PowerShell/xNetworking/issues/130
We haven't come up with a perfect solution to this problem yet. However, if you remove the Group parameter from your xFirewall configuration they should work fine.

I removed the Group parameter and it works fine!
Thanks.

Wouldn't it work if you just removed "group" like that https://github.com/Byte-666/xNetworking/commit/dbd598e3094b87e3aba6e7e96dd0626be43b3f1b ?

@Byte-666 - Unfortunately I don't think so. Because in this case the error is actually occurring in a different part of the code. Specifically this line: https://github.com/Byte-666/xNetworking/commit/dbd598e3094b87e3aba6e7e96dd0626be43b3f1b#diff-7cd1710b844d68d1e0e70b8edd3736d3R451
It is the call to Set-NetFirewallRule that causes the problem in this case. The problem is that the Set-NetFirewallRule cmdlet only supports the Group parameter as an identifier for the rule(s) that needs to be changed. But in our case we want to update the Group value for the rules matching the Name parameter.
I raised this as a UserVoice issue some time ago, but I doubt it's a high priority one.


Incorrectly parsed label

BL addition

Is parsed as {'label': 'BL', 'mnemonic': 'add'} because it recognizes addition as add instruction

Fixed in 2f37998840e9c03ef4bd090d02daa6d31c69f6d2


Default parameter specifiers

Perhaps this is my own confusion but I downloaded the project and attempted to compile it only to be confronted with slew of "Default Parameter Specifiers are not permitted" errors. According to the Svg.csproj file the project is created in the almost same version of Visual Studio as I am using and is a .NET 3.5 project:
    <ProductVersion>9.0.30729</ProductVersion>
    ...
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

But according to a quick google search optional/default parameters weren't added until .NET 4.0.  Am I doing something wrong or missing something?

I created #309 which solves this issue

@tebjan - do you want to support Visual Studio 2008?
@Fr33dan - is this still an issue for you?

@Fr33dan - given that you newest PR now uses default parameters, I guess that this is not an issue anymore. I think that we can skip support for VS 2008 - closing.


Proxy authorization fixes

Proxy authorization fixes for #171 and #172.

corrected in scrapoxy 4.0.0
however, thanks for you contribution!


Secretstore issue : cannot find secrets bound to service account

When creating secretstore with vault as source and kuberntes as a auth provider the secretstore is not working at all giving error.
cannot find secrets bound to service account: internal-app
the serviceaccount is not the point as diff serviceaccount uses does not change the outcome.
error from secret store
Events:
  Type     Reason                 Age                   From          Message
  ----     ------                 ----                  ----          -------
  Warning  InvalidProviderConfig  2m25s (x20 over 16m)  secret-store  cannot find secrets bound to service account: "internal-app"
  Warning  InvalidProviderConfig  6s                    secret-store  cannot find secrets bound to service account: "default

error from external-secret pod:
{"level":"error","ts":1654757233.159253,"logger":"controller.secretstore","msg":"Reconciler error","reconciler group":"external-secrets.io","reconciler kind":"SecretStore","name":"alpha-beta-test","namespace":"default","error":"could not get provider client: cannot find secrets bound to service account: \"default\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227"}
secretstore ref:
kind: SecretStore
metadata:
  name: alpha-beta-test
  namespace: default
spec:
  provider:
    vault:
      server: "http://vault.default.svc.cluster.local:8200"
      path: "secret/devwebapp/config"
      version: "v1"
      auth:
        kubernetes:
          mountPath: "kubernetes"
          role: "devweb-app"
          serviceAccountRef:
            name: internal-app

same store can be used with vaultinjector
kind: Pod
metadata:
  name: devwebapp
  labels:
    app: devwebapp
  annotations:
    vault.hashicorp.com/agent-inject: "true"
    vault.hashicorp.com/role: "devweb-app"
    vault.hashicorp.com/agent-inject-secret-credentials.txt: "secret/data/devwebapp/config"
spec:
  serviceAccountName: internal-app
  containers:
    - name: devwebapp
      image: jweissig/app:0.0.1

externalsecretversion: latest
vault in running inside same cluster
cluster running in gke

If you’re using kubernetes 1.24, you need to create a Secret with the service account token yourself. Then, your configuration will work

Hello im getting the same erro

This is needed because from 1.24, k8s doesn't auto create a long lived jwt token for sa and if this is needed we need to create secret and associate it with sa.
apiVersion: v1
kind: Secret
metadata:
  name: my-sa-secret
  annotations:
    kubernetes.io/service-account.name: my-sa
type: kubernetes.io/service-account-token
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: my-sa
secrets:
- name: my-sa-secret

In case someone is looking for simple gitops based yaml to do this.
This is needed because from 1.24, k8s doesn't auto create a long lived jwt token for sa and if this is needed we need to create secret and associate it with sa.

apiVersion: v1

kind: Secret

metadata:

  name: my-sa-secret

  annotations:

    kubernetes.io/service-account.name: my-sa

type: kubernetes.io/service-account-token

---

apiVersion: v1

kind: ServiceAccount

metadata:

  name: my-sa

secrets:

- name: my-sa-secret

You don't need to refer it will automatically link itself as per annotation in secret, if the named service account does not exists it will be garbage collected

Even i also faced the same issue.
Then i modified my yaml as below , and issue solved.
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
name: gcp-cluster-secret-store
spec:
provider:
gcpsm:
projectID:
auth:
workloadIdentity:
serviceAccountRef:
name:
namespace: default
clusterName:
clusterLocation: us-central1
clusterProjectID:
For more details, i have written a detailed articles, please refer to that.
medium_url


[admin] Publish

Docs Build status updates of commit be06890:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/docfx.json
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript.yml
:white_check_mark:Succeeded
View (office-scripts)

docs/docs-ref-autogen/excel/excelscript/excelscript.builtinpivottablestyle.yml
:white_check_mark:Succeeded
View (office-scripts)

docs/docs-ref-autogen/excel/excelscript/excelscript.builtintablestyle.yml
:white_check_mark:Succeeded
View (office-scripts)

docs/docs-ref-autogen/excel/excelscript/excelscript.range.yml
:white_check_mark:Succeeded
View (office-scripts)

docs/docs-ref-autogen/excel/excelscript/excelscript.shape.yml
:white_check_mark:Succeeded
View (office-scripts)

docs/docs-ref-autogen/excel/excelscript/excelscript.workbook.yml
:white_check_mark:Succeeded
View (office-scripts)

docs/docs-ref-autogen/excel/toc.yml
:white_check_mark:Succeeded
View (office-scripts)

generate-docs/api-extractor-inputs-excel/excel.d.ts
:white_check_mark:Succeeded

generate-docs/json/excel/ExcelScript.api.json
:white_check_mark:Succeeded

generate-docs/script-inputs/excel.d.ts
:white_check_mark:Succeeded

generate-docs/tools/.gitignore
:white_check_mark:Succeeded

generate-docs/tools/coverage-tester.ts
:white_check_mark:Succeeded

generate-docs/tools/package-lock.json
:white_check_mark:Succeeded

generate-docs/tools/package.json
:white_check_mark:Succeeded

generate-docs/tools/readme.md
:white_check_mark:Succeeded

generate-docs/tools/tsconfig.json
:white_check_mark:Succeeded

generate-docs/tools/tslint.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Satisfactory Template Changes

Changed 'serverqueryport' variable to 'port' - Port variable gets shown in the server overview
Added a MaxPlayer Variable to change the player count
making the server work with docker - enable the "games" user and run server as that user - Issue
Added a game branch selector - Now you can start the server in the Satisfactory "experimental build"

you must create the config also after Install to use max Players, because config is created in First start and max Players are useless, until Server was started the First time

This has been partly reverted. The docker check still expected the games user to exist on the host, which it does not.


Make donations possible

I'm using & loving BitBar a lot and found myself searching for a donation button on the website but didn't find one.
My guess would be that most people using BitBar are quite happy with it and would be willing to/interested in sending some money your way!
Any plans on something like that?
Best,
Olivier

Very kind of you. There is a note in the README :) https://github.com/matryer/bitbar#its-free-so-please-donate
Any Bitcoin will be shared among the main core contributors.

:+1: Awesome! I missed that in the readme :)


Replace anonymous functions with named functions

Hello.
I propose to replace anonymous functions with named (function expressions become function expression + declaration). Generally it's a good practice to use named functions because they provide more detailed stacktraces and they help in debugging and in profiling (it's a lot easier to find out functions by name during cpu profiling).
Also it will add .name property which can be used, for example, in Proxy's apply methods which is useful if you're writing some kind of wrappers around this library.

Great! Released as 0.2.4


Update apigateway to use only UQL

Mechanically translates legacy style queries to UQL.

Shared links for review in OTel channels 48 hrs ago. Did not receive negative feedback. Proceeding with merge.


Announcing kustomize (blog post)

authors:
jeff regan -<EMAIL_ADDRESS>phil wittrock -<EMAIL_ADDRESS>proposed pub date: 2018-05-29

/assign @kbarnard10

Scheduled for Tuesday (5/29)
/hold

Thanks for looking!  Sorry i was out for a few days.
Can you tell me what you are looking at to ask for these markdown changes?
It all looks correct currently in github's mardown view.


Added uuid support to the rust classes.md file

I added a mention of Oso's uuid support to the docs so that others know it exists. Let me know if I made any mistakes.

I have read the CLA Document and I hereby sign the CLA

recheck

recheck

Oof. Apparently our CLA checker bot didn't like the additional newlines on the end of your message. I'll look into that, but for the time being would you mind confirming that you're okay with the edit I made to that message (removing the blank lines)?

@gj No worries about removing the extra lines and the small edits. Looks good to me


Update azure-storage-limits.md

remove duplicate row on "max number of files in a file share"

@robinsh - Please review the proposed changes.  Thanks

Looks good to me. Thanks to @tapinwa for your contribution!
Robin
#sign-off


fix(spdk-rs): prevent auto-unpin of bdev context

bors r+

This hasn't been merged yet, bors isn't configured for this repo. Now that openebs/Mayastor#1058 has already been merged this has to be merged with the exact hash otherwise that build will break.

Oops, that changed the hash, I should have used a merge commit. There needs to be another PR for Mayastor to fix the submodule hash, the build will be fine for now as long as this branch isn't deleted.


build fails with nimBLE and verbose logging (IDFGH-10023)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.1-dev-4883-g56123c52aa
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
What is the expected behavior?
Build completes successfully.
What is the actual behavior?
Build fails with /home/listout/esp/esp-idf-v5.0/components/bt/host/nimble/nimble/nimble/host/src/ble_gattc.c:1809:14: error: 'service' may be used uninitialized [-Werror=maybe-uninitialized]
Steps to reproduce.

Enable nimble stack (my sdkconfig can be found here: http://ix.io/4uwx)
Enable verbose logging
Build any (or an example) project with IDF from the master branch

Build or installation Logs.
The full build log can be found here: http://ix.io/4uwv
More Information.
The fix (applies in the nimble submodule):
diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c
index 4763f14e..63d967b4 100644
--- a/nimble/host/src/ble_gattc.c
+++ b/nimble/host/src/ble_gattc.c
@@ -1956,7 +1956,7 @@ static int
 ble_gattc_find_inc_svcs_rx_adata(struct ble_gattc_proc *proc,
                                  struct ble_att_read_type_adata *adata)
 {
-    struct ble_gatt_svc service;
+    struct ble_gatt_svc service = {0};
     int call_cb;
     int cbrc;
     int rc;

Hit the same build error if CONFIG_COMPILER_OPTIMIZATION_PERF=y.

We already have raised a fix internally. Once merged, it should be able to be seen on both master and release/v5.1 branch

@rahult-github Thanks, can I close this one then?

CONFIG_COMPILER_OPTIMIZATION_PERF=y

I too have that option in my sdkconfig @AxelLin

@rahult-github Thanks, can I close this one then?

Hi @listout  , i suggest to wait till the commit gets pushed and merged. This issue will get updated automatically.

We already have raised a fix internally. Once merged, it should be able to be seen on both master and release/v5.1 branch

@rahult-github is there any way to track the status of this fix? Building MicroPython for the ESP32-C6 is blocked by this issue and I'd like to test the fix when it's available. Thanks!

@rahult-github is there any way to track the status of this fix? Building MicroPython for the ESP32-C6 is blocked by this issue and I'd like to test the fix when it's available. Thanks!

Changes are available on master branch with commit 732c921c650c37c91c164fb0deaa5cecc5ce54ca .
You can pull the latest repo OR cherry-pick the commit.


Add Go 1.17 to all OSes toolsets

Description
Added Go 1.17.* version to all OSes toolsets
Related issue:
Check list

[ ] Related issue / work item is attached
[ ] Tests are written (if applicable)
[ ] Documentation is updated (if applicable)
[ ] Changes are tested and related VM images are successfully generated

Resolved, Thank you.

Think you for reviewing, I pushed new commit.
Could you check it?

@maxim-lobanov @miketimofeev

/azp run ubuntu1804, ubuntu2004, windows2016, windows2019, windows2022


Ghost Docker image 5.9.4 db connection issue

Issue Summary
I updated from ghost docker image 5.9 with an older version updated after 11th Aug 2022
(I cannot find which exact version of this, it seems the docker hub tags of old versions are actively removed)
to 5.9 with sha256:3e3d6bbf18cd48db00f59ab10c3788738eae6014d22187644ba02125be8a7377 which is 5.9.4
I am using the default image with no db related related ENV, so SQLite setup
and I get the following error

"Unknown database error"

Error ID:
    500

Error Code:
    ECONNREFUSED

----------------------------------------

Error: connect ECONNREFUSED <IP_ADDRESS>:3306
    at /var/lib/ghost/versions/5.9.4/node_modules/knex-migrator/lib/database.js:57:19
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)

Steps to Reproduce
docker 5.9.4 with default setup
Ghost Version
5.9.4
Node.js Version
docker 5.9.4
How did you install Ghost?
docker 5.9.4
Database type
SQLite3
Browser & OS version
No response
Relevant log / error output
No response
Code of Conduct

[X] I agree to be friendly and polite to people in this repository

Hi @edwardchenchen, Docker's official Ghost image is managed by them and their community over in this repo.
The info on the breaking change is in this pr.


added Factorial of number in all 4 languages

🛠 Issue #540

Issue no #540
👨💻 Changes proposed

I have added the factorial program in Maths folder for all 4 languages.
✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers
This is purely my code and I have tested in my local machine also.
📷 Screenshots

C
C++

Java
Python

:--:
:--:

@Kumar-laxmi kindly merge it


initial commit

//initial commit

@tenzinM Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

Spam


Touch event: Highlighted text not removed when touching another element (Mobile Web)

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Framework7 Version: 1.4.2

Platform and Target: CORDOVA / MOBILE WEB

Live Link or JSFiddle/Codepen: http://framework7.io/kitchen-sink-material/

What you did

In desktop web browser, click any component e.g Cards then highlight some text

Click anywhere aside from the highlighted text

You will notice that the highlighted text has been removed (the expected behavior)

In mobile web browser, click any component e.g Cards then highlight some text

Touch anywhere aside from the highlighted text

Nothing happens to the highlighted text

Expected Behavior
In mobile browser, upon touching anywhere else, it should also remove the highlighted text like so:

In mobile web browser, open http://framework7.io/ then highlight some text
Touch anywhere aside from the highlighted text
You will notice that the highlighted text has been removed (the expected behavior)

Actual Behavior
Nothing happens to the highlighted text on touch event. Problem seems specific to F7 upon inspecting other mobile web apps trying the same thing.

Hi, I cannot reproduce this issue on my iPhone with iOS10. What device and OS are you using?

@valnub Thanks for trying to help.
For the desktop browser, I am using Chrome. For the mobile web, I'm using an Android Lollipop phone.

Can anyone with an Android phone confirm this?

@valnub I recorded it :smile:
Test done in http://framework7.io/kitchen-sink-material/
https://www.dropbox.com/s/aenlqpty29lsnmh/Movie on 05-10-2016 at 6.32 PM.mov?dl=0

Thanks, looks like a bug.
Can you please also post:

Device name (Manufacturer & model name (e.g. Samsung Galaxy S7))
Browser name and version (e.g. Chrome 47)

Hello @valnub

I tried using my cheap china phone and my friend's latest Asus phone... Can't remember the brand (I don't think it's device specific)

I tried using other browsers (the default google browser) yielding same result.

I'll try tomorrow at work borrow my colleague's iphone and test the kitchen sink material and ios.

Hello @valnub
I can confirm that this is not happening on iOS upon testing http://framework7.io/kitchen-sink-material/ on colleague's iphone and ipad in Safari and Chrome browser.
The bug is specific to Android.
Thanks. :smile:


test: C3 integration e2e tests

Fixes # [insert GH or internal issue number(s)].
What this PR solves / how to test:
Associated docs issue(s)/PR(s):

[insert associated docs issue(s)/PR(s)]

Author has included the following, where applicable:

[ ] Tests
[ ] Changeset (Changeset guidelines)

Reviewer is to perform the following, as applicable:

Checked for inclusion of relevant tests
Checked for inclusion of a relevant changeset
Checked for creation of associated docs updates
Manually pulled down the changes and spot-tested

Closing and pushing to cloudlare fork instead.


Luminous pearls fired from dispenser vanish on hit

Issue found on latest git as of Dec 26th, and confirmed on unclouded server at time of posting
Luminous pearls seem to fire normally out of the dispenser, but then disappear like snowballs.

Accidentally hit the "assign yourself" button; I don't really use assignments so I cleared it


ReaderContext probably doesn't need to own data?

It looks like there's an extra clone in there, it can probably operate over a slice.
This would also open the door to some other little improvements, like just keeping the original font data blob and slicing into it to deserialize, instead of reallocating separate vectors for each table.

Sounds good. Obviously let’s aim for as much slices and as few copies as possible. Do you want to have a go at it or shall I?


JSON schema resulting in CSRF with UNC paths

VS Code Information Disclosure Vulnerability
A information disclosure vulnerability exists in VS Code 1.79.0 and earlier versions on Windows when file system operations are performed on malicious UNC paths. Examples include reading or resolving metadata of such paths. An authorised attacker must send the user a malicious file and convince the user to open it for the vulnerability to occur. Exploiting this vulnerability could allow the disclosure of NTLM hashes.
Patches
The fix is available starting with VS Code 1.79.1. It involved changes to VS Code as well as the node.js component that VS Code leverages for file system operations:

the change in https://github.com/microsoft/vscode/commit/67fa15cbc7ecfcc164127c5a346c1185596e9dce updates our versions of Electron and node.js
the change in https://gist.github.com/bpasero/ad230c2c8921e5d0470a1466b130b24f patches node.js 16.17.1 normalizes paths and throws an error when using paths of the form \\?\globalroot, \\?\global, \\.\globalroot or \\.\global

Workarounds
Do not open workspaces or files on UNC paths. Do not open workspaces or files that contain UNC paths as text.
References

The patches for this can be found at https://github.com/microsoft/vscode/commit/67fa15cbc7ecfcc164127c5a346c1185596e9dce and https://gist.github.com/bpasero/ad230c2c8921e5d0470a1466b130b24f
An advisory for this can be found at https://github.com/microsoft/vscode/security/advisories/GHSA-j5wm-6crw-xvmr
MSRC details for this can be found at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-33144
Our FAQ entry for how to work with UNC paths on Windows

After upgrading my cmake project doesn't open, with the following message
"Unable to load schema from 'cmake-tools-schema:/schemas/CMakePresets-v5-schema.json': cannot open cmake-tools-schema:/schemas/CMakePresets-v5-schema.json. Detail: Unable to resolve resource cmake-tools-schema:/schemas/CMakePresets-v5-schema.json."

Can you file a new issue?


Test Adapter Fails to recognize tests

Boost Library Version: 1.59
Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
No tests are shown by test discoverer and the following message is shown in Tests output:
"An exception occurred while test discoverer 'BoostTestDiscoverer' was loading tests. Exception: The type initializer for 'BoostTestAdapter.Utility.Logger' threw an exception."
The output of developer console is shown in file below:
vs.log.txt

Problem occured due to several installed test adapters, hence this issue can be closed.


Module langflow.inputs not found

I am experimenting with custom component based on the yesterday presentation.
I am on 1.0.0.a61
Thank you

@legaltextai did 1.0.5 release resolved the issue for you?

yes. it did. thank you for the human touch.


install failure for conda Installation

I am trying to install the environment on Windows following the Conda Installation instructions. When I run the command:
conda env create --name protein_gibbs_sampler -f conda_env.yml
I encounter errors preventing the installation of the following packages:
muscle
hmmer
mafft
I also tried to install them separately using:
conda install -c bioconda mafft hmmer muscle
But I faced the same issue. Could you please advise on how to resolve this?

I've seen that happen for people running on ARM-based Macs. Conda doesn't have ARM compiled versions of some binary dependencies. Luckily those Macs can execute x86 code, you just have to tell them to look in those repositories.
I don't have a Mac to test on, but you could try:
CONDA_SUBDIR=osx-64 conda env create --name protein_gibbs_sampler -f conda_env.yml

Thank you, I have already solved the install problem. But i got another question, is the environment for  https://github.com/seanrjohnson/protein_gibbs_sampler/tree/v0.1.0 same as https://github.com/seanrjohnson/protein_gibbs_sampler？In another word, can i just use the environment "protein_gibbs_sampler"  in newest version installed by conda for "v0.1.0" too? Because I want use the /training/mlm-finetuner-esmt12/finetune.py for finetune a model, but i can only find in the version0.1.0. But I can't install docker, I can't use the installation guide for version0.1.0

That's a good question.
In theory, if you use git to checkout the code at the commit for:
https://github.com/seanrjohnson/protein_gibbs_sampler/tree/v0.1.0
It should work with the docker instructions. However, it seems that in the "requirements.txt", we didn't specify versions of various dependencies, so it could be that the newest versions of the dependencies aren't compatible with our code?
I'm not sure.
I don't think you need docker though. Those training scripts might work if you just install the newest release and then add a few more dependencies manually, like tensorboard?
Those training scripts were all written and used by @kennymassie, personally I never used them, so I don't know how they work. Maybe he can help?


Update Script and Documentation for non-systemd Linux systems

I tried default installation script in Alpine Linux (WSL) and though it was apparently installed, I couldn't use ollama command. Also, manual install guide needs alternative steps for non-systemd sytems.

The ollama binary needs glibc. This makes me sad, because I wanted to try it!

I was able to use ollama serve command, which seemingly work; after manually installing Ollama following beginning of manual install guide, performing basic configuration in Alpine system, and then installing gcompat compatibilty layer. While trying ollama run {model}, it is able to download models but unable to run them showing following error:
Error: llama runner process has terminated

@NikeshKhatiwada unfortunately I think you're going to be fighting an uphill battle to try to get all our dependencies working without glibc.   I would encourage you to try to build the source tree from main, since we've revamped a lot of the build process since you tried.  Maybe you can get it to build for CPU only mode.

Our pre-compiled binary wont be viable for a non-glibc system.  I think we'd be open to community PRs to the build scripts if they're not complicated to enable building from source on a non-glibc system, but I'm going to close this ticket for now as I don't think it's something we plan to work on at this time.


Fix ROWS_QUERY event parsing long queries

The event is containing an integer value of the length of the query which can be longer then first expected. This is not working with extra long queries. The test i had added with #112 had only a short query were it worked well. Because of the dynamic length of the query to catch also those i now utilize the header length of the full binlog event to get the query.
Also i added a testcase for this with an extra long query.
Hope this fits you @krowinski ... thanks for your time!

ok tx I will test later other version of mysql  nad add to workflow tests as we got only mysql 5.7 😢

I have this problem, so hope it's possible to merge this soon.

@krowinski  can you give an update for the state of this PR? What does block you? Can i help somewhere?

@DZunke I'm unable to run test in other mysqversions #121 probably tests are not connecting to right db Im unable to find time to debug this.


after test folder "video" don't remove

Need to create rule
"Try to delete folder video after test anyway passed or failed"
Now after test @Test public void shouldBeAbsoluteRecordingPath() folder and video file exists
 @After     public void shutDown() throws IOException {         FileUtils.deleteDirectory(conf().getVideoFolder());     }

Updated by https://github.com/SergeyPirogov/VideoRecorder/commit/50f4f52369d8448be2445780738f98f101bbdd06


Need access for the auditree-framework for contributing

I would like collaborator (write) access to this repository, so I can contribute
to the Auditree Framework.

[X] I have read the contributing guidelines

done

We've changed our approach a bit for collaborators.  If you want to contribute to the framework just fork the repo and PR your change.  If you become a consistent and regular contributor then you can look to becoming a collaborator.  See the https://github.com/ComplianceAsCode/auditree-arboretum/blob/main/CONTRIBUTING.md for more details.


(sql) database

Right now, we create a workspace folder in the root of the program's files, instead of actually putting stuff in a database. OgbujiPT has the groundwork to get that done pretty simply.

(for news articles) this part is done!


Resulting NBI never finishes booting

I created a NBI from an AutoDMG image of 10.11.3 and Casper Imaging 9.82. The resulting image will start to boot, but the progress bar gets about halfway and hangs. It then proceeds to slowly creep along until it reaches the end of the bar, but it never finishes booting. I've waited 45 minutes to see if it would finish and it does not. Attempting to boot into verbose mode with cmd+v after selecting the netboot image doesn't seem to do anything.

We are seeing the same result with 10.11.3 and 9.82.

I tried building with 10.11.2 and have the same issue. I don't think I have any older installers laying around.

As an FYI, I just tested this with 10.11.4 and Casper Suite 9.82, and it still will not fully boot.

Tested with 10.11.5 generated from AutoDMG and Casper Suite 9.82 and same result - the bar just keeps creeping along, 30 minutes so far.
Rebuilt the NBI with 10.10.5 generated from AutoDMG and all other settings the same and it boots fine, so seems to be something about El Capitan support that's potentially busted.

Also seeing this with a 10.11.6 NBI created from an AutoDMG image.  Using Casper Imaging 9.93.


code

Thank you very much for your work. When will you open source code？

@xdeng7 any update on this thread

Same question. When will the source code be made publicly available?

Thank you for your excellent work! It has greatly inspired my own works. When do you plan to release the source code?


nameserver IP address is loopback when dnsTunneling is on

Windows Version
Microsoft Windows [Version 10.0.25951.1010]
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>-1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Enable DNS tunneling in ~/.wslconfig
[experimental]
dnsTunneling=true

Restart the VM: wsl --shutdown
Run the default distro and loop for the IP address assigned to the nameserver in /etc/resolv.conf:
wsl.exe
cat /etc/resolv.conf

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver <IP_ADDRESS>

Expected Behavior
Expected to find the host address (or an address which the host would respond by).
Actual Behavior
That address is in the loopback range.

That breaks workflows in which we need to talk to servers running inside the host from inside WSL. Those workflows usually relied on the nameserver address written in the autogenerated /etc/resolv.conf.
One workaround for such issue is finding the eth0 adapter default gateway and use that address to talk to the host.
❯ curl http://<IP_ADDRESS>:8000 # ofc that's a loopback to the WSL distro itself, which didn't open that port.
curl: (7) Failed to connect to <IP_ADDRESS> port 8000 after 0 ms: Couldn't connect to server

❯ ip route ls
default via <IP_ADDRESS> dev eth0 proto kernel
<IP_ADDRESS>/20 dev eth0 proto kernel scope link src <IP_ADDRESS>

❯ curl http://<IP_ADDRESS>:8000
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Directory listing for /</title>
</head>
...

Is that by design? Is it a mistake to rely on the nameserver address in /etc/resolv.conf for such workflows?
Enabling the mirrored networking mode also doesn't solve the issue, because the mirrored loopback only replies to <IP_ADDRESS>, any other address in the loopback range goes back to the WSL distro itself.
Diagnostic Logs
WslLogs-2023-09-28_10-22-05.zip

@CarlosNihelton thanks for reaching out
"Is it a mistake to rely on the nameserver address in /etc/resolv.conf for such workflows?"
For other configurations, you can still communicate to a host server from inside WSL, using the following methods:

For the case of mirrored mode turned off, but DNS tunneling turned on you can do the following:
Obtain the host IP address using "ipconfig /all" and use that for your host server.

Note that it needs to be an IPv4 address in order for WSL to connect to it
Also note that Windows firewall must allow traffic to your host server.

For the case of mirrored mode turned on, DNS tunneling turned on you can do the following:
Start the host server on <IP_ADDRESS> and access it from WSL. As you mentioned, other loopback IPs such as <IP_ADDRESS> will not work, but <IP_ADDRESS> works.

You can also start the host server on an IP assigned to the host (different from <IP_ADDRESS>). You can take that IP from "ipconfig /all" as well. In order for this to work, you need to also set "hostAddressLoopback=true" in your wslconfig file (you can find more details in https://learn.microsoft.com/en-us/windows/wsl/wsl-config)
Let us know if those methods work for your use case and if you have other questions

"One workaround for such issue is finding the eth0 adapter default gateway and use that address to talk to the host" this also works - if you have mirrored mode off, DNS tunneling on

Resolving as the issue is by design.
Please reopen the issue if the alternative methods for connecting to a host server from WSL are not working for you.

Resolving as the issue is by design.
Please reopen the issue if the alternative methods for connecting to a host server from WSL are not working for you.


Fixed the link for IPv4/IPv6 dual-stack

This PR fix the link for IPv4/IPv6 dual-stack in Networking on windows.
Fixes #41905

/retitle Fix broken link for IPv4/IPv6 dual-stack (Windows)

@thisisharrsh thanks for the fix!


[BUG] BlobClient.DownloadAsync() Response x-ms-client-request-id  does not match the original expected request id

Using the latest Blazor WebAssembly sdk I am trying to download a Blob's content using BlobClient.DownloadAsync()
Expected behavior
I expect the blob to download and on the first attempt if its been left a while it does appear to work but then never again after.
Actual behavior (include Exception or Stack Trace)
Upon downloading of the blob an exception occurs:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Response x-ms-client-request-id '' does not match the original expected request id, ''.
This is the output in the browser console:
 Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Response x-ms-client-request-id '82d5f0bb-bd83-4ef5-8f3a-fa5165f4737a' does not match the original expected request id, 'fcacef5f-0472-44c7-b36d-bafdf2768451'.
      Status: 200 (OK)

      Headers:
      Accept-Ranges: bytes
      Date: Mon, 06 Jul 2020 19:18:05 GMT
      ETag: "0x8D82021DE355DD6"
      Server: Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0
      x-ms-blob-type: BlockBlob
      x-ms-client-request-id: 82d5f0bb-bd83-4ef5-8f3a-fa5165f4737a
      x-ms-creation-time: Sat, 04 Jul 2020 13:55:10 GMT
      x-ms-lease-state: available
      x-ms-lease-status: unlocked
      x-ms-request-id: e415a9cd-001e-000b-7dca-53dfb7000000
      x-ms-server-encrypted: true
      x-ms-version: 2019-07-07
      Content-Length: 1284435
      Content-MD5: uQBQz3kRBFQgZPSAcV27LA==
      Content-Type: application/json
      Last-Modified: Sat, 04 Jul 2020 13:55:10 GMT

Azure.RequestFailedException: Response x-ms-client-request-id '82d5f0bb-bd83-4ef5-8f3a-fa5165f4737a' does not match the original expected request id, 'fcacef5f-0472-44c7-b36d-bafdf2768451'.
Status: 200 (OK)

Headers:
Accept-Ranges: bytes
Date: Mon, 06 Jul 2020 19:18:05 GMT
ETag: "0x8D82021DE355DD6"
Server: Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0
x-ms-blob-type: BlockBlob
x-ms-client-request-id: 82d5f0bb-bd83-4ef5-8f3a-fa5165f4737a
x-ms-creation-time: Sat, 04 Jul 2020 13:55:10 GMT
x-ms-lease-state: available
x-ms-lease-status: unlocked
x-ms-request-id: e415a9cd-001e-000b-7dca-53dfb7000000
x-ms-server-encrypted: true
x-ms-version: 2019-07-07
Content-Length: 1284435
Content-MD5: uQBQz3kRBFQgZPSAcV27LA==
Content-Type: application/json
Last-Modified: Sat, 04 Jul 2020 13:55:10 GMT

  at Azure.Storage.StorageRequestValidationPipelinePolicy.OnReceivedResponse (Azure.Core.HttpMessage message) <0x34b6270 + 0x000d2> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x33c0748 + 0x00114> in <filename unknown>:0
  at Azure.Core.Pipeline.RetryPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline, System.Boolean async) <0x33a8080 + 0x0012c> in <filename unknown>:0
  at Azure.Core.Pipeline.RetryPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline, System.Boolean async) <0x33a8080 + 0x00270> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x33c0748 + 0x00100> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x33c0748 + 0x00100> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x33c0748 + 0x00100> in <filename unknown>:0
  at Azure.Storage.Blobs.BlobRestClient+Blob.DownloadAsync (Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics, Azure.Core.Pipeline.HttpPipeline pipeline, System.Uri resourceUri, System.String version, System.String snapshot, System.Nullable`1[T] timeout, System.String range, System.String leaseId, System.Nullable`1[T] rangeGetContentHash, System.Nullable`1[T] rangeGetContentCRC64, System.String encryptionKey, System.String encryptionKeySha256, System.Nullable`1[T] encryptionAlgorithm, System.Nullable`1[T] ifModifiedSince, System.Nullable`1[T] ifUnmodifiedSince, System.Nullable`1[T] ifMatch, System.Nullable`1[T] ifNoneMatch, System.String requestId, System.Boolean async, System.String operationName, System.Threading.CancellationToken cancellationToken) <0x35b43e0 + 0x002c6> in <filename unknown>:0
  at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x35cfde8 + 0x0003c> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.StartDownloadAsync (Azure.HttpRange range, Azure.Storage.Blobs.Models.BlobRequestConditions conditions, System.Boolean rangeGetContentHash, System.Int64 startOffset, System.Boolean async, System.Threading.CancellationToken cancellationToken) <0x35b2e50 + 0x004be> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadInternal (Azure.HttpRange range, Azure.Storage.Blobs.Models.BlobRequestConditions conditions, System.Boolean rangeGetContentHash, System.Boolean async, System.Threading.CancellationToken cancellationToken) <0x35aaeb0 + 0x002b8> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadAsync (Azure.HttpRange range, Azure.Storage.Blobs.Models.BlobRequestConditions conditions, System.Boolean rangeGetContentHash, System.Threading.CancellationToken cancellationToken) <0x35a2830 + 0x000fa> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadAsync (System.Threading.CancellationToken cancellationToken) <0x35a20c8 + 0x000fc> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadAsync () <0x359d2c8 + 0x000ea> in <filename unknown>:0
  at Blazor.Shared.ViewReportBase.OnInitializedAsync () [0x000a6] in C:\Users\Anthony\Source\Repos\AccessibilityApp\src\AccessibilityReportViewer\Blazor.Shared\ViewReport.razor.cs:34
  at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync () <0x2d12630 + 0x0013a> in <filename unknown>:0
  at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask (System.Threading.Tasks.Task taskToHandle) <0x2fdc928 + 0x000b6> in <filename unknown>:0

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

Full repo can be found at https://github.com/AnthonyDewhirst/BlazorADandBlobs
Change the details in appsettings.json and run.
Login to your selected AD tennant
Select Reports
Select to view a report

Environment:

MS Edge Version 83.0.478.58 (Official build) (64-bit)

netstandard2.1
3.0

.NET Core SDK (reflecting any global.json):
Version:   3.1.301
Commit:    7feb845744

Runtime Environment:
OS Name:     Windows
OS Version:  10.0.19041
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.301\
Host (useful for support):
Version: 3.1.5
Commit:  65cd789777
.NET Core SDKs installed:
1.0.0-rc4-004771 [C:\Program Files\dotnet\sdk]
1.0.0 [C:\Program Files\dotnet\sdk]
1.0.2 [C:\Program Files\dotnet\sdk]
1.0.3 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.302 [C:\Program Files\dotnet\sdk]
2.1.400 [C:\Program Files\dotnet\sdk]
2.1.401 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.1.503 [C:\Program Files\dotnet\sdk]
2.1.504 [C:\Program Files\dotnet\sdk]
2.1.505 [C:\Program Files\dotnet\sdk]
2.1.507 [C:\Program Files\dotnet\sdk]
2.1.509 [C:\Program Files\dotnet\sdk]
2.1.511 [C:\Program Files\dotnet\sdk]
2.1.600 [C:\Program Files\dotnet\sdk]
2.1.601 [C:\Program Files\dotnet\sdk]
2.1.602 [C:\Program Files\dotnet\sdk]
2.1.800-preview-009677 [C:\Program Files\dotnet\sdk]
2.2.200-preview-009748 [C:\Program Files\dotnet\sdk]
2.2.200 [C:\Program Files\dotnet\sdk]
2.2.201 [C:\Program Files\dotnet\sdk]
2.2.202 [C:\Program Files\dotnet\sdk]
2.2.400-preview-010195 [C:\Program Files\dotnet\sdk]
3.1.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Visual Studio 16.6.3

Could you enable logging so we can see the requests and responses that are getting sent back? (with redacted private info)
https://docs.microsoft.com/en-us/dotnet/azure/logging
From your stack trace it doesn't look like parallel download is going either, so I'm trying to figure out with just one download request, why the client ids aren't matching.

it does appear to work but then never again after.
What do you mean by this, does the download work sometimes?

Hi, so, after a few futile attempts and reading up on logging within BLAZOR WEBASSEMBLY I don't see how the link you sent does anything or where it goes?
The only place I currently see logging is in the browser console window and I have tried a few different things:
appsettings.json:
"Logging": {
"LogLevel": {
"Default": "Trace"
}
}
with
builder.Logging.AddConfiguration(
builder.Configuration.GetSection("Logging"));
and also in program.main
        builder.Logging.SetMinimumLevel(LogLevel.Trace);

but I only ever see INFO in the console and of what I imagine is very little interest to you.
I even tried Logger.LogTrace in my own code next to a Logger.LogInformation and only the latter was displayed)
I have included the repo in the OP and so you could run this yourself its simple and I am making some obvious mistake?
As for my comment: it does appear to work but then never again after.
What this means is that if I haven't been on my pc for a while, (I am guessing at an hour as that the usual lifetime of a token but this might be a red herring) that the code works and the screen shows "Loaded" which should only happen if no exceptions were thrown. Every load of the page after that I get the error as detailed in the OP.
Also something to note is that I think I have something wrong with the ID and Scope setup as I get the popup for authentication which uses the cookie/token to get the access token every time I go to the Reports or Report page however, I wasn't expecting this and this might be the root cause?
If you could either run up the repo code yourself or give me explicit instructions on how to enable logging that would be much appreciated.

To enable logging, i.e. add this early in main method:
            using AzureEventSourceListener listener = new AzureEventSourceListener((e, message) =>
            {
                // Only log messages from Azure-Core event source
                if (e.EventSource.Name == "Azure-Core")
                {
                    File.AppendAllText("C:\\log.txt", $"{DateTime.Now} {message}");
                }
            },
             level: EventLevel.Verbose);

This will produce a log file in 'C:\log.txt`. Please provide us with this log file.
I did go through your repo and looked at how you were calling DownloadAsync however it wasn't anything special, so I took that snippet and attempted to reproduce your problem however I was unable to reproduce your problem. If you have a snippet of code that reproduces this problem every time, this would help greatly.

Hi Amanda,
Appreciate you looking into this for me but this code doesn't work for me.
I have even put the following:

namespace Blazor.WA
{
    public class Program
    {
        public static async Task Main(string[] args)
        {
            var builder = WebAssemblyHostBuilder.CreateDefault(args);

            using AzureEventSourceListener listener = new
AzureEventSourceListener((e, message) =>
                {
                    throw new Exception("going in at least");
                },
                level: EventLevel.Verbose);

    ...

and the exception is never hit.
I do believe that this is because its blazor WebAssembly.
I mean, I can't imagine there is any way that a blazor component should
just be able to write to the local machine anyways.
But the exception not being hit should prove that this code just isn't
being hit.
The repo produces the code EVERYTIME I run it after the first attempt.
This is the simplest form of the code to reproduce the failure.
You need an azure storage account with a private blob held behind AD
accounts. Then link up the your ad account to that storage account using
App registrations.
I have the cors setting as follows:
[image: image.png]
and the permissions as follows:
[image: image.png]
and I have the app registration as follows for WEB
[image: image.png]
I then also tried the following with SPA settings:
[image: image.png]
same results.
On Mon, 13 Jul 2020 at 17:47, Amanda Nguyen<EMAIL_ADDRESS>wrote:

To enable logging, i.e. add this early in main method:
        using AzureEventSourceListener listener = new AzureEventSourceListener((e, message) =>
        {
            // Only log messages from Azure-Core event source
            if (e.EventSource.Name == "Azure-Core")
            {
                File.AppendAllText("C:\\log.txt", $"{DateTime.Now} {message}");
            }
        },
         level: EventLevel.Verbose);

This will produce a log file in 'C:\log.txt`. Please provide us with this
log file.
I did go through your repo and looked at how you were calling
DownloadAsync however it wasn't anything special, so I took that snippet
and attempted to reproduce your problem however I was unable to reproduce
your problem. If you have a snippet of code that reproduces this problem
every time, this would help greatly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-sdk-for-net/issues/13298#issuecomment-657669799,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE44CJZZNGDOZ6S24RHEK3R3M3AXANCNFSM4OUIBYCQ
.

Hi Amanda,
Appreciate you looking into this for me but this code doesn't work for me.
I have even put the following:

namespace Blazor.WA
{
    public class Program
    {
        public static async Task Main(string[] args)
        {
            var builder = WebAssemblyHostBuilder.CreateDefault(args);

            using AzureEventSourceListener listener = new
AzureEventSourceListener((e, message) =>
                {
                    throw new Exception("going in at least");
                },
                level: EventLevel.Verbose);

    ...

and the exception is never hit.
I do believe that this is because its blazor WebAssembly.
I mean, I can't imagine there is any way that a blazor component should
just be able to write to the local machine anyways.
But the exception not being hit should prove that this code just isn't
being hit.
The repo produces the code EVERYTIME I run it after the first attempt.
This is the simplest form of the code to reproduce the failure.
You need an azure storage account with a private blob held behind AD
accounts. Then link up the your ad account to that storage account using
App registrations.
I have the cors setting as follows:

and the permissions as follows:

and I have the app registration as follows for WEB

I then also tried the following with SPA settings:

same results.

Ah okay, I see so the problem you're having is more of an authentication issue alongside Download, however the error occurs in download and not when you authenticate and refreshing the auth token.
I apologize if there's not much more I can help with on the Azure.Storage.Blobs package, however if you're having trouble with token usage and using Blazor AD, I suggest you open an issue with Blazor, as this is pulling into the scope of how does Blazor AD authentication interact with scopes, tokens and authentication.
https://github.com/dotnet/aspnetcore
If there's more clarification that needs to be done from the Azure.Storage.Blobs end, please feel free to tag me and loop me in. Sorry I can't be of much more help with this,

I have now simplified the repo even more and added a console app the works with the SA setup as well as using the api directly within WA as well. This now feels like a bug between Blazor WA and the Storage client.
I created an issue with the blazor people around auth and I think this is now all ok.
So if someone could once again take a look at this please? @amnguye you said if I had any new info to tag you. Tagged :-)

ok, is this an actual issue with the API?
In blazor, if I use the following code:
            var uri = $"{StorageAccountConfig.Uri}/{reportName}";

            // Instantiate the request message with a null payload.
            var now = DateTime.UtcNow;
            using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri);

            httpRequestMessage.Headers.Add("x-ms-date", now.ToString("R", CultureInfo.InvariantCulture));
            httpRequestMessage.Headers.Add("x-ms-version", "2019-12-12");

            var sendRequestId = Guid.NewGuid().ToString();

            httpRequestMessage.Headers.Add("x-ms-client-request-id", sendRequestId);
            Logger.LogInformation($"Sent request id was: {sendRequestId}");

            var headerValue = "Bearer " + await GetTokenAsync();
            httpRequestMessage.Headers.Add(HttpHeader.Names.Authorization, headerValue);

            // Send the request.
            using var httpResponseMessage = await HttpClient.SendAsync(httpRequestMessage, CancellationToken.None);

            // If successful (status code = 200),
            //   parse the XML response for the container names.
            if (httpResponseMessage.StatusCode == HttpStatusCode.OK)
            {
                Logger.LogInformation($"Returned request (x-ms-client-request-id) id was: {httpResponseMessage.Headers.GetValues("x-ms-client-request-id").FirstOrDefault()}");

                Json = await httpResponseMessage.Content.ReadAsStringAsync();
            }

I get the following logs out
info: Blazor.WA.Pages.ReportBase[0]
      Sent request id was: 38df61b1-7db3-4328-be9a-4de83c071ae9
blazor.webassembly.js:1 info: Blazor.WA.Pages.ReportBase[0]
      Returned request (x-ms-client-request-id) id was: c47e833a-da14-43f6-96ab-9682a7d39df5

and then this using postman shows that the ids don't match up - looks like this isn't a blazor or client issue but maybe an API issue?

Hi,
I saw that you were able to simplify your application in the other issue for the blazor team. I was wondering if you could simplify your application down to only using the Azure.Storage.Blobs library to help us narrow down where the issue is since you are sure the error is not within Blazor.
Also another question I have is why are you creating a custom TokenCredential class when the Azure.Identity package already has these provided.
I'm also not sure what you mean by API issue, do you mean REST API ?
Also your original issue was that the x-ms-client-request-id in the request was not matching the x-ms-client-request-id in the response. However in your screenshots you are showing the x-ms-request-id which is not the same as x-ms-client-request-id. They are not supposed to be the same, they are different headers.

Hi, yes, this is what I get for doing multiple jobs at once and being very tired! So apologies :-)

Postman does indeed show that the two headers match as does calling the api directly from blazor, which the updated code shows an example of (see previous post) and did in my previous post I just missed it.
So this shows that the getting of the token and the api are all ok. Which leaves the usage of the BlobClient usage from Blazor WA.
The console app shows that the same concepts work using the same Blob nuget package source.
The reasons I use a custom TokenProvider is because this is hosted in blazor and I can't see a way to get to the bearer token other than the rather simple custom class I have used.
The only part that should be focused on, is that we have a bearer token that works (shown by using the REST API directly) and that when this same token is passed into the BlobClient and the BlobClient is used this doesn't work.
I have created a solution (added to the repo) this is as bare bones as I can probably get it.
You need a SA with a blob and a valid bearer token.
You have to input the values in the index.razor file and then off you go.
Again, this worked the first time I tried it. I wonder if its the way it hols on to an httpClient?
I will try to add an example using Blazor Server later tonight.

It looks as if you're trying to create the token using the PublicClientApplicationBuilder from the Microsoft.Identity.Client library, and when passing that to the TokenCredential object which is in library Identity package in the Azure.Identity library. And maybe there's something that might be going there.
Since you're authenticating against AAD, I would suggest creating the Token using something like this below
TokenCredential token = new ClientSecretCredential( tenantId, clientId, clientSecret)
https://docs.microsoft.com/en-us/dotnet/api/azure.identity.clientsecretcredential.-ctor?view=azure-dotnet#Azure_Identity_ClientSecretCredential__ctor_System_String_System_String_System_String_
And let's see if it's successful. If this works, then there's something going on between that. If not then we've narrowed it down to the Azure.Storage.Blobs library. Either way let's see which way this goes and we can work through that.
Also where does GetTokenAsync() come from? I looked through your repo and I couldn't find what method that would be or where you are generating your TokenCredentials.

In the end, I am using Azure AD. Blazor is a client app and therefore no secrets can be safe, so going forward I won't be able to use clientSecret so that is off the table as a solution.
Have you tried running this code yourself?
The code I posted last night was as simple as it can be: 1 page, 1 nested class hard coded values that you provide:
@page "/"
@using Azure.Storage.Blobs
@using Azure.Storage.Blobs.Specialized
@using Azure.Core
@using System.Threading

<div>
    <button @onclick="OnLoad">Press me</button>
</div>

@code
{
    public async Task OnLoad()
    {
        var reportName = "<name of a blob here>";
        var uri = new Uri("https://<your storage account name here>.blob.core.windows.net/<container name here>");

        var client = new BlobContainerClient(uri, new AccessTokenProviderTokenCredential());
        var blobClient = client.GetBlockBlobClient(reportName);

        var blob = await blobClient.DownloadAsync();
    }

    public class AccessTokenProviderTokenCredential : TokenCredential
    {
        private string _bearerToken = @"<Put you bearer token here>";

        public override ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
        {
            return new ValueTask<AccessToken>(GetToken(requestContext, cancellationToken));
        }

        public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
        {
            return new AccessToken(_bearerToken, DateTimeOffset.UtcNow.AddHours(1));
        }
    }
}

On the first click, it worked, and then it stopped working. Even on successful reloads:
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Response x-ms-client-request-id '09106bca-ac2d-4eeb-8834-8c718be257b9' does not match the original expected request id, '8a65334c-0dbe-4df5-9010-87b66198decb'.
      Status: 200 (OK)

      Headers:
      Accept-Ranges: bytes
      Date: Wed, 22 Jul 2020 19:14:34 GMT
      ETag: "0x8D82021DE355DD6"
      Server: Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0
      x-ms-blob-type: BlockBlob
      x-ms-client-request-id: 09106bca-ac2d-4eeb-8834-8c718be257b9
      x-ms-creation-time: Sat, 04 Jul 2020 13:55:10 GMT
      x-ms-lease-state: available
      x-ms-lease-status: unlocked
      x-ms-request-id: 61c23203-b01e-003b-565c-60859d000000
      x-ms-server-encrypted: true
      x-ms-version: 2019-07-07
      Content-Length: 1284435
      Content-MD5: uQBQz3kRBFQgZPSAcV27LA==
      Content-Type: application/json
      Last-Modified: Sat, 04 Jul 2020 13:55:10 GMT

Azure.RequestFailedException: Response x-ms-client-request-id '09106bca-ac2d-4eeb-8834-8c718be257b9' does not match the original expected request id, '8a65334c-0dbe-4df5-9010-87b66198decb'.
Status: 200 (OK)

Headers:
Accept-Ranges: bytes
Date: Wed, 22 Jul 2020 19:14:34 GMT
ETag: "0x8D82021DE355DD6"
Server: Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0
x-ms-blob-type: BlockBlob
x-ms-client-request-id: 09106bca-ac2d-4eeb-8834-8c718be257b9
x-ms-creation-time: Sat, 04 Jul 2020 13:55:10 GMT
x-ms-lease-state: available
x-ms-lease-status: unlocked
x-ms-request-id: 61c23203-b01e-003b-565c-60859d000000
x-ms-server-encrypted: true
x-ms-version: 2019-07-07
Content-Length: 1284435
Content-MD5: uQBQz3kRBFQgZPSAcV27LA==
Content-Type: application/json
Last-Modified: Sat, 04 Jul 2020 13:55:10 GMT

  at Azure.Storage.StorageRequestValidationPipelinePolicy.OnReceivedResponse (Azure.Core.HttpMessage message) <0x2fd8058 + 0x000d2> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x2f239c8 + 0x00114> in <filename unknown>:0
  at Azure.Core.Pipeline.RetryPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline, System.Boolean async) <0x2f2e108 + 0x0012c> in <filename unknown>:0
  at Azure.Core.Pipeline.RetryPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline, System.Boolean async) <0x2f2e108 + 0x00270> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x2f239c8 + 0x00100> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x2f239c8 + 0x00100> in <filename unknown>:0
  at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync (Azure.Core.HttpMessage message, System.ReadOnlyMemory`1[T] pipeline) <0x2f239c8 + 0x00100> in <filename unknown>:0
  at Azure.Storage.Blobs.BlobRestClient+Blob.DownloadAsync (Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics, Azure.Core.Pipeline.HttpPipeline pipeline, System.Uri resourceUri, System.String version, System.String snapshot, System.Nullable`1[T] timeout, System.String range, System.String leaseId, System.Nullable`1[T] rangeGetContentHash, System.Nullable`1[T] rangeGetContentCRC64, System.String encryptionKey, System.String encryptionKeySha256, System.Nullable`1[T] encryptionAlgorithm, System.Nullable`1[T] ifModifiedSince, System.Nullable`1[T] ifUnmodifiedSince, System.Nullable`1[T] ifMatch, System.Nullable`1[T] ifNoneMatch, System.String requestId, System.Boolean async, System.String operationName, System.Threading.CancellationToken cancellationToken) <0x2ed72b8 + 0x002c6> in <filename unknown>:0
  at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x3019cd8 + 0x0003c> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.StartDownloadAsync (Azure.HttpRange range, Azure.Storage.Blobs.Models.BlobRequestConditions conditions, System.Boolean rangeGetContentHash, System.Int64 startOffset, System.Boolean async, System.Threading.CancellationToken cancellationToken) <0x2ed12f0 + 0x004be> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadInternal (Azure.HttpRange range, Azure.Storage.Blobs.Models.BlobRequestConditions conditions, System.Boolean rangeGetContentHash, System.Boolean async, System.Threading.CancellationToken cancellationToken) <0x2eb5180 + 0x002b8> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadAsync (Azure.HttpRange range, Azure.Storage.Blobs.Models.BlobRequestConditions conditions, System.Boolean rangeGetContentHash, System.Threading.CancellationToken cancellationToken) <0x2ecda10 + 0x000fa> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadAsync (System.Threading.CancellationToken cancellationToken) <0x2ecd2a8 + 0x000fc> in <filename unknown>:0
  at Azure.Storage.Blobs.Specialized.BlobBaseClient.DownloadAsync () <0x2eccc58 + 0x000ea> in <filename unknown>:0
  at Simplest.WA.Pages.Index.OnLoad () [0x0006c] in C:\Users\Anthony\Source\Repos\BlazorADandBlobs2\src\ReportViewer\Simplest.WA\Pages\Index.razor:23
  at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x2f9c6b0 + 0x000da> in <filename unknown>:0
  at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask (System.Threading.Tasks.Task taskToHandle) <0x2fb45f8 + 0x000b6> in <filename unknown>:0

The exact SAME code when used from Blazor Server does work!
I think that this is proof that there is something wrong between Blazor WebAssembly and the BlobClient that stops it being used

Even though providing the secret is "off the table as a solution" for your client application, have you tried doing it? I find it odd that you don't have to provide the secret in order to get a valid TokenCredential. Could you explain how Blazor generates the token? Does your application have a client certificate that it generates the token off of?
I've run your repo before and it doesn't work or send any requests to storage. I pulled your repo a few minutes ago and reran your updated repo, and I get the same error. It keeps asking me to reload but does not produce any error or logs that are helpful. I even opened up Fiddler to trace what requests are being sent by your application however it's a no go. I'm not sure what you wanted me to do by pulling your repo, did you want me to go in and debug it for you?
I also ran the code you posted above and it runs just fine for me with the bearer token I provided. I reran it about 20 times just to make sure as well. I did not receive any error and I checked the traces as well and the x-ms-client-request-id from the response and request match as well (for each transaction).
I looked in the service logs with the request id you provided and looks like the request gets altered in some way. In all requests sent by our SDK we send a user agent saying that the .NET SDK sent this request however we get a completely different user agent that is not the .NET SDK. Our user agent looks like this "azsdk-net-Storage.Blobs/12.5.0-preview.1". Your useragent looks like this "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 Edg/84.0.522.40", is something messing with the request you are sending to storage before the sdk sends the request? or is this request error log from your manual http request?

Hi Amanda,
Thanks for getting back to me .I feel as though because we can only communicate through chat some of the detail between us is getting missed and I would like to avoid that. I will attempt to lay out what I think is the issue here and apologies if I am going overboard and reiterating some of this again. :-)
I don't believe the issue is with the BlobClient
I don't believe the issue is with the Blazor WebAssembly
I do believe the issue is with the BlobClient used with Blazor WebAssembly
The great thing is that I think that your last comment could be the real issue.
When I first raised this bug, I thought that the issue was to do with authentication. I now don't which is why I am not focusing on the Token at all and unless you tell me a reason why it matters I don't think that should be the focus to resolving what I believe this bug now to be.
However, to be clear, the guidance I followed is here :
The guidance about not using secrets on clients is here and states:
Blazor WebAssembly authentication
In Blazor WebAssembly apps, authentication checks can be bypassed because all client-side code can be modified by users. The same is true for all client-side app technologies, including JavaScript SPA frameworks or native apps for any operating system.

So what I intend to do is use AzueAD and masl to get the token which I now have working perfectly.
Again, I don't believe tokens or authentication to be the issue at all and I will explain why further down.
In terms of do I expect you to debug it for me? I honestly don't know how to debug this issue or how you guys work to solve bugs, I believe that I have the repo down to 2 projects that are as basic as they can be to showcase what I believe the issue to be. I am not trying to be argumentative here, but I was asked in both this issue and the one I raised about authentication to get the code to its most simplistic form. Which I should have done to start with but it took me a while to realise where the problem lay and I had mistakenly thought at the beginning that all parts (Auth, blazor sdk) were needed to show the issue.
I now have 2 projects that on the face of it use the same code to show that it works in one project: Simplest.Server, but doesn't work in the other: Simplest.WA. I say on the face of it, but because Blazor WebAssembly is run in mono in the browser, they don't actually work exactly the same.
You said that you were unable to get the projects to run, but then you said you did get it to work and ran it 20 times.
I need to be sure we are both talking about the same thing here, so let me state what I take that to mean and what I mean when I say one works and one doesn't:
I think you put this code into something that wasn't blazor web assembly and it worked, and I agree, I think that should work. This is what the Simplest.Server project shows: That taking Blazor Web Assembly out of the equation, the same looking code does indeed work.
If you have the latest repo and go into Simplest.Server and the update the file https://github.com/AnthonyDewhirst/BlazorADandBlobs/blob/master/src/ReportViewer/Simplest.Server/Pages/Index.razor
with a good bearer token and SA details, this should work, every time.
However, if you then change to the Simplest.WA project, update the file https://github.com/AnthonyDewhirst/BlazorADandBlobs/blob/master/src/ReportViewer/Simplest.WA/Pages/Index.razor with the same details and run this project, what I see, is that the first call works, but then subsequent calls fail for the life time of that token.
I only see the issue in Blazor WebAssembly and no where else.
Because I use the same token in both projects to prove this I am convinced that this is not a token issue. Again, I believe the client sdk works just fine outside of its use of Blazor WebAssembly.
I also have shown that if I write custom code to call the blob api directly from within Blazor WebAssembly then this works everytime.
Its a combination of the sdk and Blazor WebAssembly for downloading blobs. (For listing blobs, the combination works)
Now down to the good stuff!
As I said above, I think you are on to something with the last comment you made.
I believe, but I am not an expert here, that Blazor WebAssembly doesn't make direct http client calls itself, I thought I had read that it actually uses javascript interop to make the call on its behalf. So when you asked "am I" making changes to the header, the answer is no, but is the underlying blazor interop, possibly yes. :-) (I can't seem to find the article now that stated this, so I could be off target here)
The article here does suggest that Blazor WA is different to other scenarios.
So when I ask have you ran the repo, What I actually mean is, have you been able to replicate the issue using Blazor WebAssembly? I hope that my sample, Simplest.WA, should just work once the file has the SA and bearer tokens in place and that you can see this as well, otherwise it might indeed be some setup issue I have, but I hope that I have made it so simple that its not my setup.
I also have struggled to get fiddler working with this, but I am useless with fiddler to be honest :-( So I just thought that was my misunderstanding of how to use fiddler.
In terms of debugging, I know that Blazor WebAssembly "should" be able to be debugged, but I have very mixed results with even getting the debugger to attach. I think this is down to the fact that Blazor WebAssembly is running in the browser under mono (I think) and is fairly new.
Logging: I can only get to write to the console output in the browser and I couldn't get the code you provided to produce any output, I have no idea why there.
So to some up, I believe the issue is with how Blazor WebAssembly handles http requests that the blob sdk makes, I don't know how to get a simpler solution to showcase this but I am willing to try any suggestions that relate to this issue and would work with bearer tokens as that is the scenario that is being used.
What I would like you to do, is state when you say you have it working, you do mean in Blazor WebAssembly, or if you haven't, can you get a sample working with Blazor WebAssembly. (Hopefully the project Simplest.WA should be in a state that you can prove this either way).

Hi sorry for the late response. Sorry if I don't address everything from your most recent message, if you want me to address something I didn't respond to please reply with it.
The reason why Fiddler does not work is because your App makes the call to storage from the Web Application, so it does not pass through Fiddler. So Fiddler is working as intended.
When I said that I

I also ran the code you posted above and it runs just fine for me with the bearer token I provided. I reran it about 20 times just to make sure as well. I did not receive any error and I checked the traces as well and the x-ms-client-request-id from the response and request match as well (for each transaction).
I meant this code snippet you put in this message

@page "/"
@using Azure.Storage.Blobs
@using Azure.Storage.Blobs.Specialized
@using Azure.Core
@using System.Threading

<div>
    <button @onclick="OnLoad">Press me</button>
</div>

@code
{
    public async Task OnLoad()
    {
        var reportName = "<name of a blob here>";
        var uri = new Uri("https://<your storage account name here>.blob.core.windows.net/<container name here>");

        var client = new BlobContainerClient(uri, new AccessTokenProviderTokenCredential());
        var blobClient = client.GetBlockBlobClient(reportName);

        var blob = await blobClient.DownloadAsync();
    }

    public class AccessTokenProviderTokenCredential : TokenCredential
    {
        private string _bearerToken = @"<Put you bearer token here>";

        public override ValueTask<AccessToken> GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
        {
            return new ValueTask<AccessToken>(GetToken(requestContext, cancellationToken));
        }

        public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
        {
            return new AccessToken(_bearerToken, DateTimeOffset.UtcNow.AddHours(1));
        }
    }
}

However this and only this code snippet by itself. Not your entire Simplest.WA project.
When I attempted to run your Simplest.WA and I pressed the button that says "Press me", it would give me an error

I did confirm my bearer token and storage account does work before I ran your application.
I checked the logs to see what happened and there was a 403 auth problem and the user-agent like said before was altered, which makes yours and my suspicion confirmed that Blazor does something with the request before it is sent to storage after it leaves the Azure.Storage.Blobs SDK.
I have a suspicion that the x-ms-client-request-id gets altered either before it gets sent to storage or returns back from blazor to the Azure.Storage.Blobs SDK and that's why in the SDK we throw a x-ms-client-request-id mismatch error because we did not receive back the x-ms-client-request-id we expected. This comes from the fact that the request is getting altered after leaving the Azure.Storage.Blobs SDK.
There's nothing we can fix in the Azure.Storage.Blobs SDK to fix this problem because we rely on the x-ms-client-request-id getting echoed back to confirm the request sent and received back was correct.
Please let me know if you have any other questions regarding the Azure.Storage.Blobs SDK.

Please reactivate if you are still hitting this issue.

I still see this issue with as basic code as
     var cnt = await new BlobClient(new Uri("https://pakrym0test0storage.blob.core.windows.net/myblobcontainer/10k.bin")).DownloadContentAsync();

I'm 99% sure it's related to browser caching because "Empty cache and hard refresh" works.

We need to disable this policy in the browser.

I'll take a look at trying to fix this in azure.core.


Add unique item property keyword.

@epoberezkin my second test is correctly failing, and it should fail, but when I change valid to false, like I believe it should be, it fails still and I'm not sure why.
Can you point me in the right direction?

Coverage remained the same at 100.0% when pulling 0388bfa2c28cd3afdd9d3cbabcf94ba27335372b on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

@blainesch can you change it to false so I can see it fail when it shouldn't? How can I say why it fails otherwise?
btw, the implementation of uniqueItems in Ajv can be helpful.

btw, the implementation of uniqueItems in Ajv can be helpful.

So a compile instead of validate ? I can try that :D

I pushed the change you were asking for.

Coverage decreased (-0.2%) to 99.82% when pulling 9ea05a0668bcb6ccf9ab2129a56e585734fd98a4 on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

https://runkit.com/esp/591f1ba7015d6e0012243737 - works here
maybe it's because you have two tests with the same name? not sure. You need to debug.

So a compile instead of validate ? I can try that :D

Yes, implementation can be more more efficient :) (three loops?), but what I meant was that you may find some ideas there and figure out why it's not working here :). Compile vs. validate won't make much difference as you don't need to manipulate the schema - just to iterate the keys...
A more important thing is that it probably should check deep equality rather than by reference, in the same way uniqueItems is specified. If it were to be added to the spec it would definitely be deep equality. Ajv has "equal" function inside (for performance reasons - it's faster than all the libs I saw, probably should be extracted), not sure what is the better way to do here.

Looks like I needed to define it in spec/schema-tests.spec.js. It's a wip right now, I'll add some more tests and look into deepEqual as a test case.

Coverage remained the same at 100.0% when pulling c0b5e9b9932f7176495685c76e8d6105a1f6b345 on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

right, it simply wasn't added to the instance

Coverage remained the same at 100.0% when pulling 6801b0e56b6e1e3e5d1355a644d73ff4b551aa26 on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

So if you use compile, it will be passed schema (keys), parentSchema and schema compilation context (it). There is it.util. I suggest exposing equal that Ajv uses there (needs change in Ajv) so you can use it.util.equal consistently in the implementations (it is used by enum, constant and uniqueItems).

Coverage remained the same at 100.0% when pulling b23dc1a30c2fef37195194128139c59545786bff on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

Sweet, how's that? :D

@epoberezkin any update?

@blainesch I didn't realise it's finished. Can you add a section in readme please?

Yeah give me a few minutes [:

Coverage remained the same at 100.0% when pulling f9a4dfb1ac0194212256ac44456914a584b2ea01 on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

Coverage remained the same at 100.0% when pulling edc78d524c12f811e1443ff43765c842f0ce1102 on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

Coverage remained the same at 100.0% when pulling edc78d524c12f811e1443ff43765c842f0ce1102 on blainesch:feature/unique-item-properties into ff2c769f52184e93b05e75244f639f5a864d4f1a on epoberezkin:master.

Thanks!


A feature idea for source code collector

This is more of an idea for the stash collector. If we can show the LOC per user, per language , it would be a good metric to take decisions.

Latest API's are more data rich. We will look into enhancing code repo widget with a lot more data. Closing this for now. Will open a new one after grooming.