[SPLoaderError.loadComponentError]: ***Failed to load component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: ***Failed to load path dependency "ContosoSPFxWebPartLocalization" from component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: Error loading https://component-id.invalid/9951b316-c8f2-4e27-887a-b7a46b3e94a0_1.3.1/ContosoSPFxWebPartLocalization Unable to load script https://contoso.sharepoint.com/sites/contosoapps/ClientSideAssets/490f3be2-7e8a-4fe5-8d6b-49ae5d7c4a2e/s-ContosoSPFxWebPartLocalization_en-us_2b301efaa958eadafbad865f710d89e4.js ***INNERERROR: ***Failed to load path dependency "ContosoSPFxWebPartLocalization" from component "9951b316-c8f2-4e27-887a-b7a46b3e94a0" (ContosoSPFxWebPart). Original error: Error loading https://component-id.invalid/9951b316-c8f2-4e27-887a-b7a46b3e94a0_1.3.1/ContosoSPFxWebPartLocalization Unable to load script https://contoso.sharepoint.com/sites/contosoapps/ClientSideAssets/490f3be2-7e8a-4fe5-8d6b-49ae5d7c4a2e/s-ContosoSPFxWebPartLocalization_en-us_2b301efaa958eadafbad865f710d89e4.js ***CALLSTACK: Error at t [as constructor] (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:889:16049) at new t (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:21125) at Function.e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:16214) at Function.e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:12245) at https://spoprod-a.akamaihd.net/files/sp-client-prod_2019-03-15.008/sp-pages-assembly_en-us_2676c0dcef2e33d08d5b8433ef878499.js:1512:60385

Failed to load component. Original error: ***Failed to load path dependency ContosoSPFxWebPartLocalization from component [guid] (ContosoSPFxWebPart).

This post describes the typical reasons why might encounter the following error, and the ways I’ve found to fix them: “Failed to load component. Original error: ***Failed to load path dependency ContosoSPFxWebPartLocalization from component [guid] (ContosoSPFxWebPart)” The error typically looks something like in the screenshot below: Problem This error can be thrown for a lot of different reasons. I’m trying to describe the variants I’ve run into and their fixes below. But first, let’s take a closer look into the error in question!

You cannot edit this page We're sorry, we encountered an unexpected error. Please try again, if the problem persists please contact your Administrator.

How to resolve “You cannot edit this page”-error in Modern SharePoint

This article describes an error situation that you might run into in Modern SharePoint, where you cannot take a page into edit mode anymore. You only get a strangely generic error message with a kinda weird failed request in the console. But, of course, there’s a fix – and an easy one at that! Problem Huh – so here’s a weird one for you! Take a modern communication site, create a new beautiful page, produce some high quality content, and even go to great extents […]

Koskela - SharePoint Saturday Nashville 2019 on 6/16 session.

Speaking at SPS Nashville 6/15/2019

Exciting news to share again! My session on using SPFx to extend Microsoft Teams got accepted to SharePoint Saturday Nashville next June. I’m excited to return to the Music City – it was a lot of fun last time, and I have a new session to present this time! Correction: The title has been fixed – it used to say 6/16, but the event is on 15. SharePoint Saturdays are typically on Saturday 😁 Thanks for pointing that out! What will I be speaking about? […]

Let's fix SharePoint Search together!

How to add multiple aliases to a Managed Property in SharePoint Search?

This article explains how to add multiple aliases to one managed property in SharePoint Search Schema Management. Yes, it’s possible, just a bit unintuitive! I’ll explain the process below. Solution This seems to be another “gotcha”, that’s missing from the official documentation, but is super helpful to know when you happen to need it! The way I encountered it was in a dev/staging environment, where certain automatically created Managed Property, owstaxIdValoTags (I’ll leave it up to you to figure out what the name is all […]

"Set-PnPAvailablePageLayouts -AllowAllPageLayouts" returning an error "Access denied. You do not have permission to perform this action or access this resource.."

How to fix “Access denied” errors when running “Set-PnPAvailablePageLayouts”?

This article describes one way how to fix seemingly non-sensical “Access denied” errors, that you get when running Set-PnPAvailablePageLayouts. Problem While running the PnP cmdlet for enabling or selecting the available publishing page layouts for a web, you run into this, fairly generic error: Access denied. You do not have permission to perform this action or access this resource. PS C:\> Set-PnPAvailablePageLayouts -AllowAllPageLayouts Set-PnPAvailablePageLayouts : Access denied. You do not have permission to perform this action or access this resource. At line:1 char:1 + Set-PnPAvailablePageLayouts […]

Azure Functions CLI - such a pretty logo for such an awesome functionality

How to access EF’s DbContext in an Azure Function on V2 runtime?

This post describes how you can access your Entity Framework Core model classes and the database context in your Azure Functions. In my example I’m using EF Core 2.1, but the main principle should be the same for later versions as well. Please note, that I use Azure functions runtime 2.x (and so should you!) Another easy one, that I was unable to find much guidance on! But first, let’s start with the basics. Why would you want to have this setup? Why would you […]

SharePoint PnP logo

Another fix to “Connect-PnPOnline : The sign-in name or password does not match one in the Microsoft account system.”

This post describes a simple way to get around the following error while running Connect-PnPOnline: “The sign-in name or password does not match one in the Microsoft account system.” Truthfully, this one is kind of simple and stupid – but as I’ve seen before, it’s surely worth documenting anyway! Below is an example of such error. PS C:\> Connect-PnPOnline https://contoso.sharepoint.com/sites/CommunicationSite/ Connect-PnPOnline : The sign-in name or password does not match one in the Microsoft account system. At line:1 char:1 + Connect-PnPOnline https://contoso.sharepoint.com/sites/CommunicationS … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ […]

Azure Functions CLI - such a pretty logo for such an awesome functionality

Sudden “Function compilation error” for an Azure Function

Welp – another interesting error encountered while deploying Azure Functions to Azure. So, everything runs nicely locally, but when you deploy your well-tested, functional and pretty code to run them in the cloud, you’ll just get these ugly and unfriendly errors. Long story short, “Function compilation error” is what you’re faced with. Example error below: Function compilation error Microsoft.CodeAnalysis.Scripting.CompilationErrorException : Script compilation failed. at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.CreateFunctionTarget(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 314 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Description.FunctionLoader`1.GetFunctionTargetAsync[T](Int32 attemptCount) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionLoader.cs : 55 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async […]

.NET logo

How to get current user in ASP.NET Core?

This post describes how to get the currently logged in user using ASP.NET Core. This is compared with how it’s done in .NET Framework. Background Table of Contents BackgroundSolution In .NET Core, a lot of things are done a bit differently. That’s what I’ve been learning building more and more stuff with it, instead of good old .NET Framework. The learning curve is definitely there, but it’s not that bad – most of the things work in a similar fashion, but a huge number of […]

Modern SharePoint Footer - very memeworthy!

How to disable the footer in Modern SharePoint?

Modern SharePoint Online recently got a new, super useful and much-requested new feature: site footer. This little buddy now makes it possible to create informative, stylish and useful footer areas to your intranet sites. But what if you already implemented such a solution based on, say, SPFx extensions, and now you’ve got 2 footers? Well, you might want to disable one of those two. My guideline would be this: if you already have a custom/vendor solution for your footer, and it does what you need […]

How to revert Modern view back to Classic for SharePoint libraries using PowerShell

If your customers are anything like ours, some of them love the new modern library view, some will adjust and some just hate it and want to get as far away from it as possible. While embracing the new stuff is usually smart, there’s some value to sticking to what works as well. The Modern view is going to be the superior choice of the two (if it isn’t already!), but there are a multitude of reasons why one might want to revert to the […]

Finnish flag

SharePoint linguistic search features

I’ve been posting about different localization / globalization / multilingual options of SharePoint for quite some time. It’s a topic that’s kind of close to my heart, being a non-English speaker with a really difficult native language – one, that Microsoft always gets wrong even though it’s not for the lack of trying! Weirdly enough, while Microsoft messes up the Finnish translation and localization all the time, they do detect and recognize the language surprisingly well. Enough chitchat, though. In this post, I’m trying to […]

Low-code / no-code basically means serverless

How to remove Azure Functions without deleting the Functions App?

Have you ever run into a situation, where you just wanted to remove the currently standing function definitions from your app service without actually nuking the whole Functions app? I have! App Service configuration is usually easy to manage programmatically or by scripting, so even if you need to redo the deployment, it should be fairly straightforward. But what if you don’t have the setup scripted, and have already configured everything the way you like it – you’d really like to NOT nuke the whole […]

entity-framework-logo

EntityFramework Core 2.1 – Update-Database error “The EntityFramework package is not installed”

Another weird, but simple issue I ran into when building a simple .NET Core application. I was just minding my own business, crafting since bits of code into something remotely functional, while I ran into an issue. While trying to apply my changes to the database using .NET Core Entity Framework, executing Update-Database simply failed with the following error: The EntityFramework package is not installed This error can occur with probably any of the EntityFrameworkCore commandlets. Update-Database is just the one I ran into problems […]

Have you tried turning it off and on again?

How to fix “AADSTS90008: The user or administrator has not consented to use the application”?

A couple of days ago, I got a comment asking how to fix error AADSTS90008 when developing an application using Azure Active Directory The error in question was this: AADSTS90008: The user or administrator has not consented to use the application with ID ‘[guid]’. This happened because application is misconfigured: it must require access to Windows Azure Active Directory by specifying at least ‘Sign in and read user profile’ permission. While the error itself is usually fairly simple, explaining what to do in a comment […]

Not sure if a bug or a feature

How to format dates in ASP.NET?

Have you ever been struggling, to make your ASP.NET MVC views format your properties of type datetime correctly? I have. And I’ve been shot in the leg by weird hacks made by both me (just 6 months earlier) or someone else. So I thought I’d finally document the different ways one can set up the formatting of datetime fields in ASP.NET MVC projects. Or at least all the ways I’ve found so far! :) While this guide has been written for ASP.NET MVC, most of […]

"Chrome SP Editor" -about page

SharePoint Search Console – Now available inside Chrome SP Editor!

This post is about two of my favorite tools: Chrome SP Editor, and SharePoint Search Query tool. Or maybe better yet, an amalgamation of the two! Description I’ve mentioned the Chrome SP Editor before, and for a good reason. It’s a great tool for any IT Pro or Dev working with SharePoint on a daily basis. It’s maintained by a very talented developer, one of the people behind Valo Intranet, Tomi Tavela. If you’re using the tool, let him know on Twitter! But I’m not […]

ASP.NET Core web app home page

Resolving the Version conflicts for a downgraded .NET Core 2.1/2.2 web app project

I ran into compatibility issues with .NET Core 2.2 on my Azure Functions projects, so I downgraded my whole solution (an Azure Functions project, a helpers library and a web application project) to 2.1, and got rid of that particular nuisance. This introduced a few new issues, though – namely, I started getting this error whenever trying to restore nuget packages or build the project: NU1107 Version conflict detected for Microsoft.AspNetCore.Razor.Language. Install/reference Microsoft.AspNetCore.Razor.Language 2.2.0 directly to project [projectname] to resolve this issue. [projectname] -> Microsoft.VisualStudio.Web.CodeGeneration.Design […]

Microsoft SQL Server logo

Easily querying all the database and log file sizes on SQL Server

Quite often you get the need to simply quickly query all the database sizes on MS SQL Server – most typically, for us, this need arises when a development machine gets low on disk space, and we need to check if some database’s log size has been growing, or if something else is wrong. In my daily work, I rarely encounter this requirement anymore. Azure has almost entirely obliterated the need for such diagnostics, since it’s so easy to spin up or scale up new […]

Let's fix all the problems!

Fixing “An assembly specified in the application dependencies manifest [projectname].deps.json was not found”

This post describes one nobrainerish fix to the error “An assembly specified in the application dependencies manifest [projectname].deps.json was not found.” I ran into this while running Update-Database for my ASP.NET Core web project, that’s using EntityFrameworkCore 2.1.1. I hadn’t seen this one before, but the error was quite interesting: Error: An assembly specified in the application dependencies manifest (Koskila.[projectname].AzureFunctions.deps.json) was not found: package: ‘Koskila.[projectname].AzureFunctions’, version: ‘1.0.0’ path: ‘Koskila.[projectname].AzureFunctions.dll’ Well that’s a weird one coming from an update-database command!

Microsoft Privacy

What is “fp.js” – and why is it snooping on your SharePoint usage?

Microsoft is gathering all kinds of telemetric data out of the usage of SharePoint. I ran into an interesting JavaScript file, fp.js, on SharePoint Online doing just that. Gathering data. It loads on pretty much every single page request, so it’s something you’ll bump into anytime you open your developer tools! Your customer’s IT might even inquire about it – perhaps wanting to disable it for perfomance or information security gains? But what is fp.js and what does it do?

Meanwhile on Google Plus...

Google Plus is shutting down – fix your .NET OAuth flow!

Google is shutting down their Facebook killer, Google+. While I’m sure there’s at least 10 end users that are sad to see the ill-fated not-that-social-medium go, the implications for Software Developers actually could be far more far-reaching. A lot of implementations of Google’s OAuth seem to rely on Google Plus’s APIs to get gather information about the user. When Google Plus goes down, so will the APIs. Their apparently unsafe implementation seems to be a major reason Google’s hastening the shutdown anyway. This means that […]

If you could just fix SharePoint... That would be great.

Solving yet another “Microsoft.SharePoint.Client.ServerException: Unknown Error”

There’s maybe a thousand things that can throw an “Microsoft.SharePoint.Client.ServerException”, but a bit smaller amount of things, that are ambiguous enough to be called “Unknown error”. This post describes one, fairly usual fix for this issue! But let’s get back to the beginning for a second – you get what and when now? When running any code, that provisions new sites (much like https://www.koskila.net/new-pnpsite-fails-with-sitestatus3/), you get an error like this almost immediately: Microsoft.SharePoint.Client.ServerException: Unknown Error at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb) at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() […]

The 5th annual Hacktoberfest

#Hacktoberfest 2018 – a fun way to encourage Open Source contributions!

This post is about the Hacktoberfest event in 2018. I contributed to Microsoft’s repositories and a couple of other ones – and it was a lot of fun! Wow – I’m quite behind on this post, but thought it’s worthwhile to give credit where credit is due. Even if that credit comes woefully slowly! In 2018, Microsoft took part in DigitalOcean’s Hacktoberfest-challenge. Designed to encourage Open Source -contributions in a playful and gamified manner (in addition to being a lighthearted marketing campaign, of course), it’s a […]