cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Unexpected error: The specified key is not a valid size for this algorithm. Parameter name: key

I tried to clear cache and re-install PBI.  None worked.  All reports worked yesterday and my colleague can still work on them from their own desktop

 

 

Unexpected error: The specified key is not a valid size for this algorithm.
Parameter name: key
Details:
Microsoft.Mashup.Evaluator.Interface.ErrorException: The specified key is not a valid size for this algorithm.
Parameter name: key ---> System.ArgumentException: The specified key is not a valid size for this algorithm.
Parameter name: key ---> System.ArgumentException: The specified key is not a valid size for this algorithm.
Parameter name: key
at System.Security.Cryptography.AesCryptoServiceProvider.CreateEncryptor(Byte[] key, Byte[] iv)
at Microsoft.Mashup.EngineHost.Services.EncryptedPersistentCache.EncryptedStorage.EncryptPage(Byte[] input, Int32 count, Byte[] output)
at Microsoft.Mashup.EngineHost.Services.TransformingPagedStream.WritePage(Int32 page, Byte[] buffer, Int32 length)
at Microsoft.Mashup.EngineHost.Services.PagedStream.Flush()
at Microsoft.Mashup.EngineHost.Services.EncryptedPersistentCache.EncryptedStorage.CommitStream(Int32 id, Stream stream)
at Microsoft.Mashup.EngineHost.Services.WriteBehindPersistentCache.AsyncCommitStorage(String key, TemporaryStorage storage)
at Microsoft.Mashup.EngineHost.Services.WriteBehindPersistentCache.AsyncCommitStorage(Object obj)
at Microsoft.Mashup.Evaluator.EvaluatorThreadPool.EvaluatorThread(Object state)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass7.<TryReportException>b__6()
at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action)
at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)
at Microsoft.Mashup.Evaluator.EvaluationHost.TryHandleException(Exception exception)
at Microsoft.Mashup.Evaluator.SafeThread2.HandleException(Exception e)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass15.<CreateAction>b__14(Object o)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I works now.  There were actually a couple of cache folders to delete.  One under Microsoft folder and another one after Power BI desktop folder.  

View solution in original post

9 REPLIES 9
noah-severyn
Regular Visitor

Just adding to maximpak's answer above to clarify. Deleting the folder C:\Users\#####\Microsoft\Power BI Desktop Store App did the trick for me.

maximpak
New Member

Hi all 

 

In my case, removing Cache from \Microsoft\Power BI Desktop\ didn't work. I removed it from \Microsoft\Power BI Desktop Store App and it worked.

 

Cheers

 

Max

v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Glad to hear the issue is gone. 

 

Thanks for your sharing as well. I will close this thread. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I works now.  There were actually a couple of cache folders to delete.  One under Microsoft folder and another one after Power BI desktop folder.  

View solution in original post

Anonymous
Not applicable

It just keeps creating the cache folder.  I have deleted the folder a couple of times.

v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Please try below steps:

 

1)With PBI Desktop closed, open up File Explorer and go to %LocalAppData%\Microsoft\Power BI Desktop\

2) Delete the Cache folder

3) Start PBI Desktop and attempt to open reports again.

 

Best REgards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

You're awesome !!! I ran into the same issue and delte the cache file worked now. Also, does the "cache" file keeps getting created again? If yes, would you knw why and how it can be stopped?

 

Thank you

I encountered the same problem in Power Query. (microsoft.mashup.evaluation.interface.errorexception / key length not a valid size)

 

Deleting the Cache folder :

AppData/Local/Microsoft/Office/16.0/PowerQuery/Cache

 

solved the problem.

 

Thank you so much @v-qiuyu-msft !

Anonymous
Not applicable

HELP! This solution stopped working for me today....  it worked for me last about a month ago

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors