🐛 [firebase_messaging 8.0.0-dev.8] iOS notification not working

Bug report
I have migrated from v7.0.3 and have successfully fixed the bug in android where the app will crash whenever a push notification is sent when the app is terminated (push notification doesn't show as well if app is terminated).
There was also a bug in iOS on v7.0.3 where the push notification will only show up when the app is foreground. If the push notification is sent while the app is on background or is terminated, it will only shop up once the app is opened (foreground) again.
Hoping to fix the issues above, I migrated to v8, and successfully fixed all notification bugs in android. However, upon testing on iOS, no notification is being received at all.
Steps to reproduce
Steps to reproduce the behavior:

Get the firebase token
Send a notification via FCM to the token
No notification received on iOS whether foreground, background, or terminated.

Expected behavior
Receive notification at any states (foreground/background/terminated).

Additional context
I have the following code on my main
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  Firebase.initializeApp();
}

initialized FirebaseMessaging
FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
initialized FirebaseMessaging listener
FirebaseMessaging.onMessage.listen(onMessage);
onMessage(RemoteMessage message) {
print('message received');
}

I also happen to get the following error when manually run via xcode
2020-11-23 07:31:03.422090+0800 Runner[86538:540112] 6.33.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
If I add the ff on AppDelegate.swift
import Firebase
FirebaseApp.configure()

the error is gone, but the app closes on open.

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B29 darwin-x64, locale
en-US)
• Flutter version 1.22.4 at /Users/rcksnts/sdk/flutter
• Framework revision 1aafb3a8b9 (9 days ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/rcksnts/sdk/android
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/rcksnts/sdk/android
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[!]
I see there's an open issue addressing the case you described https://github.com/FirebaseExtended/flutterfire/issues/4097.
Please follow up on that issue, I'm closing the current one as a duplicate.
If you disagree, please write in the comments and I will reopen it.
Thank you

Hi, i have tried with new version, firebase_messaging 8.0.0-dev.9, but still does not work for IOS.

I have the same issue with ios for firebase_messaging 8.0.0-dev.9


handle detach in client side

For #579
if it is an tty container, don't wait it exit when getting exitcode
Signed-off-by: Wang Xu<EMAIL_ADDRESS>

retest this please, hykins

LGTM


Is there a way to change the repository for quarkus.aws.devservices.localstack

We are trying to modify the localstack image that is being used but we are running into the dockerhub pull rate limits. Looking at the documentation I don't see a way to modify the localstack registry. Is there a way to do this? Please advise. Thanks.
quarkus.aws.devservices.localstack.image-name

Also, if we we're going to use the pro version or the AWS image it throws an error.
For example this line in the application.properties:
quarkus.aws.devservices.localstack.image-name=public.ecr.aws/localstack/localstack-pro:latest
Throws:
Caused by: java.lang.IllegalStateException: Failed to verify that image 'public.ecr.aws/localstack/localstack-pro:latest' is a compatible substitute for 'localstack/localstack'. This generally means that you are trying to use an image that Testcontainers has not been designed to use. If this is deliberate, and if you are confident that the image is compatible, you should declare compatibility in code using the `asCompatibleSubstituteFor` method. For example:
   DockerImageName myImage = DockerImageName.parse("public.ecr.aws/localstack/localstack-pro:latest").asCompatibleSubstituteFor("localstack/localstack");
and then use `myImage` instead.
        at org.testcontainers.utility.DockerImageName.assertCompatibleWith(DockerImageName.java:270)
        at org.testcontainers.containers.localstack.LocalStackContainer.<init>(LocalStackContainer.java:93)

For the substitution of the registry, you should be able to use one of the testcontainers solution to prefix the image name automatically.
For eg. in src/test/resources/testcontainers.properties
hub.image.name.prefix=public.ecr.aws/

For the change of image name, that's weird, we explicitly set the user provided image name as a compatible substitute for localstack/localstack and I can't reproduced your issue. Do you have a small repro ?
As a side note, I haven't a pro licence but you should be able to provide the licence key with the following config. Let me know if it works.
quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"=<you key>

Hi scrocquesel, thanks for the response.
Our repo is quite big. Here are some notes.
Changing the repo
When the src/test/resources/testcontainers.properties file is used it gets the repo changed using the following:
tinyimage.container.image=public.ecr.aws/docker/library/alpine\:latest
sshd.container.image=public.ecr.aws/senzing/sshd\:1.4.6
ryuk.container.image=public.ecr.aws/s4w6t4b6/testcontainers/ryuk\:0.4.0
localstack.container.image=public.ecr.aws/localstack/localstack\:2.0.2

Additionally, is possible to change the repo image on ~/.testcontainers.properties file. The only problem is that the change is local for each user.
Changing image name
The image settings inside application.properties is still giving the error as the post above when using the pro version, unless I use the regular image like this: quarkus.aws.devservices.localstack.image-name=localstack/localstack:2.0.2.
API key
I was not able to set the API key by using quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"=<you key>, it gives this error:
Caused by: java.lang.ExceptionInInitializerError at io.quarkus.runner.ApplicationImpl.<clinit>(Unknown Source)
Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value LOCALSTACK_API_KEY in property quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"

How it was possible to set the API key was by using quarkus.aws.devservices.localstack.container-properties.env.vars.localstack-api-key=${LOCALSTACK_API_KEY} in application.properties instead.
Also, I tried to set it in testcontainers.properties using localstack.container-properties."LOCALSTACK_API_KEY"=${LOCALSTACK_API_KEY} but it doesn't seem to get the value set.
Pro version
It was possible to download the Localstack pro version but it failed to boot because the API key is missing, this is expected because the container doesn't have the environment variable set. At the moment I haven't found the way to set any variable for testcontainers while booting up. Unless that testcontainers doesn't support the pro version.
How to setup

Create a file src/test/testcontainers.properties
Add the following:

tinyimage.container.image=public.ecr.aws/docker/library/alpine\:latest
sshd.container.image=public.ecr.aws/senzing/sshd\:1.4.6
ryuk.container.image=public.ecr.aws/s4w6t4b6/testcontainers/ryuk\:0.4.0
localstack.container.image=public.ecr.aws/localstack/localstack\:2.0.2

Add this to application.properties if applies:
quarkus.aws.devservices.localstack.container-properties.env.vars.localstack-api-key=${LOCALSTACK_API_KEY}

Thanks for your support

I have pushed a simple repro at https://github.com/scrocquesel/amazon-s3-testlocalstack-pro/blob/master/src/main/resources/application.properties
export LOCALSTACK_API_KEY=mykey
./mvnw test

It starts the container and fails as expected to boot. Container log shows
The API key you provided in the `LOCALSTACK_API_KEY` environment variable '"myk..."(5)' could not be activated against our licensing server. Server message: Unable to verify API key.

This is using extension version 2.0.1, but it works the same with 1.x.

I tried your test repository with our API key and it didn't worked.
Also, using the pro image is still failing with the following error,
[error]: Build step io.quarkus.amazon.common.deployment.DevServicesLocalStackProcessor#startLocalStackDevService threw an exception: java.lang.RuntimeException: java.lang.IllegalStateException: Failed to verify that image 'localstack/localstack-pro:2.1.1' is a compatible substitute for 'localstack/localstack'. This generally means that you are trying to use an image that Testcontainers has not been designed to use. If this is deliberate, and if you are confident that the image is compatible, you should declare compatibility in code using the `asCompatibleSubstituteFor` method. For example:
   DockerImageName myImage = DockerImageName.parse("localstack/localstack-pro:2.1.1").asCompatibleSubstituteFor("localstack/localstack");
and then use `myImage` instead.

And the the line quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"=${LOCALSTACK_API_KEY} throws an error, the key has to be explicitly written:
Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value LOCALSTACK_API_KEY in property quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"

The regular image is still works.

I tried your test repository with our API key and it didn't worked.
Also, using the pro image is still failing with the following error,
[error]: Build step io.quarkus.amazon.common.deployment.DevServicesLocalStackProcessor#startLocalStackDevService threw an exception: java.lang.RuntimeException: java.lang.IllegalStateException: Failed to verify that image 'localstack/localstack-pro:2.1.1' is a compatible substitute for 'localstack/localstack'. This generally means that you are trying to use an image that Testcontainers has not been designed to use. If this is deliberate, and if you are confident that the image is compatible, you should declare compatibility in code using the `asCompatibleSubstituteFor` method. For example:
   DockerImageName myImage = DockerImageName.parse("localstack/localstack-pro:2.1.1").asCompatibleSubstituteFor("localstack/localstack");
and then use `myImage` instead.

And the the line quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"=${LOCALSTACK_API_KEY} throws an error, the key has to be explicitly written:
Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value LOCALSTACK_API_KEY in property quarkus.aws.devservices.localstack.container-properties."LOCALSTACK_API_KEY"

The regular image is still works.

I guess you have something wrong in your environment. I run a CI/CD and it works. See https://github.com/scrocquesel/amazon-s3-testlocalstack-pro/actions/runs/4903028460/jobs/8755226610#step:4:2364
Maybe try to clear you maven repository cache.


[Question] About exporting workflows with sub-workflows

**Steps to reproduce the behavior: **
exporting workflows with sub-workflows
Describe the question
The same workflow named wcl_dwh has sub-workflows in different dolphinscheduler clusters. After the old cluster is imported, the workflow and sub-workflow are normal, but there is no sub-workflow after the new cluster is imported, and the sub-child nodes are abnormal. And when exporting, the child workflow is not selected and only the parent workflow is exported.
Which version of DolphinScheduler:
-[1.3.2]
Old cluster：

New cluster：

Additional context:
Is it necessary to select and export the sub-workflows together when exporting a workflow with sub-workflows?

It seems that this will not happen if you import the child workflow first and then import the parent workflow


I18n translate

resolves #37

Reviewed 10 of 61 files at r1.
Review status: 9 of 52 files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

Reviewed 16 of 61 files at r1.
Review status: 25 of 52 files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

Reviewed 6 of 61 files at r1.
Review status: 31 of 52 files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

Reviewed 14 of 61 files at r1.
Review status: 40 of 52 files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

Reviewed 15 of 61 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io


Remove cloud-init flag from the Anexia provider

What this PR does / why we need it:
I was asked to remove this flag since internal changes in Anexia now make this flag counter productive.
Which issue(s) this PR fixes (optional, in fixes #<issue number> format, will close the issue(s) when PR gets merged):
None
Special notes for your reviewer:
None
Optional Release Note:
NONE

/pull-machine-controller-e2e-anexia

/test pull-machine-controller-e2e-anexia

/test pull-machine-controller-e2e-anexia

/test pull-machine-controller-e2e-anexia

Seems Anexia is constantly failing, let's in the VM log what's going on there.

/test pull-machine-controller-e2e-anexia

/test pull-machine-controller-e2e-anexia

@eqrx It looks like Anexia service is not stable:
received error from api: {Code:503 Message:Service Unavailable: Something went wrong. Please contact support. Validation:map[]} occurred

I would suggest you create those machines via the api first and then try again :)

/approve
/lgtm

/retest

/retest

/retest

@moadqassem any idea why the hetzner tests fail?

@moadqassem any idea why the hetzner tests fail?

I will take a look

/retest

/retest

@eqrx It looks like there are some issues for Hetzner regarding terraform scripts that were updated. Please rebase against the master and hopefully this PR will pass :)

/lgtm cancel

/retest

@moadqassem still broken

/retest

@xmudrii @kron4eg could you guys help here?

/retest

/override pull-machine-controller-e2e-hetzner
Overriding because Hetzner's API is so slow sometimes (requests can range anywhere from 0.1 to over 60 seconds!) that the kube-apiserver simply gives up waiting for the MC webhook to validate MachineDeployments, leading to test failures.


[#4374] feat(client): Add owner operations for client

What changes were proposed in this pull request?
Add owner operations for client
Why are the changes needed?
Fix: #4374
Does this PR introduce any user-facing change?
I will add the document later.
How was this patch tested?
Add UTS.

hi @yuqi1129
Do you have more other comments?

hi @yuqi1129 Do you have more other comments?

I checked it and have no further comments on it.


I got an OOM error in a gan model.

Hello everyone,
I'm working on images. I made a gan model with keras to work on these images but i got an OOM error on the generative part.
I tried to reduce the batch (until 1) i reduced the images size too, i also reduced the numbers of layers of my model but i always got this error. I thought the function predict ignored the batch size, so i tried to put only 10 images in my files (size of one image = (400,500,3)) and also try the function predict_on_batch but same.
When i look at the summarize of the generative model i see 31k parameters, this is nothing.
i also launched my code on an aws instance with 8 gpu and 480 gigas of ram (lol) i got the error too ...
Do you have any idea why ?
Here is the (reduced) generator model :

And here the part of the train wich get an error :
`def train(epochs, batch_size, input_dir_low_res, input_dir_high_res):
   temps_debut = time.time()
   images_high_res = glob.glob(input_dir_high_res)
   images_low_res = glob.glob(input_dir_low_res)

   t = len(images_high_res)

  im_hr = plt.imread(images_high_res[0])
  n1,m1,c1 = np.shape(im_hr)
  image_shape_hr = (n1,m1,c1)

  im_lr = plt.imread(images_low_res[0])
  n2,m2,c2 = np.shape(im_lr)
  image_shape_lr = (n2,m2,c2)

  generator = Generator(image_shape_lr).generator() #build_generator(image_shape_lr, nombre_blocks
  = 16, plot = 1)

  discriminator = Discriminator(image_shape_hr).discriminator()

  optimizer = get_optimizer()
  generator.compile(loss='mse', optimizer=optimizer)
  discriminator.compile(loss="binary_crossentropy", optimizer=optimizer)

  gan = get_gan_network(discriminator, image_shape_hr, generator, optimizer, 'mse')

  batch_count = int(t / batch_size)

  for e in range(1, epochs+1):
     print ('-'*15, 'Epoch %d' % e, '-'*15)
     for _ in tqdm(range(batch_count)):
       rand_nums = np.random.randint(0, t, size=batch_size)
       image_batch_hr = load_data(images_high_res,rand_nums)
       image_batch_hr = (image_batch_hr.astype(np.float32) - 127.5)/127.5

       image_batch_lr = load_data(images_low_res,rand_nums)
       image_batch_lr = (image_batch_lr.astype(np.float32) - 127.5)/127.5

       generated_images_sr = generator.predict_on_batch(image_batch_lr)`

The error is on the last line

Please fix formatting of code block. Make sure there are 3 backticks on each side of the code and that on the first one you have labelled it python. Example here. Little hard to read/help otherwise. Thanks!

Howdy, maybe your batchsize is too big and try to reduce batchsize.


Object marker doesn't work on sulphur vents

Please check if your issue is not a duplicate by searching existing issues
Describe the bug
A clear and concise description of what the bug is.
Object marker doesn't work on sulphur vents
To Reproduce
have object marker on -> rightclick on sulphur vent by e.g. inferno bank -> doesn't mark it
Expected behavior
should mark it
Environment (please complete the following information):
didn't work on either ubuntu 18.04 or windows

Added in https://github.com/runelite/runelite/commit/ad5514acdefe657b31326c2f6776c66884daf060


Home: Update background image on search bar

The system map image in the background of the search bar needs to be updated. The line names are pre-2020 and routes/stations are are missing the K Line and Regional Connector updates. Please replace the current image with this one:
https://uc26beceb2e1aa705ca9c099d827.dl.dropboxusercontent.com/cd/0/inline2/CF9heMXmw4w4lhRgqaiykRIdajHIUwphyHkIpeoz3mS3mxzNGukJrW835wMLaFOn2cG-HG1ZCEqL0PhLqa0hK6-wbWifRdS4zhN_ZlgIMy8pbl71Twebw_2k85qDS-zpLmST7P2whZV6AJFxnpnNk812w1Qen5hoLhpmfcZa22fCz5k98UL3tNuNKvWNhU7jo4cP-9xwfJUIxa_t5IlteHhNQD7H6_V7grrIObnBZg64zGk0ZfwNzQNkBUyjg8VTsi2Lqcd5ZUbQnoqQcF1_t0Td5vJhXKn5kd3DmJI5q0Ri0aQIiETrsk0oeRxqmbb3gkhJprasRM1eE4PulO8vwWUO5Y9-LCAqmm3iCzdYZgoZ7wG4Wots5LLBUwdJFue6VXU/file

@shrayshray Can do! It looks like this link is broken for me, would you happen to have another? Or maybe sharing isn't enabled?

@xmedr Sorry the direct link didn't work - it's the 3rd item under "Over Maps" on this page: https://www.metro.net/riding/guide/system-maps/ "Rail and Busway (Go Metro) Map"


Can't find gitignored files even when 'Exclude VCS Ignored Paths' is unchecked

Any gitignored files don't show up in the file tree.

Found the issue.  The file tree has it's own setting as explained here: https://github.com/atom/atom/issues/5423.
Can you phrase the 'Exclude VCS Ignored Paths' setting differently to be more explicit about what those paths will be excluded from?
Example:
'Exclude VCS Ignored Paths From Search Index'.  That way people don't expect it to apply to the file tree as well.
Thanks!

I agree; it's very confusing!
#8276 gets to the crux of the issue (that it's a design fault), so maybe worth closing this and continuing there.

Thanks @hypnoboutique.


Internal problem

Description
What steps will reproduce the problem?

This error comes up whenever I type something other than a print function.
Does anyone know how to fix it??
 Thank you
What is the explanation for the internal problem in the newer version of it?

We had to do some small breaking changes in one of our dependencies (Qtconsole), but we didn't have an upper constraint on it before Spyder 5.2.0. Unfortunately, the latest Anaconda version didn't come with the latest Spyder available at the time, but it came with the latest Qtconsole, which created this ugly mess.
We informed the Anaconda team about the problem a few weeks after it was reported, but they took like two months to update Spyder and hasn't released a new Anaconda version yet that will fix it. Sorry for the inconvenience, but it's really out of our hands.

Thank you for the explanation.
Despite it having taken a while for me to find out how to fix it, the advice provided was helpful, and easy to implement


Fake backends do not allow noisy simulation of circuits with if_else

Environment

Qiskit Terra version:  latest
Python version:
Operating system:

What is happening?
The following errors:

qc = QuantumCircuit(1, 1)
with qc.if_test((0, 0)):
    qc.x(0)

sim = FakeHanoi()
trans_qc = transpile(qc, sim)

with the error:
TranspilerError: "Unable to map source basis {('x', 1), ('if_else', 1)} to target basis {'reset', 'x', 'id', 'rz', 'measure', 'cx', 'barrier', 'snapshot', 'delay', 'sx'} over library <qiskit.circuit.equivalence.EquivalenceLibrary object at 0x10f5fd450>."
However it works when transpiling against the real version.
How can we reproduce the issue?
Run above
What should happen?
Ideally should be able to do noisy simulations of dynamic circuits.  Note that I cannot use AerSimulator.from_backend(backend) because Aer does not support V2 backends,
Any suggestions?
No response

This is because the snapshots used for the fake backends do not contain the control flow instructions so the compiler doesn't know that if_else is a valid operation on the fake backend. When backends start reporting if_else and other control flow ops we can update the snapshots in the fake backends to pull those new instructions in. In the meantime you can manually add the control flow operations to the target manually like:

from qiskit import *
from qiskit.providers import fake_provider
from qiskit.circuit.controlflow import IfElseOp, WhileLoopOp, ForLoopOp

backend = fake_provider.FakeHanoiV2()
backend.target.add_instruction(IfElseOp, name='if_else')
backend.target.add_instruction(WhileLoopOp, name='while_loop')
backend.target.add_instruction(ForLoopOp, name='for_loop')

qc = QuantumCircuit(1, 1)
with qc.if_test((0, 0)):
    qc.x(0)
qc.measure(0, 0)

trans_qc = transpile(qc, backend)
print(backend.run(trans_qc).result().get_counts())

that runs fine for me locally with aer installed (it printed {'0': 12, '1': 1012}).


Edit file only on remote without local download

Is it possible to edit and save a file without downloading it? (maybe downloading it to a hidden temp folder, uploading when saving, and deleting when closing?)

Yeah, this extension will be complete for me when this happens. Many cases where wp-config.php needs to only be changed on the server side for many reasons. If it overwrites my local file I lose my DB connection info etc...

+1 on this. At the very least it would be nice to avoid having a trail of remote edited files accumulating locally.

This is the default Remote-FTP workflow (to download everything in the local project)...
But someone could implement a right click option like "edit only on remote" for files in the remote tree view which uses a tmp file on the local end.

@jpxd I would take it a step further and make it either a global or per-project setting to allow only temp local files to be used (edit only on remote), rather than forcing the user to always make multiple clicks as you described if that user wanted it to never persist locally.

What a wonderful idea! I've been thinking about the same thing myself. This would allow us to keep our local project folder non-cluttered.


include the name of the missing object in release uninstall error

Enhance the error message returned by tiller when one or more objects were not found while deleting a release. Closes #4616.

Oh, yes please. 👍


Fix #3914: Disable IR checker in fastOptJS

To do this, we switch the default to false again.

@sjrd WDYT? I'm not sure when the right time is for this. But we also don't want everybody to pay the performance penalty.

I think we should wait until a significant set of libraries have upgraded, so that we are reasonably sure that we caught the remaining issues, and that we're not publishing jars with invalid IR.

@sjrd I propose to merge this post the v1.1.0 cut. WDYT?

Yes, that will probably be a good time. :)

Rebased.
I have thought about two alternatives to this:

Leave the default to true only set it to false in fastOptJS.
Always IR check in the first run of a linker.

IMO this PR is still the best option.


[TX-Builder] Use separated inputs for ABI and address

Overview
Currently the UX with unified field in TX-Builder for ABI and address can be quite confusing. Some users told us that they feel confused wether it makes sense to set an ABI or an address and in which cases one would make sense over the other one. Also once the user inputs an address we show a sencond address input where most of the times the same address has to be added there
Goals
Create a better UX, separating ABI and address inputs. The address input will be also used as the to address. When adding an address if the ABI field is empty we will check if we can automatically fetch the ABI.
Before overwritting an existing ABI we should ask the user if they want to replace the ABI
In case we detect the address is an EOA we should disable the ABI field messaging the user that is not necessary to fill it. This can be done with web3 eth_getCode. If 0x is returned no smart contract is deployed in that address
https://web3js.readthedocs.io/en/v1.7.0/web3-eth.html#getcode
Requirements
Screens

Figma:
https://www.figma.com/proto/G7snLqBXWNPANcOj5MhiR7/Transaction-Builder?page-id=1%3A2&node-id=55%3A17805&viewport=241%2C48%2C0.12&scaling=min-zoom&starting-point-node-id=55%3A16961

In the first screen from the redesigns perhaps we should only show the address and abi inputs because until the contract is retrieved or the abi entered we really don't know the methods. What do you think?
If you want to show all the fields then we can disable the methods and the ETH value ones until a proper contract is entered
@liliiaorlenko @dasanra


Search filter issues

[ ] Make filter text & button clickable & use cursor: pointer;, maybe set an aria role to help
[ ] Add hover states where possible, using zeplin as a reference
[ ] Escape key to close filter and submit the form
[ ] Wrap checkboxes in a <fieldset> if possible
[ ] Ensure everything is tab-navigable

@bwhicks is our star tester for this one ⭐

https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/listbox/listbox.html


Add GNU/kFreeBSD support

This depends on https://github.com/neutrinolabs/xorgxrdp/pull/65 and https://github.com/neutrinolabs/librfxcodec/pull/14 however.
I’ve tested this with Debian (compile test only).

+1

+1

My change I'm trying to make will conflict with this. Let's merge this first.


Help with issues authenticating with laravel 5.1

Hi,
I'm a complete new comer to laravel and I've decided after much googling to use Adldap as my auth driver.
I'm using username rather than email and have reflected the changes in the adldap_auth.php, login form and in the User model. I have also overriden the protected username in the AuthController.
I am using the default methods auth methods (I have no getLogin / postLogin) overridden in my AuthController.
In my login.blade.php, I can {{dd(\Adlap::authenticate('username','password')}} substituting username and password for real values. and this returns 'true'.
When I go to log on though I always get the error message:
Whoops! Something went wrong!
These credentials do not match our records.
Is there some way I can debug what's going on?
AuthController.php:

namespace App\Http\Controllers\Auth;

use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Socialite;
use Auth;
use Adldap\Adldap;

class AuthController extends Controller
{

    /*
    |--------------------------------------------------------------------------
    | Registration & Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles the registration of new users, as well as the
    | authentication of existing users. By default, this controller uses
    | a simple trait to add these behaviors. Why don't you explore it?
    |
    */

    use AuthenticatesAndRegistersUsers, ThrottlesLogins;

    protected $redirectPath = '/apps';
    protected $loginPath = '/auth/login';
    protected $username = 'username';

    /**
     * Create a new authentication controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest', ['except' => 'getLogout']);
    }

    /**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'username' => 'required|max:255|unique:users',
            'password' => 'required|min:6',
        ]);
    }

    /**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return User
     */
    protected function create(array $data)
    {
        return User::create([
            'username' => $data['username'],
            'password' => bcrypt($data['password']),
        ]);
    }

  }```

login.blade.php
```@extends('master')

@section('content')

Log in to Launchpad:

{!! Form::open(['url' => '/auth/login']) !!}

 {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => 'Username']) !!}

 {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password']) !!}

 {!! Form::label('remember', 'Remember me?') !!}
 {!! Form::checkbox('remember', null, ['class' => 'form-control']) !!}

 {!! Form::submit('Logon', ['class' => 'form-control btn btn-primary']) !!}

{!! Form::close() !!}

@stop```

User.php
```protected $fillable = ['username', 'password'];```

Do you have debug enabled (APP_DEBUG=true in your .env)? Because normally "Whoops! Something went wrong!" is followed by some more useful information about the exception that's been thrown.
By the way, the three tildes need to be on their own lines for GH syntax highlighting to work.

@samwilson Thanks for that.
I spent hours trying to find out what was wrong. In the end under vendor/adldap2/src/Connections/Ldap.php
I changed
protected $suppressErrors = true;

to
protected $suppressErrors = false;

which gave me the additional debug info I was looking for.  Turns out the form had a remember_token which wasn't able to be inserted into the database!
Thanks for your help.

Thanks @samwilson for helping with the issue :).
Also you can display LDAP errors by calling Adldap::getConnection()->showErrors().


Timed out fetching a new connection from the pool

Bug description
After running my application for around 1-2 days, I start getting the following error:
prisma:client Error: Timed out fetching a new connection from the pool. Please consider reducing the number of requests or increasing the `connection_limit` parameter (https://www.prisma.io/docs/concepts/components/prisma-client/connection-management#connection-pool). Current limit: 10.

The same happened before with a connection limit of 3. Raising it to 10 seemed to have no effect.
After the error occurs once, no query will succeed anymore, the error will be thrown on any query and the application requires a restart (prisma will never recover from the error).
I checked whether the database has an issue, but it is working fine.
SHOW PROCESSLIST shows that no connection is actually established.
How to reproduce
I have not found a way to reliably reproduce this yet. I always need to wait 1-2 days until the error randomly appears.
I am running my application in debug mode with DEBUG=* for the last days, so if you need any additional information, I can look it up in the logs.
Expected behavior
No response
Prisma information
generator client {
    provider        = "prisma-client-js"
    binaryTargets   = ["native"]
}

datasource db {
    provider = "mysql"
    url      = env("DATABASE_URL")
}

I can't post my complete prisma schema here.
It doesn't matter which queries are run, all of them fail with the same error.
Environment & setup

OS: Linux (official node:14 docker image)
Database: MySQL 8.0
Node.js version: 14

Prisma Version
prisma               : 2.21.2
@prisma/client       : 2.21.2
Current platform     : darwin
Query Engine         : query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/prisma/node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/prisma/node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/prisma/node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt e421996c87d5f3c8f7eeadd502d4ad402c89464d (at node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : e421996c87d5f3c8f7eeadd502d4ad402c89464d
Studio               : 0.371.0

I upgraded to prisma 2.23.0 and now have a production instance running in debug mode with the latest version.
When the issue occurs again, I will let you know.

Hey @P4sca1
I will wait for your reply here :)
Looks like something which won't be easy to reproduce but we will figure it out.

I did not yet see the issue again after upgrading. But this might also be related to the fact that we optimized our daily database backup job to no longer eat up all the memory and make the database server unresponsive for a few minutes in the night.
I believe what happened is that prisma timed out fetching connections because the datbase server was overwhelmed by the backup job. However for some reason after the database server got responsive again, prisma never recovered.

I am going to close this. Without a reproduction this is unactionable.

Can you give us some additional information about that backup job @P4sca1? We might want to try to reproduce this as it is probably a quite common thing to happen - and Prisma should work well with that during that time.

There is a backup job running every night, which generates a database dump using mysqldump and then uploads it along with other files to a backup server. This uses restic, which is known to have a very high memory consumption during backups: https://github.com/restic/restic/issues/1988
This caused the server to have no free memory during the time of the backup. I can't say for sure, but my guess is that that was causing the Prisma connection timeouts and for some reason Prisma was not able to fetch new connections after the backup was done.

Ok, so filling up memory while running queries would be a viable reproduction attempt here.

The problem occured again and after further digging into metrics and logs, I am quite sure that this is not an issue with prisma, but with my web server running out of memory.

Thanks so much for the update @P4sca1.
Prisma of course has a direct effect via our memory usage, so we will definitely investigate at some point in the future and find ways to manage the memory usage better. Right now it seems to be more of a uncommon problem, so we will probably prioritize other issues like features or bugs. But in the future we will be able to look at this issue again and take it into consideration (added some labels to make sure we actually find it again).

The reason the server ran out of memory was again restic. I never had critical problems with prismas memory usage.
I decided to upscale the machine resources to have more memory. This should hopefully get rid of the issue.
Thank you for your help in trying to find a solution! :)

Backups are hard... Hope you get that fixed some time somehow. Until then, have fun with Prisma.

Sadly, the issue started to arise again today at 08:23 EST. This time there was no backup running and the machine resources were not maxed out.
Web server:

Database server:

I can login to the database and issue the SHOW PROCESSLIST command without a problem. It shows that no (0) connections are established from my prisma application.
Still the prisma application throws Timed out fetching a connection from the pool.

This is the amount of times prisma logged Fetched a connection from the pool:

I still can't tell what's causing this and it seems to be really hard to debug. Would love to provide more info, but that's all I have for now.
I would expect Prisma to be able to fetch a connection when there are 0 connections currently open to the database. My guess is that there are some kind of broken connections in the Prisma pool, which prevent new connections from being made. But that's just a random thought without having detailed knowledge about the Prisma architecture.

As before, simply restarting the Prisma application resolved the problem.

Meh. What is your current connect_timeout and pool_timeout configuration when this happened? Do you by chance have some logs from the app using Prisma from when this happened?

Meh. What is your current connect_timeout and pool_timeout configuration when this happened? Do you by chance have some logs from the app using Prisma from when this happened?

I have not changed both values, so connect_timeout should be 5 and pool_timeout should have a value of 10.
I was wrong when I said that the issue has nothing to do with the backup job. The graph I posted only showed the last hour, even though the last 12 hours of logs were processed.
Here is a correct graph counting the amount of "Timed out fetching..." logs from the last 12 hours.

The first spike is at 3am, then at 4am and 5 am (the hourly backup).
Even after load is back to normal at the database server, Prisma keeps timing out trying to fetch a connection.
A possible reproduction might be to put the database server under load (cpu and memory using some stress tester) until a timeout occurs in the Prisma app and then remove the load from the database server and see if Prisma is still timing out.

I've been experiencing this as well. We get a temporary spike in requests to our app servers that increases memory and cpu near 100% for a short time. Prisma then seems to get stuck in a state of every query failing to fetch a connection and never recovers, even as cpu and memory usage drop. Restarting the servers returns things to normal. Wondering if https://github.com/prisma/prisma/issues/9584 is related since both seem to involve the client connections getting stuck in particular failure states.

That's a very good pointer @TLadd, and very possible. #9584 is on our list to reproduce very soon (And sounds much easier to reproduce than your other, spike related case), so hopefully we understand and fix that one soon - and might possibly also get rid of this one along the way.

Any update on this issue?
We experiencing the same. We have 2 prod servers that connect to 1 DB server.
Randomly one of the serves get
Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 10, connection limit: 5)
{"level":50,"time":1641985745165,"pid":143287,"hostname":"wf-prod-1","code":"P2024","clientVersion":"3.6.0","meta":{"connection_limit":5,"timeout":10}

After getting the error, every further request fails. And the prismaClient does not seem to recover at any time.
The other server remains stable.
A restart of the affected server solves the issue directly. But it can not be the solution to restart the server each time.

We actually have a reproduction now (essentially load spike or resource constraint with specific parameters) and are working on understanding the problem (non surprisingly something with the connection pool) and hopefully fixing it (no ETA - but if you are able to somehow reproduce this, we are looking for testers of our fixes of course).
Some related issues:
https://github.com/prisma/prisma/issues/11868
https://github.com/prisma/prisma-private/issues/160 (private with reproduction)

We've been experiencing a similar issue (v3.9.2); after a day or two, all connections are rejected with the Timed out fetching new connection issue. The pool never recovers; a restart is necessary. Meanwhile, the actual underlying PSQL connections are all unused and available for queries.
Our issue may more closely match #11868, since there is no noticeable resource spike leading to the connection issue. We do execute a lot of queries in parallel, which seems to match the described behavior in that ticket. We'll try serializing the queries and seeing if that changes anything.

As mentioned above we are working on fixing this.
In the meantime, here is a possible temporary workaround you can try:
Prisma offers a Client method to "disconnect" the current Engine from the Client: prisma.$disconnect(). By calling that method, we had good results in having Prisma Client internally "restart" the connection pool which allows you to avoid the restart of your application or server.
We realize that this is not a long term solution for the problem of course, but hope it can work as a temporary workaround to unblock you. We'll update this issue when we are closer to a real solution.

@garrensmith Not sure if https://github.com/prisma/prisma/pull/12066 fixes this as well?

This is fixed. The full information can be found here https://github.com/importcjj/mobc/issues/63
This will be out in the next release. You can test it now with prisma@dev

Hello,
We are experiencing the same problem as described in this issue.

A default connection pool size based on the number of number of CPUs (default value is 21 in my case)
No spike in CPU or memory when the problem occurs
A restart of prisma fixed the issue

The application is used in production and there are not too much workloads but we can't figure out :

why this issue occured
how to detect it with a supervision tool or something like this
how to fixed it

We see that there's something involving mobc but don't know how to implement it.
The application is a backend API developed with NestJS.
Could someone give us a hint please ?
Thanks

Please open a new issue @w8ze-devel and provide all the information the bug issue template asks for. We are happy to jump into that and try to figure out - but we usually can not do that in closes issues where x other people are pinged on each response, I hope you understand. Thanks.

I encountered this error while using a VPN (specifically ProtonVPN). It seems that either Vercel is blocking the VPN's IP, or there's an issue when using a VPN locally.
The problem was resolved for me by simply disconnecting from the VPN.

Still have the same error we need to figure a workaround

same here, @w8ze-devel did you find any solution?

I'm experiencing the same. Hoping to see a solution soon.

Everyone posting here: Please open a new issue or discussion and provide all the information the template asks for. We will not be able to help otherwise, as this is not a single bug or problem, but dependent on your individual situation.


scroll event

Hi, great lib you have here :) Thanks for this. I have some question on scroll event.  The scroll event fires even the element is not visible on viewport(center of screen)?

Hi, we launched AniJS Studio on KickStarter, that allow to designers and programmers add animations and interactions for Web pages in an easy and intuitive way. Please, take a look at the project and if you find it interesting or simply want to help us, you can make a small donation. I would be grateful, Greetings Dariel


Also print the actual expression whose value is being printed

The https://github.com/gruns/icecream lib has an useful feature where it also prints the expression. Please see the following example:
d = {'key': {1: 'one'}}
ic(d['key'][1])

class klass():
    attr = 'yep'
ic(klass.attr)

It prints:
ic| d['key'][1]: 'one'
ic| klass.attr: 'yep'

As you can see icecream lib also prints the expression d['key'][1]. Is it possible to add this feature? This is the only feature holding me back from switching to objprint.

This is doable with some black magic. But I'm a bit hesitated to make the default behavior of objprint print metadata, like the full expression of the variable printed.
As an example, you can set line_number=True to print the line number and the caller function of the print. Would you consider using argument like this to achieve what you want?
Just as a reminder, you can set the configuration globally by op.config(line_number=True) .
The other option is to change the behavior of objprint(or op, they are the same thing), but keep objstr and add_objprint as they are probably used in a more delicate case.
Would you mind sharing your thought on this?

Thanks for quick response.
I use the line_number=True option and it's very helpful. But sometimes printing the expression itself on terminal or log saves me a round-trip to the editor and finding that line of code. I think you can add a config option print_expression=True and set the default to False similar to line_number=True. I thinkit's the best option.

Hi @riyadparvez . I added the feature requested. You can use arg_name=True to print the expression. Although it's not released yet. You can use the git master version, or wait for the feature to release. Let me know if you need anything else!


Upgrade the SnakeYAML library version to 2.2 in order to ensure compatibility with Spring Boot version 3.2.3.

… library, specifying that version 2.2 or later is needed.
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
Spring Boot version 3.2.3 has a minimum requirement for the SnakeYAML library, specifying that version 2.2 or later is needed.
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[ ] Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.liuyuntao seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Token acquisition fails when connecting to azure us gov Entra

Discussed in https://github.com/Yvand/EntraCP/discussions/244

Originally posted by RichCasale April  5, 2024
I have the latest version of EntraCP deployed on SharePoint SE (January CU) running on windows server 2022.  When I try and add my tenant configuration and I choose Azure US Government and the client secret I get a ULS error message...
Token Acquisition (1004) failed.  Host: login.microsoftonline.com.
...and another entry which states my Entra domain name cannot be found and to make sure I am signing into the correct cloud.  Even if I assign the tenant using PowerShell it still fails with the same message.  I am certain that my client secret works and I have run all the troubleshooting tests and they all pass when I use login.microsoft.us versus login.microsoft.com.
Is this a known issue or is there different set of commands that I need to use to get this to work.  This is a critical path component to a project I am working on for the gov so I would appreciate any help that can be sent my way.

@RichCasale I was not able to actually test to connect to a US tenant, because I don't have access to one.
Are you willing to allow me to try to connect to your tenant, so I can try this scenario?
If yes, I will send you my email to share the data privately

Unfortunately, I will not be able to provide access to our tenant since it’s is only available to customers of our internal backbone.  No external access is permitted.
I can share the following ULS log entries when I try to resolve a user.  (I changed our custom domain to our.tenant.gov).
04/05/2024 17:28:36.38                 w3wp.exe (0x3A2C)        0x22D4 EntraCP Azure Identity   1337       Medium                [EntraCP] LogMsalWarning False MSAL <IP_ADDRESS> MSAL.Desktop 4.8 or later Windows Server 2022 Datacenter [2024-04-05 17:28:36Z - c319b90a-04d3-4e72-937c-0b7db0b66bec] Request retry failed.
04/05/2024 17:28:36.38                 w3wp.exe (0x3A2C)        0x22D4 EntraCP Azure Identity   1337       High                [EntraCP] LogMsalError False MSAL <IP_ADDRESS> MSAL.Desktop 4.8 or later Windows Server 2022 Datacenter [2024-04-05 17:28:36Z - c319b90a-04d3-4e72-937c-0b7db0b66bec] === Token Acquisition (1004) failed.  Host: login.microsoftonline.com.
04/05/2024 17:28:36.38                 w3wp.exe (0x3A2C)        0x22D4 EntraCP Lookup 1337       Unexpected                [EntraCP] Unexpected error : Could not authenticate for tenant 'our.tenant.gov': MsalServiceException: AADSTS90002: Tenant 'our.tenant.gov' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant. Trace ID: e82a0b12-dcca-462e-b984-23c7e7df2600 Correlation ID: c319b90a-04d3-4e72-937c-0b7db0b66bec Timestamp: 2024-04-05 17:28:36Z
On your trouble shooting page you have this command:
Invoke-WebRequest -Uri https://login.microsoftonline.com -UseBasicParsing [-ProxyUseDefaultCredentials] [-Proxy http://<IP_ADDRESS>:8888]
This does not work from my tenant.  If I change the url to login.microsoftonlin.us, it works.
Also using this code block with my information works
$clientId = ""
$clientSecret = ""
$tenantName = ".onmicrosoft.com"
$headers = @{ "Content-Type" = "application/x-www-form-urlencoded" }
$body = "grant_type=client_credentials&client_id=$clientId&client_secret=$clientSecret&resource=https%3A//graph.microsoft.com/"
$response = Invoke-RestMethod https://login.microsoftonline.com/$tenantName/oauth2/token -Method "POST" -Headers $headers -Body $body [-ProxyUseDefaultCredentials] [-Proxy http://<IP_ADDRESS>:8888]
$response | ConvertTo-Json
This works correctly.  All the other test work correctly.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Monday, April 8, 2024 10:19 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
@RichCasalehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/RichCasale I was not able to actually test to connect to a US tenant, because I don't have access to one.
Are you willing to allow me to try to connect to your tenant, so I can try this scenario?
If yes, I will send you my email to share the data privately
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2042881227, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJLFDV7EEVFOG5HI763Y4KRN5AVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBSHA4DCMRSG4.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Good morning.  After walking through your code with one of our developers while testing the connection, we noticed something that may actually be the culprit for the issue.
The code behind (Yvand.EntraCP/Yvand.EntraClaimsProvider/Configuration/EntraIDTenant.cs) begins the test at line 258.  This falls into a function just above for InitializeAuthentication.  In reviewing the initialize function, I see the hardcoded value on line 254 for the scope to be “graph.microsoft.com”.
In the documentation Microsoft Graph national cloud deployments - Microsoft Graph | Microsoft Learnhttps://learn.microsoft.com/en-us/graph/deployments#microsoft-graph-and-graph-explorer-service-root-endpoints, it states that GCC High uses “graph.microsoft.us” (the blue “important” callout box below the table).
Neither of us have all the tool pieces in place to compile this application (at this time).  So, I suggested that Rich reach back out to the developer and have him update line 254 to reflect:
var scopes = new[] { “https://graph.microsoft.com/.default”, “https://graph.microsoft.us/.default” };
Would it be possible to get an updated build with the recommended changes?  I can download install and test and report back my finding.
Our testing concluded that it’s not related to login.microsoft.com vs .us, but rather verifying the access via the Graph call(s).

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Casale, Richard
Sent: Monday, April 8, 2024 12:35 PM
To: Yvand/EntraCP @.>; Yvand/EntraCP @.>
Cc: Mention @.***>
Subject: RE: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
Unfortunately, I will not be able to provide access to our tenant since it’s is only available to customers of our internal backbone.  No external access is permitted.
I can share the following ULS log entries when I try to resolve a user.  (I changed our custom domain to our.tenant.gov).
04/05/2024 17:28:36.38                 w3wp.exe (0x3A2C)        0x22D4 EntraCP Azure Identity   1337       Medium                [EntraCP] LogMsalWarning False MSAL <IP_ADDRESS> MSAL.Desktop 4.8 or later Windows Server 2022 Datacenter [2024-04-05 17:28:36Z - c319b90a-04d3-4e72-937c-0b7db0b66bec] Request retry failed.
04/05/2024 17:28:36.38                 w3wp.exe (0x3A2C)        0x22D4 EntraCP Azure Identity   1337       High                [EntraCP] LogMsalError False MSAL <IP_ADDRESS> MSAL.Desktop 4.8 or later Windows Server 2022 Datacenter [2024-04-05 17:28:36Z - c319b90a-04d3-4e72-937c-0b7db0b66bec] === Token Acquisition (1004) failed.  Host: login.microsoftonline.com.
04/05/2024 17:28:36.38                 w3wp.exe (0x3A2C)        0x22D4 EntraCP Lookup 1337       Unexpected                [EntraCP] Unexpected error : Could not authenticate for tenant 'our.tenant.gov': MsalServiceException: AADSTS90002: Tenant 'our.tenant.gov' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant. Trace ID: e82a0b12-dcca-462e-b984-23c7e7df2600 Correlation ID: c319b90a-04d3-4e72-937c-0b7db0b66bec Timestamp: 2024-04-05 17:28:36Z
On your trouble shooting page you have this command:
Invoke-WebRequest -Uri https://login.microsoftonline.com -UseBasicParsing [-ProxyUseDefaultCredentials] [-Proxy http://<IP_ADDRESS>:8888]
This does not work from my tenant.  If I change the url to login.microsoftonlin.us, it works.
Also using this code block with my information works
$clientId = ""
$clientSecret = ""
$tenantName = ".onmicrosoft.com"
$headers = @{ "Content-Type" = "application/x-www-form-urlencoded" }
$body = "grant_type=client_credentials&client_id=$clientId&client_secret=$clientSecret&resource=https%3A//graph.microsoft.com/"
$response = Invoke-RestMethod https://login.microsoftonline.com/$tenantName/oauth2/token -Method "POST" -Headers $headers -Body $body [-ProxyUseDefaultCredentials] [-Proxy http://<IP_ADDRESS>:8888]
$response | ConvertTo-Json
This works correctly.  All the other test work correctly.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Monday, April 8, 2024 10:19 AM
To: Yvand/EntraCP<EMAIL_ADDRESS>Cc: Casale, Richard<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
@RichCasalehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/RichCasale I was not able to actually test to connect to a US tenant, because I don't have access to one.
Are you willing to allow me to try to connect to your tenant, so I can try this scenario?
If yes, I will send you my email to share the data privately
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2042881227, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJLFDV7EEVFOG5HI763Y4KRN5AVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBSHA4DCMRSG4.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

@RichCasale thank you for sharing your analysis, this looks promising, and sorry for my late reply.
I will work on it asap, probably tomorrow, and update this thread.
Since I do not have access to a US Government, would you accept to test private builds of EntraCP (you should do that only on a test environment) and report the result?

No worries, I appreciate whatever attention you can provide.
We are only testing this in our lowest level environment for the time being so a one-off build would be fine for testing purposes.
Many thanks for your assistance on this.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Wednesday, April 10, 2024 9:47 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
@RichCasalehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/RichCasale thank you for sharing your analysis, this looks promising, and sorry for my late reply.
I will work on it asap, probably tomorrow, and update this thread.
Since I do not have access to a US Government, would you accept to test private builds of EntraCP (you should do that only on a test environment) and report the result?
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2047594851, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJI5GJT7LKL5MWJCFE3Y4U7DXAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBXGU4TIOBVGE.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

@RichCasale I opened PR https://github.com/Yvand/EntraCP/pull/246 for this issue, and I just published a nightly build that you can test in your environment.
To update your farm, please follow this article.
To set the authority for an existing tenant, you can use PowerShell:
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings
# For a global tenant:
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri ("https://login.microsoftonline.com/")
# For a US-gov tenant:
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri ("https://login.microsoftonline.us/")
$config.ApplySettings($settings, $true)

The PR adds a new message in the log shows explicitly what authority / scope is used:
04/11/2024 09:58:40.00	powershell.exe (0x10C4)	0x20E4	EntraCP	Configuration	1337	High	[EntraCP] Initialized authentication for tenant "XXX.onmicrosoft.com" with authority "https://login.microsoftonline.com/" and scope "https://graph.microsoft.com/.default" .	5d832b90-b879-0001-c2a2-a7b0db8bda01
04/11/2024 09:58:40.00	powershell.exe (0x10C4)	0x20E4	EntraCP	Configuration	1337	High	[EntraCP] Initialized authentication for tenant "YYY.onmicrosoft.com" with authority "https://login.chinacloudapi.cn/" and scope "https://microsoftgraph.chinacloudapi.cn/.default" .	5d832b90-b879-0001-c2a2-a7b0db8bda01

If you want to call EntraCP directly using PowerShell, instead of the people picker, you can use this PowerShell script:
Add-Type -AssemblyName ('Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c')
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$claimsProvider = New-Object Yvand.EntraClaimsProvider.EntraCP ("EntraCP")
$inputStr = "testEntraCPUser_001"
$context = New-Object System.Uri ("<SP WEB APP URL>")
[string[]] $entityTypes = @("User", "FormsRole")
$claimsProvider.Search($context, $entityTypes, $inputStr, $null, 30)

Awesome thank you.  I will get this deployed shortly and let you know the results.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Thursday, April 11, 2024 5:12 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
@RichCasalehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/RichCasale I opened PR #246https://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/pull/246 for this issue, and I just published a nightly buildhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/releases/tag/nightly that you can test in your environment.
To update your farm, please follow this articlehttps://hyperlink.services.treasury.gov/agency.do?origin=https://entracp.yvand.net/docs/usage/update/.
To set the authority for an existing tenant, you can use PowerShell:
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings
For a global tenant:
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri ("https://hyperlink.services.treasury.gov/agency.do?origin=https://login.microsoftonline.com/")
For a US-gov tenant:
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri ("https://hyperlink.services.treasury.gov/agency.do?origin=https://login.microsoftonline.us/")
$config.ApplySettings($settings, $true)
The PR adds a new message in the log shows explicitly what authority / scope is used:
04/11/2024 09:58:40.00 powershell.exe (0x10C4)        0x20E4  EntraCP Configuration  1337        High    [EntraCP] Initialized authentication for tenant "XXX.onmicrosoft.com" with authority "https://hyperlink.services.treasury.gov/agency.do?origin=https://login.microsoftonline.com/" and scope "https://hyperlink.services.treasury.gov/agency.do?origin=https://graph.microsoft.com/.default" .       5d832b90-b879-0001-c2a2-a7b0db8bda01
04/11/2024 09:58:40.00 powershell.exe (0x10C4)        0x20E4  EntraCP Configuration  1337        High    [EntraCP] Initialized authentication for tenant "YYY.onmicrosoft.com" with authority "https://hyperlink.services.treasury.gov/agency.do?origin=https://login.chinacloudapi.cn/" and scope "https://hyperlink.services.treasury.gov/agency.do?origin=https://microsoftgraph.chinacloudapi.cn/.default" .   5d832b90-b879-0001-c2a2-a7b0db8bda01
If you want to call EntraCP directly using PowerShell, instead of the people picker, you can use this PowerShell script:
Add-Type -AssemblyName ('Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c')
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$claimsProvider = New-Object Yvand.EntraClaimsProvider.EntraCP ("EntraCP")
$inputStr = "testEntraCPUser_001"
$context = New-Object System.Uri ("")
[string[]] $entityTypes = @("User", "FormsRole")
$claimsProvider.Search($context, $entityTypes, $inputStr, $null, 30)
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2049260481, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJLOWU7OUJKSXGJISATY4ZHUVAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGI3DANBYGE.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

On the Troubleshoot EntraCP page in CA I’m getting this:
Test connection to 'https://login.microsoftonline.com' through proxy '': OK, took 333 ms.
Test connection to 'https://graph.microsoft.com' through proxy '': OK, took 1315 ms.
Test loading of dependencies: OK
Test connection to tenant 'ReplaceWithYourOwnValue' failed due to invalid credentials: ClientSecretCredential authentication failed: AADSTS900023: Specified tenant identifier 'replacewithyourownvalue' is neither a valid DNS name, nor a valid external domain. Trace ID: d30dc992-01c9-4e5c-80e3-cccb879e2b00 Correlation ID: b677aee2-e010-4df0-a0c8-edc533b2999f Timestamp: 2024-04-11 13:41:10Z
Maybe you didn’t update this page so I’m less concerned
I updated the solution per your web page.  I already have an existing tenant setup, so I ran…
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri (https://login.microsoftonline.us/)
$config.ApplySettings($settings, $true)
I got similar errors as before so I removed the tenant and recreated it and I was able to do so via CA however in ULS I get errors.  Here are a couple of key ones.
[EntraCP] Initialized authentication for tenant "Mydomain.OnMicrosoft.us" using authority https://login.microsoftonline.us/ and scope https://graph.microsoft.us/.default .
[EntraCP] Graph returned error Unauthorized Unauthorized on request https://graph.microsoft.com/v1.0/$batch with JSON payload…
A couple of things:

I’d like to remove this conversation from your GitHub page since there is information that I cannot share in the open and this is hindering our process.
Would it be possible to schedule a screen share review of the errors I’m seeing so that you can see what I see.  I’m on the EST time zone however I’m willing to get on at any hour since I know you are based in France which is 6 hours ahead.
I feel like we’re getting very close.
A quick question, we’re using a custom .. Entra domain name.  WE do not use <something.onmicrosoft.us as our domain name.  In your tenant configuration should I be using the root tentant domain of onmicrosoft.us or can I put my full custom domain name in there?

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Thursday, April 11, 2024 5:12 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
@RichCasalehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/RichCasale I opened PR #246https://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/pull/246 for this issue, and I just published a nightly buildhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/releases/tag/nightly that you can test in your environment.
To update your farm, please follow this articlehttps://hyperlink.services.treasury.gov/agency.do?origin=https://entracp.yvand.net/docs/usage/update/.
To set the authority for an existing tenant, you can use PowerShell:
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings
For a global tenant:
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri ("https://hyperlink.services.treasury.gov/agency.do?origin=https://login.microsoftonline.com/")
For a US-gov tenant:
$settings.EntraIDTenants[0].AzureAuthority = New-Object System.Uri ("https://hyperlink.services.treasury.gov/agency.do?origin=https://login.microsoftonline.us/")
$config.ApplySettings($settings, $true)
The PR adds a new message in the log shows explicitly what authority / scope is used:
04/11/2024 09:58:40.00 powershell.exe (0x10C4)        0x20E4  EntraCP Configuration  1337        High    [EntraCP] Initialized authentication for tenant "XXX.onmicrosoft.com" with authority "https://hyperlink.services.treasury.gov/agency.do?origin=https://login.microsoftonline.com/" and scope "https://hyperlink.services.treasury.gov/agency.do?origin=https://graph.microsoft.com/.default" .       5d832b90-b879-0001-c2a2-a7b0db8bda01
04/11/2024 09:58:40.00 powershell.exe (0x10C4)        0x20E4  EntraCP Configuration  1337        High    [EntraCP] Initialized authentication for tenant "YYY.onmicrosoft.com" with authority "https://hyperlink.services.treasury.gov/agency.do?origin=https://login.chinacloudapi.cn/" and scope "https://hyperlink.services.treasury.gov/agency.do?origin=https://microsoftgraph.chinacloudapi.cn/.default" .   5d832b90-b879-0001-c2a2-a7b0db8bda01
If you want to call EntraCP directly using PowerShell, instead of the people picker, you can use this PowerShell script:
Add-Type -AssemblyName ('Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c')
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$claimsProvider = New-Object Yvand.EntraClaimsProvider.EntraCP ("EntraCP")
$inputStr = "testEntraCPUser_001"
$context = New-Object System.Uri ("")
[string[]] $entityTypes = @("User", "FormsRole")
$claimsProvider.Search($context, $entityTypes, $inputStr, $null, 30)
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2049260481, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJLOWU7OUJKSXGJISATY4ZHUVAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGI3DANBYGE.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

I did additional research and my implementation is incomplete and needs a bit more work, I'll update you when it is ready (hopefully this week).
If after that it is still not working, yes we can connect directly.
I'm not sure what domain name you should type, but please note that it is totally fine to simply type the tenant ID instead, so you can use that if you are not sure.
I am not able to delete the issue, my only option is to close it. If you wish you can delete some of your comments

Ok that’s good to know, I’ll do my best to be patient.  😊  The fact that you’re willing to work with us on this I consider a gift so I won’t put any undue pressure on you.
If we can’t get it working though let’s sync up and maybe that will get us across the finish line.  I don’t need to tell you about the significance of your custom claims provider, so for it work correctly in the GCC High environment would be a big win for the code as well.
Also I haven’t shared anything sensitive at this point, I just know that what I’m omitting may actually help you debug.  😊
Thanks for your efforts.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Thursday, April 11, 2024 12:03 PM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
I did additional research and my implementation is incomplete and needs a bit more work, I'll update you when it is ready (hopefully this week).
If after that it is still not working, yes we can connect directly.
I'm not sure what domain name you should type, but please note that it is totally fine to simply type the tenant ID instead, so you can use that if you are not sure.
I am not able to delete the issue, my only option is to close it. If you wish you can delete some of your comments
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2050030315, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJNHRV4YG2V27S2QRJTY42XZVAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQGAZTAMZRGU.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

I pushed a new commit and I believe it will work much better.
I ended up by creating my own class to store the settings (authority and endpoints) per cloud instance, something I don't understand is not present by default in MSAL or Graph libraries.
Anyway, now tenants have a new property AzureCloud, where you can set the cloud instance.
Possible values are: AzureGlobal (default), AzureChina, AzureUsGovernmentL4, AzureUsGovernmentL5
To test this:

Download the new nightly release
Update as documented in this page. The errors you got the last time when using PowerShell were not expected. After the update is complete, please make sure to close and open a new PowerShell process, to get the updated assemlies.
Side note: The messages in page TroubleshootEntraCP.aspx are totally expected, but I need to update the wording to clarify this
Delete the tenant from EntraCP configuration and re-add it with your required cloud instance, either in the UI or PowerShell.

To add it in PowerShell with your required cloud instance:
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings

$settings.EntraIDTenants.Clear()

# Add a new Azure AD tenant using a client secret
$tenant = New-Object "Yvand.EntraClaimsProvider.Configuration.EntraIDTenant"
$tenant.Name = "TENANT_NAME_OR_ID"
$tenant.SetCredentials("CLIENT_ID", "CLIENT_SECRET")
# New property to set the cloud instance. Possible values: AzureGlobal (default), AzureChina, AzureUsGovernmentL4, AzureUsGovernmentL5
$tenant.AzureCloud = [Yvand.EntraClaimsProvider.Configuration.AzureCloudName]::AzureUsGovernmentL4
$settings.EntraIDTenants.Add($tenant)

$config.ApplySettings($settings, $true)

Happy Monday to you. Quick update.  The update works, I’m able to resolve groups and users accounts from our Entra ID.   I’m still working on something at the moment that doesn’t seem right, but that may be on my end.  I’ll report back shortly with my final conclusion.
Thanks for all of your help.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Friday, April 12, 2024 4:49 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
I pushed a new commithttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/pull/246/commits/5a7d294755d2fc03999a42f2f11bac520e83292f and I believe it will work much better.
I ended up by creating my own class to store the settings (authority and endpoints) per cloud instance, something I don't understand is not present by default in MSAL or Graph libraries.
Anyway, now tenants have a new property AzureCloud, where you can set the cloud instance.
Possible values are: AzureGlobal (default), AzureChina, AzureUsGovernmentL4, AzureUsGovernmentL5
To test this:

Download the new nightly releasehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/releases/tag/nightly
Update as documented in this pagehttps://hyperlink.services.treasury.gov/agency.do?origin=https://entracp.yvand.net/docs/usage/update/. The errors you got the last time when using PowerShell were not expected. After the update is complete, please make sure to close and open a new PowerShell process, to get the updated assemlies.
Side note: The messages in page TroubleshootEntraCP.aspx are totally expected, but I need to update the wording to clarify this
Delete the tenant from EntraCP configuration and re-add it with your required cloud instance, either in the UI or PowerShell.

To add it in PowerShell with your required cloud instance:
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings
$settings.EntraIDTenants.Clear()
Add a new Azure AD tenant using a client secret
$tenant = New-Object "Yvand.EntraClaimsProvider.Configuration.EntraIDTenant"
$tenant.Name = "TENANT_NAME_OR_ID"
$tenant.SetCredentials("CLIENT_ID", "CLIENT_SECRET")
New property to set the cloud instance. Possible values: AzureGlobal (default), AzureChina, AzureUsGovernmentL4, AzureUsGovernmentL5
$tenant.AzureCloud = [Yvand.EntraClaimsProvider.Configuration.AzureCloudName]::AzureUsGovernmentL4
$settings.EntraIDTenants.Add($tenant)
$config.ApplySettings($settings, $true)
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2051316088, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJPOYXNZQNUXZNL3OGLY46NYBAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRGMYTMMBYHA.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Thank you for your feedback, please keep me posted

I think the component is working however my configuration between EntraCP and the OIDC-based trusted identity provider are out of alignment, because users assigned to SharePoint groups will not authenticate.  If I choose user identity as mail then it works but validate in people picker fails for external accounts.
To wrap this up, would it possible to schedule a screen session?
Please send me an email outside of the GitHub system so we can schedule something.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Tuesday, April 16, 2024 3:16 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
Thank you for your feedback, please keep me posted
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2058397635, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJORRKLXMVKK6DJZE2DY5TF4NAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGM4TONRTGU.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Quick questions.  Is it possible to remove the EntraCP referenced in my trusted identity token issuer in SP, without blowing away the claim provider reference?
I want to test something without EntraCP being involved but I don’t want to blow it away.  Searches suggest I have to remove and recreate.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Casale, Richard
Sent: Monday, April 15, 2024 2:21 PM
To: Yvand/EntraCP @.>; Yvand/EntraCP @.>
Cc: Mention @.***>
Subject: RE: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
Happy Monday to you. Quick update.  The update works, I’m able to resolve groups and users accounts from our Entra ID.   I’m still working on something at the moment that doesn’t seem right, but that may be on my end.  I’ll report back shortly with my final conclusion.
Thanks for all of your help.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Friday, April 12, 2024 4:49 AM
To: Yvand/EntraCP<EMAIL_ADDRESS>Cc: Casale, Richard<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
I pushed a new commithttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/pull/246/commits/5a7d294755d2fc03999a42f2f11bac520e83292f and I believe it will work much better.
I ended up by creating my own class to store the settings (authority and endpoints) per cloud instance, something I don't understand is not present by default in MSAL or Graph libraries.
Anyway, now tenants have a new property AzureCloud, where you can set the cloud instance.
Possible values are: AzureGlobal (default), AzureChina, AzureUsGovernmentL4, AzureUsGovernmentL5
To test this:

Download the new nightly releasehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/releases/tag/nightly
Update as documented in this pagehttps://hyperlink.services.treasury.gov/agency.do?origin=https://entracp.yvand.net/docs/usage/update/. The errors you got the last time when using PowerShell were not expected. After the update is complete, please make sure to close and open a new PowerShell process, to get the updated assemlies.
Side note: The messages in page TroubleshootEntraCP.aspx are totally expected, but I need to update the wording to clarify this
Delete the tenant from EntraCP configuration and re-add it with your required cloud instance, either in the UI or PowerShell.

To add it in PowerShell with your required cloud instance:
Add-Type -AssemblyName "Yvand.EntraCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636"
$config = [Yvand.EntraClaimsProvider.EntraCP]::GetConfiguration()
$settings = $config.Settings
$settings.EntraIDTenants.Clear()
Add a new Azure AD tenant using a client secret
$tenant = New-Object "Yvand.EntraClaimsProvider.Configuration.EntraIDTenant"
$tenant.Name = "TENANT_NAME_OR_ID"
$tenant.SetCredentials("CLIENT_ID", "CLIENT_SECRET")
New property to set the cloud instance. Possible values: AzureGlobal (default), AzureChina, AzureUsGovernmentL4, AzureUsGovernmentL5
$tenant.AzureCloud = [Yvand.EntraClaimsProvider.Configuration.AzureCloudName]::AzureUsGovernmentL4
$settings.EntraIDTenants.Add($tenant)
$config.ApplySettings($settings, $true)
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2051316088, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJPOYXNZQNUXZNL3OGLY46NYBAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRGMYTMMBYHA.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Yes, you can completely disconnect EntraCP from the SharePoint trust by running the script below:
# Set private member m_ClaimProviderName to null. Note that using .NET reflection on SharePoint objects is not supported and you do this at your own risks
$trust = Get-SPTrustedIdentityTokenIssuer "<SPTRUST_NAME>"
$trust.GetType().GetField("m_ClaimProviderName", "NonPublic, Instance").SetValue($trust, $null)
$trust.Update()

Regarding your problem with guest accounts, I believe you can find the full explanation of this behavior in this article: https://learn.microsoft.com/en-us/entra/identity/saas-apps/sharepoint-on-premises-tutorial#manage-guest-users-access
Can you take a look?

Ah ha…
“to ensure that guest accounts are all identified with the same attribute, the identifier claims of the enterprise application should be updated to use the attribute user.localuserprincipalname instead of user.userprincipalname.”
I saw that article; however, we are using OIDC for authentication, so I glanced and then moved on.  Thank you for pointing this out.
Would these settings be appropriate?  I’ll change the claim type to http://schemas.xmlsoap.org/ws/2005/05/identity/claim/name - user.userprinciplename.
@.***
In the permissions mappings, do I change the claim type that is currently email address to “http://schemas.xmlsoap.org/ws/2005/05/identity/claim/name”?
@.***

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Wednesday, April 17, 2024 4:07 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
Yes, you can completely disconnect EntraCP from the SharePoint trust by running the script below:
Set private member m_ClaimProviderName to null. Note that using .NET reflection on SharePoint objects is not supported and you do this at your own risks
$trust = Get-SPTrustedIdentityTokenIssuer "<SPTRUST_NAME>"
$trust.GetType().GetField("m_ClaimProviderName", "NonPublic, Instance").SetValue($trust, $null)
$trust.Update()
Regarding your problem with guest accounts, I believe you can find the full explanation of this behavior in this article: https://hyperlink.services.treasury.gov/agency.do?origin=https://learn.microsoft.com/en-us/entra/identity/saas-apps/sharepoint-on-premises-tutorial#manage-guest-users-access
Can you take a look?
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2060656120, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJIUD36EZG5QZPH2P2DY5YUS5AVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGY2TMMJSGA.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Forgive me apparently I’m not paying close enough attention today.  I just noticed that it says to change the identifier for guest users to UPN, so I’m good with that question.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Casale, Richard
Sent: Wednesday, April 17, 2024 3:54 PM
To: Yvand/EntraCP @.>; Yvand/EntraCP @.>
Cc: Mention @.***>
Subject: RE: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
Ah ha…
“to ensure that guest accounts are all identified with the same attribute, the identifier claims of the enterprise application should be updated to use the attribute user.localuserprincipalname instead of user.userprincipalname.”
I saw that article; however, we are using OIDC for authentication, so I glanced and then moved on.  Thank you for pointing this out.
Would these settings be appropriate?  I’ll change the claim type to http://schemas.xmlsoap.org/ws/2005/05/identity/claim/name - user.userprinciplename.
@.***
In the permissions mappings, do I change the claim type that is currently email address to “http://schemas.xmlsoap.org/ws/2005/05/identity/claim/name”?
@.***

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Wednesday, April 17, 2024 4:07 AM
To: Yvand/EntraCP<EMAIL_ADDRESS>Cc: Casale, Richard<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
Yes, you can completely disconnect EntraCP from the SharePoint trust by running the script below:
Set private member m_ClaimProviderName to null. Note that using .NET reflection on SharePoint objects is not supported and you do this at your own risks
$trust = Get-SPTrustedIdentityTokenIssuer "<SPTRUST_NAME>"
$trust.GetType().GetField("m_ClaimProviderName", "NonPublic, Instance").SetValue($trust, $null)
$trust.Update()
Regarding your problem with guest accounts, I believe you can find the full explanation of this behavior in this article: https://hyperlink.services.treasury.gov/agency.do?origin=https://learn.microsoft.com/en-us/entra/identity/saas-apps/sharepoint-on-premises-tutorial#manage-guest-users-access
Can you take a look?
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2060656120, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJIUD36EZG5QZPH2P2DY5YUS5AVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGY2TMMJSGA.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

There is no need to change any permission mapping in EntraCP, merely to update the user identifier for the guest accounts (in the global configuration page).
Note that, since you change the user identifier, previous permissions for guest users may no longer be working.
To test the effect of such a change in a reliable way, please always create a new site collection and test the new permissions there.

Yvand, wanted to give you a quick update that I’m working with Brent Person on the case I opened to get this working.  He has been a huge help.

Rich Casale
ECM SharePoint Administrator
Enterprise Applications
Office of the Chief Information Officer
U.S. Department of the Treasury
Mobile:<PHONE_NUMBER> (Preferred)
<EMAIL_ADDRESS>From: Yvan Duhamel @.>
Sent: Thursday, April 18, 2024 2:46 AM
To: Yvand/EntraCP @.>
Cc: Casale, Richard @.>; Mention @.>
Subject: Re: [Yvand/EntraCP] Token acquisition fails when connecting to azure us gov Entra (Issue #245)
** Caution: External email from: @.*** Pay attention to suspicious links and attachments. Send suspicious email to<EMAIL_ADDRESS>**
There is no need to change any permission mapping in EntraCP, merely to update the user identifier for the guest accounts (in the global configuration page).
Note that, since you change the user identifier, previous permissions for guest users may no longer be working.
To test the effect of such a change in a reliable way, please always create a new site collection and test the new permissions there.
—
Reply to this email directly, view it on GitHubhttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/Yvand/EntraCP/issues/245#issuecomment-2063131873, or unsubscribehttps://hyperlink.services.treasury.gov/agency.do?origin=https://github.com/notifications/unsubscribe-auth/AHAMTJPV7EDXMBQO5BZ34G3Y55T2DAVCNFSM6AAAAABFZRW7SKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRTGEZTCOBXGM.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Thank you for the heads-up, this is great, you are in good hands


CIV-3420 Manage case flags

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/CIV-3420
Change description

add manage case flags event config
add e2e and api

Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[ ] No

https://github.com/hmcts/civil-ccd-definition/pull/2322 this is the updated PR that will be merged for this feature


docs/rules/index.md

docs/rules/index.md
They either prescribe a better way of doing something or help you avoid footguns.

no-fallthrough - disallow fallthrough of case statements (recommended)

These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns.
这些规则是为了阻止你踩坑。它们要么为你指明了更好的做事方法，要么可以帮助你绕开雷区。

已提 PR (#24).

非常感谢！


CancellationTokenSource implementation

closes #709

@nessross77 also take a look at CodeFactor errors. And also thank you for stepping in :)

AppVeyor got stuck

Do we need the Task.Run calls?

I'm afraid this is not going to work. The cancellation token is a cooperative cancellation. We need to do something with that token or send that token to a lower level API.

Closed due to inactivity


feat: add justify property

Description
Added a justify property on the label widget, allowing justification of the text when it's wrapping. This closes my feature request #706
Usage
(label :class "song_album" :text song_album :wrap true :width 200 :xalign 0.5 :justify "center")

Showcase

Checklist
Please make sure you can check all the boxes that apply to this PR.

[x] All widgets I've added are correctly documented.
[x] I added my changes to CHANGELOG.md, if appropriate.
[ ] The documentation in the docs/content/main directory has been adjusted to reflect my changes.
[x] I used cargo fmt to automatically format all code before committing

I'm not sure about the The documentation in the docs/content/main directory has been adjusted to reflect my changes. checkbox. I can't find that directory.


feat: Basque language added

Basque language added to translations settings

Question
Response

Version?
v1.4.0

Devices tested?
iPhone 7...

Bug fix?
no

New feature?
yes

Includes tests?
no

All Tests pass?
yes

Related ticket?
#...

Description
Basque translation added

Coverage increased (+0.04%) to 39.937% when pulling a76649c18bfd58571e3bac5e38f1b88cde700e58 on jcarral:basque_translation into dd5665248114167cdc9c52657ca3e494d008f2b5 on gitpoint:master.

Coverage increased (+0.04%) to 39.937% when pulling 843e154cd1acb5226612e4db53a5400f5ee3fa62 on jcarral:basque_translation into dd5665248114167cdc9c52657ca3e494d008f2b5 on gitpoint:master.

Coverage increased (+0.04%) to 39.937% when pulling 229e17968e66291f35174b58906ead056a173ccd on jcarral:basque_translation into dd5665248114167cdc9c52657ca3e494d008f2b5 on gitpoint:master.

Coverage increased (+0.04%) to 40.544% when pulling 87c588fab33698cfc14def3a58c5a8d206ed1feb on jcarral:basque_translation into 174cf3b17f780a1f71fff05d5344b0cb0ce76207 on gitpoint:master.