sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Getting error 'A task was canceled' when calling the PnP PowerShell function New-PnPSite

Open SanderSiep opened this issue 8 years ago • 6 comments

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

When calling this PnP PowerShell function (v 2.25.1804.1) I would expect to have a Team created within the Office365 environment.

Observed Behavior

When calling this function in approximately 50% I get an error: A task was canceled. or in Dutch: Een taak is geannuleerd. In the other cases it works like expected. We have 2 Office365 environments and we only have these problems at one of these environments in the other environment it works like expected.

Steps to Reproduce

Execute the following code to reproduce the issue:

$groupTitle = "My Group Title 015"
$groupNameClean = "MyGroup015"
$groupDescription = "My Group Description 015"
$rootSiteUrl = "https://tenant.sharepoint.com/"

$credentials = Get-Credential
Connect-PnPOnline -Url $rootSiteUrl -Credentials $credentials

$newSiteUrl = New-PnPSite -Type TeamSite -Title $groupTitle -Alias $groupNameClean -Description $groupDescription -ErrorAction Stop

SanderSiep avatar Apr 20 '18 12:04 SanderSiep

Could not reproduce anymore in the last week. Not sure why it did not worked before and why it is working again. But I am glad it is solved.

SanderSiep avatar May 15 '18 06:05 SanderSiep

unfortunately this issue is seen again today at our test environment. The test environment is also really slow today, even opening page takes ages.

SanderSiep avatar May 18 '18 13:05 SanderSiep

Hello, I'm also seeing this behaviour in my tenant. When I try to create a site using New-PnPSite, I get error - A task was canceled. The gets created even if I get this error.

spcrux avatar Oct 15 '18 04:10 spcrux

We are also still having these issues on one of our O365 environments but only at certain periods. Looks like some performance issue at the O365 tenant or something like that.

SanderSiep avatar Oct 15 '18 09:10 SanderSiep

We are also seeing this issue on a teanant when creating sites+groups using New-PnPSite As said by others, the site are created fine, but the error makes it very difficult to create a reliable script that does further processing after site is created (such as applying Site Designs, or setting UnifiedGroupLinks) @VesaJuvonen have you had opportunity to investigate why this error occurs?

AndersRask avatar Jan 29 '19 14:01 AndersRask

This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.

msft-github-bot avatar Jan 22 '20 21:01 msft-github-bot