Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Eeh1007
New Member

The specified key is not a valid size for this algorithm.

Reported a frown on this issue. Per the support email, I cleared the cache but am having the same problem.

I deleted all temp files per another user having the same problem but that didn't work.

I searched for a "program" file per another user in my c root directory and couldn't find any.

I'm in charge of PBI so I can't do my work!

Help please.

 

 

Feedback Type:
Frown (Error)

Timestamp:
2017-11-13T16:49:27.6338950Z

Local Time:
2017-11-13T08:49:27.6338950-08:00

Session ID:
73aaecbe-8942-4efa-81b1-693edaf40e52

Release:
November, 2017

Product Version:
2.52.4921.581 (PBIDesktop) (x64)

Error Message:
The specified key is not a valid size for this algorithm.
Parameter name: key

Stack Trace:
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.PagedStream.SeekToPage(Int32 page)
at Microsoft.Mashup.EngineHost.Services.PagedStream.Write(Byte[] array, Int32 offset, Int32 count)
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)

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Exception exception)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWin32Window activeWindow, WindowsHost windowsHost, FeedbackPackageInfo feedbackPackageInfo, Exception e)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
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.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass7.<HandleExceptionsWithNestedTasks>b__6()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


OS Version:
Microsoft Windows NT 6.1.7601 Service Pack 1 (x64 en-US)

CLR Version:
4.6 or later [Release Number = 393297]

Peak Virtual Memory:
3.81 GB

Private Memory:
425 MB

Peak Working Set:
520 MB

IE Version:
11.0.9600.18816

User ID:
4e5b35ce-59d3-4995-9912-ffdece90771d

Workbook Package Info:
1* - sv-SE, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Telemetry Enabled:
True

Screenshot:
screenshot.jpg

12 REPLIES 12
hellesof
Regular Visitor

This worked for me, thanks so much! 

Anonymous
Not applicable

I started to get the same error today. 

What is the solution ?

 

I cleard cashe by File -> Options and Settings -> Options -> Data Load -> Clear cache.

I checked if folders are empty in C:\Users\USERNAME\AppData\Local\Microsoft\Power BI Desktop\Cache

I removed temp saves in C:\Users\USERNAME\AppData\Local\Microsoft\Power BI Desktop\TempSaves

I removed all temp files.

 

I uninstalled and installed Power-BI Desktop.

 

But, none of these worked

Anonymous
Not applicable

Clearing the Cache worked for me

Anonymous
Not applicable

Update.  The problem persists once query editor is reopened.  I've opened a ticket and will follow up on this thread.

Anonymous
Not applicable

Support team was unable to identify the issue, so they escalated to the product team.  It's now been one week and I haven't heard back yet.  Unable to edit queries on any .pbix file at the moment unless I use another machine.

Anonymous
Not applicable

The issue was resolved by deleting the cache.key file here:  C:\Users\<username>\AppData\Local\Microsoft\Power BI Desktop\Cache

 

Cache.Key.PNG

Just had this problem @Anonymous and your tip worked a treat, thanks.

v-huizhn-msft
Employee
Employee

Hi @Eeh1007,

From the screenshot, it displays Query Editor in Power BI desktop, what operation did you do and got the error message? Could you please share more details for further analysis?

Best Regards,
Angelia

Hi Angelia, this happens with every table in query editor.  I created a support ticket since this it appears this is something in my c drive.  

Hi @Eeh1007,

Got it. Please waiting the solution they posted because you create a support ticket.

Best Regards,
Angelia

Greg_Deckler
Super User
Super User

Might want to try opening a ticket with support.powerbi.com.

 

What were you trying to do?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks - I am creating a support ticket now.  It appears to be some conflict with files in my c root.  I'm getting a new laptop which will solve the issue but obviously that is not a good solution to this error.  I get this with every query I do. It is not a problem on other computers.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors