Add-PnPApp : The request message was already sent. Cannot send the same request message multiple times - sharepoint-online

I'm new to using Azure DevOps. I continue to receive this error "Add-PnPApp : The request message was already sent. Cannot send the same request message multiple times."
Azure DevOps Release fails because of AddPnP error with "...same request".
Build shows version that changes my version (old) to a new version(gulp's version?).
Image of build
I'm told that it could be the version that starts with zero because SharePoint doesn't like it. I can't seem to change the new version to 1.0.0.1 because it seems like it's being changed in the gulp-file.js. Is there something else that I am missing?
image of release

Is it possible that you need the overwrite parameter in the AddPnP command? Or is it possible you would need to iterate the version between each release?
https://learn.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpapp?view=sharepoint-ps

In my case the same message
The request message was already sent. Cannot send the same request message multiple times
was misleading. I tried to update dynamically an .sppkg package (which is in fact a ZIP file) during an automated deployment, but the file _rels/.rels was getting lost in the process (because of the bug Unable to compress hidden files with Compress-Archive) and the resulting package was corrupted.
Once I fixed the package by making sure the file _rels/.rels was kept, the deployment would succeed.

Related

Airflow can't reach logs from webserver due to 403 error

I use Apache Airflow for daily ETL jobs. I installed it in Azure Kubernetes Service using the provided Helm chart. It's been running fine for half a year, but since recently I'm unable to access the logs in the webserver (this used to always work fine).
I'm getting the following error:
*** Log file does not exist: /opt/airflow/logs/dag_id=analytics_etl/run_id=manual__2022-09-26T09:25:50.010763+00:00/task_id=copy_device_table/attempt=18.log
*** Fetching from: http://airflow-worker-0.airflow-worker.default.svc.cluster.local:8793/dag_id=analytics_etl/run_id=manual__2022-09-26T09:25:50.010763+00:00/task_id=copy_device_table/attempt=18.log
*** !!!! Please make sure that all your Airflow components (e.g. schedulers, webservers and workers) have the same 'secret_key' configured in 'webserver' section and time is synchronized on all your machines (for example with ntpd) !!!!!
****** See more at https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key
****** Failed to fetch log file from worker. Client error '403 FORBIDDEN' for url 'http://airflow-worker-0.airflow-worker.default.svc.cluster.local:8793/dag_id=analytics_etl/run_id=manual__2022-09-26T09:25:50.010763+00:00/task_id=copy_device_table/attempt=18.log'
For more information check: https://httpstatuses.com/403
What have I tried:
I've made sure that the log file exists (I can exec into the airflow-worker-0 pod and read the file on command line in the location specified in the error).
I've rolled back my deployment to an earlier commit from when I know for sure it was still working, but it made no difference.
I was using webserverSecretKeySecretName in the values.yaml configuration. I changed the secret to which that name was pointing (deleted it and created a new one, as described here: https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#webserver-secret-key) but it didn't work (no difference, same error).
I changed the config to use a webserverSecretKey instead (in plain text), no difference.
My thoughts/observations:
The error states that the log file doesn't exist, but that's not true. It probably just can't access it.
The time is the same in all pods (I double checked be exec-ing into them and typing date in the command line)
The webserver secret is the same in the worker, the scheduler, and the webserver (I double checked by exec-ing into them and finding the corresponding env variable)
Any ideas?
Turns out this was a known bug with the latest release (2.4.0) of the official Airflow Helm chart, reported here:
https://github.com/apache/airflow/discussions/26490
Should be resolved in version 2.4.1 which should be available in the next couple of days.

Azure: what could be the cause of the error "Unable to edit or replace deployment"?

When I recreate my VM I got the following error:
Problem occurred during request to Azure services. Cloud provider details: Unable to edit or replace deployment 'VM-Name': previous deployment from '8/20/2019 6:20:33 AM' is still active (expiration time is '8/27/2019 5:17:41 AM'). Please see https://aka.ms/arm-deploy for usage details.
Help me please to understand.
What could be the cause of the error ?
UPDATED:
This deployment has not been started previously.
Prior to this, errors were received during creation:
Azure is not available now. Please Try again later
There were several such errors one at a time and then I got that error related to:
Unable to edit or replace deployment
My assumptions about this.
Tell me, am I right or not ?
I launched the image, then after some time I recreated it.
Creation began, but at that moment the connection with Azure was lost.
Then, when the connection was restored, we tried to make a deployment that was not removed in the previous attempt (because there was no connection with Azure).
As a result, we got such an error.
Does this theory make sense?
exactly what it says, there is another deployment with the same name going on at this time, either change the name of the deployment you are trying to queue or wait for the other deployment to finish\fail
This can also occur if you use Bicep templates for your ARM deployement and multiple modules or resources in the template have the same name:
module fooModule '../modules/foo.bicep' = {
name: 'foo'
}
module barModule '../modules/bar.bicep' = {
name: 'foo'
}
I got the same error initially pipeline was working but when retriggered pipeline took more time so i canceled the deployment and made a fresh rerun it encounters. i think i need wait until that deployment filed.

Why is my powershell DSC failing with the message "An item with the same key has already been added"

We have a powershell DSC that is being executed to bring a vmss to a desired state.
It was working until we added some more parameters, and then it broke.
I removed everything except the parameters from the script and it still doesn't work.
The full error is
The DSC Extension received an incorrect input: An error occurred while
executing script or module 'IISInstall.ps1': An item with the same
key has already been added..
Please correct the input and retry executing the extension.
We even added logging in the DSC to try to troubleshoot.
It doesn't even seem to make it into the body of the DSC.
What am I doing wrong?
The parameter was called $instanceName. We wanted to use it to add a custom header to IIS to track which instance a response came from.
Turns out if you use $instanceName that steps on the internals of DSC in some way and it will never deploy correctly!
As soon as you remove $instanceName from the parameter list, it will work.

Xamarin.Android & Azure Push Notifications Internal Server Error

I'm following the guide at https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-android-get-started-push (as well as the original Xamarin one that this appears to have cribbed from), but I'm running into a problem registering my client.
I am successfully logging a user in prior to setting up the push notification service.
Both GcmClient.CheckDevice(...) and GcmClient.CheckManifest(...) succeed, and my PushHandlerService is being called.
Push.RegisterAsync(...) in my PushHandlerService is throwing a MobileServiceInvalidOperationException because it received an HTTP 500 Internal Server Error from the service.
Looking at FREB logs, it appears that the "error" is actually supposed to be a success, and interestingly is somehow related to the EasyAuthModule:
NOTIFY_MODULE_COMPLETION ModuleName="EasyAuthModule_64bit", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="true", CompletionBytes="297", ErrorCode="The operation completed successfully.
(0x0)" 05:51:01.092
Module_set_response_error_status
Warning ModuleName="EasyAuthModule_64bit", Notification="AUTHENTICATE_REQUEST", HttpStatus="500", HttpReason="Internal Server Error", HttpSubStatus="79", ErrorCode="Unspecified error
(0x80004005)", ConfigExceptionInfo="" 05:51:01.092
NOTIFY_MODULE_COMPLETION ModuleName="EasyAuthModule_64bit", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="true", CompletionBytes="0", ErrorCode="The operation completed successfully.
(0x0)" 05:51:01.092
I take it the error is happening when you call client.GetPush().RegisterAsync()? This is currently an issue and we are deploying a fix on the Azure side to fix this. In the interim, you can see the fix for this here: https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter5/android/

Cruise Control.NET Disable Build Exception Emails

I have CruiseControl.NET setup to send out an email if there is a compile error and when the error has been fixed:
<notifications>
<notificationType>Change</notificationType>
</notifications>
However this also sends out an email if the source code repository can't be reached. This is expected since the server is restarted every night.
How can I limit the alert emails to compile errors only?
this also sends out an email if the source code repository can't be reached
You can use the sourceControlErrorHandling tag (action to take when a source control error occurs)
<maxSourceControlRetries>3</maxSourceControlRetries>
<sourceControlErrorHandling>ReportOnRetryAmount</sourceControlErrorHandling>
Setting ReportOnRetryAmount to a high value will lower your exception build email.
Reference: 'Project Configuration Block' documentation.
http://www.cruisecontrolnet.org/projects/ccnet/wiki/Project_Configuration_Block
I don't think CC.NET is able to distinguish a "usual" build failure from source code unavailability. The notification type can be one of the following: {'Always', 'Change', 'Failed', 'Success', 'Fixed', 'Exception'}. I'm not sure I can tell the difference between Failed and Exception - probably, the first is a build failure, including unit test failure, etc., while the other one refers to the CC.NET own code failure.
Anyway, if I were you, I would do one of the following:
experiment with notification types (just in case)
make sure the build process is not triggered when the server is restarting, e.g. if you configured nightly builds, you can schedule those to run after the server restarts

Resources