UWP app submission failure due to unsupported API FindFirstFileEx (WACK passes locally)
Asked Answered
S

4

9

I have a UWP project included as part of my Xamarin.Forms solution. When running the Windows App Cert Kit locally, it passes without any issues.

When submitting my app to the store, it fails the certification process with the following error:

Error Found:

The supported APIs test detected the following errors:

API FindFirstFileEx in api-ms-win-core-file-l1-2-0.dll is not supported for this application type. PInvoke.Kernel32.dll calls this API.

Impact if not fixed:

Using an API that is not part of the Windows SDK for Windows Store apps violates the Windows Store certification requirements.

How to fix:

Review the error messages to identify the API that is not part of the Windows SDK for Windows Store apps. Please note, apps that are built in a debug configuration or without .NET Native enabled (where applicable) can fail this test as these environments may pull in unsupported APIs. Retest your app in a release configuration, and with .NET Native enabled if applicable.

I have verified that my app runs in Release mode, and have verified my UWP build settings:

uwp

I tried contacting Microsoft's Chat support, but was redirected to enter an Incident Report, where I was then redirected to just ask for help on a forum or pay for advanced tech support, so I haven't been able to get any more information about whether this is a valid failure or not.

Based on the documentation found on FindFirstFileEx (https://msdn.microsoft.com/en-us/library/windows/desktop/aa364419(v=vs.85).aspx), it looks like it is supported by Windows Desktop, Store apps, and Windows Phone. My UWP app was submitted to support Desktop and Mobile families, which seems to be included in the supported clients of this function, so it is unclear as to what is causing the failure.

Any ideas on where to go from here?

Screech answered 24/7, 2017 at 19:16 Comment(1)
I was informed today by Microsoft support that this issue has been corrected. After resubmitting, my apps appear to have passed certification now as they are in "Publishing" status.Vagal
P
6

Update August 14 2017: This problem should now be resolved in the Store. Please try to re-submit your apps if you hit this issue.


This is a problem in the way the WACK scan is running in the Store, and how it integrates with .NET Native.

For some background, Windows doesn't actually have an API named FindFirstFileEx - it doesn't exist. And the way the WACK's supported API scan works is that it looks at all the APIs you call and verifies if one of the following is true:

  1. It's an API exported by another DLL in your package
  2. It's an API explicitly mentioned in the allow-list

In the case of kernel32.dll!FindFirstFileEx, WACK sees that kernel32.dll doesn't exist in your package so it has to check the allow-list. The allow list doesn't mention FindFirstFileEx because it doesn't exist. Here's what does exist:

C:\Program Files (x86)\Windows Kits\10\App Certification Kit>findstr FindFirstFileEx SupportedAPIs-x64.xml
    <API Name="FindFirstFileExA" ModuleName="api-ms-win-core-file-l1-1-0.dll"/>
    <API Name="FindFirstFileExA" ModuleName="api-ms-win-core-file-l1-2-0.dll"/>
    <API Name="FindFirstFileExA" ModuleName="api-ms-win-core-file-l1-2-1.dll"/>
    <API Name="FindFirstFileExA" ModuleName="api-ms-win-core-file-l1-2-2.dll"/>
    <API Name="FindFirstFileExA" ModuleName="api-ms-win-downlevel-kernel32-l1-1-0.dll"/>
    <API Name="FindFirstFileExW" ModuleName="api-ms-win-core-file-l1-1-0.dll"/>
    <API Name="FindFirstFileExW" ModuleName="api-ms-win-core-file-l1-2-0.dll"/>
    <API Name="FindFirstFileExW" ModuleName="api-ms-win-core-file-l1-2-1.dll"/>
    <API Name="FindFirstFileExW" ModuleName="api-ms-win-core-file-l1-2-2.dll"/>
    <API Name="FindFirstFileExW" ModuleName="api-ms-win-downlevel-kernel32-l1-1-0.dll"/>
    <API Name="FindFirstFileExA" ModuleName="kernel32.dll"/>
    <API Name="FindFirstFileExW" ModuleName="kernel32.dll"/> 

Note there are a bunch of entries for FindFirstFileExA and FindFirstFileExW, which are the APIs that actually exist. Whenever your app tries to call FindFirstFileEx, it's actually calling one of these instead.

For C / C++ developers, the pre-processor actually replaces FindFirstFileEx with the A or W version based on the existence of the UNICODE macro.

For .NET developers, the JIT runtime (or, in .NET Native's case, the compiler) figures out whether to call the A or W version based on the specifics of the DllImport attribute, such as the values of the CharSet and ExactSpelling properties.

And herein lies the problem - at the moment, WACK in the Store is running on .NET assemblies before the compiler has substituted the non-suffixed version with the correct suffixed version. When you run WACK on your development machine, it correctly checks the assembly after the compiler has made the substitution, so you see no errors.

The first part of the fix (which is in the works) is to add the non-suffixed versions to the allow-list. The second part of the fix is to make sure WACK runs on the post-compiled bits.

Paulino answered 25/7, 2017 at 5:40 Comment(12)
Thanks for the update. Should I add notes to the "Notes for certification" section prior to submission, or add them to the "Certification Report Feedback" after the certification fails?Screech
I tried adding notes to the "Notes for certification" but it seems that I still hit the same failure...is there a way to request a closer review after the initial certification fails with this error?Screech
The latest that I heard from Chat Support is that it is a known issue, but there isn't a way to get my app certified until it is fixed. They entered a service request and promised to send weekly updates until the issue is resolved...are you aware of any alternatives?Screech
I have the same issue.. The "send weekly updates" makes me a bit nervous. Would be kinda bad if I couldn't publish an update for weeks.Dekaliter
Same for me for MoveFileEx, FindFirstFileEx and FindNextFile. After struggling with a serious .NET Native bug (https://mcmap.net/q/1316176/-avoid-net-native-bugs), I finally wanted to publish my app today, without success. How long can it take to add strings to a white-list? Why is Microsoft doing such a bad job regarding apps and app store? The whole .NET Native thing is still immature. But they force us to use it.Nuss
I just learned that "Notes for certification" doesn't work for automated failures, sorry. You should reach out to CSS via chat, call, or open a web ticket for help with this failure until the fix is deployed.Paulino
Thank you, @PeterTorr-MSFT, I used the chat, see my answer.Nuss
I tried the chat and they told me to wait 3-5 days for a response from the certification team. What a joke.Vagal
same here. that was 7 days ago and the only thing I heared was that he has holidays and a collegue will keep me posted. I don't know. Except of @PeterTorr-MSFT people at MS doesn't seem to take that seriously. otherwise I wonder how they can't provide a proper fix or work around in a useable time frame.Dekaliter
Have you tried contacting support to get a waiver? Sorry that this is causing problems for your submission.Paulino
I was informed today by Microsoft support that this issue has been corrected. After resubmitting, my apps appear to have passed certification now as they are in "Publishing" status.Vagal
@PeterTorr-MSFT I contacted the support, but they saied they have to check back with the engineering team and they will keep me posted. so far I haven't heared something from them again. but as tayler saied, the issue seems fixed now.Dekaliter
N
3

I had the same problem. I opened a chat session (from the dev center), as Peter Torr suggested.

Here is the summary:

Me: My app update is stuck because you have a bug in your certification system. See here: UWP app submission failure due to unsupported API FindFirstFileEx (WACK passes locally)

Support: We are aware of the issue, and are working towards a resolution. I apologize for the inconvenience

Me: Ok, I understand that you are working on the bug. But in the meantime, you could let my app pass, right?

Support: We have a temporary workaround. I can get that info for you if you'd like?

... some minutes later ...

Support: Ok so what I'll need you to do is resubmit your package but include this number XXXXXXXXXXX in the notes for cert section. If that does not work and you app fails cert again, submit feedback on the most recent failed cert report and again insert the number there. I've notated your account to reflect this as well

(real number replaced by XXXXXXXXXXX)


Update 1: Just like @jkh, the automatic certification failed again despite of the number. So I posted the number in a certification feedback.

Update 2: Unfortunately, the "solution" did not help. I now have written an e-mail to the one from the chat support (I got his address after the chat). I am not very confident that this helps. But let's see...

Update 3: I also submitted an incident. (This can be done where you normally start a chat session, but use the button "Submit incident" below.)

Update 4: Answer from incident submission:

Thank you for contacting Developer Support. I understand you have failed certification due to Window Store Policy 15.1 per the API error. After further review I wanted to let you know this is a known issue and currently being worked on a fix by engineers. There should be a fix being rolled out soon and ask that you please wait. If the fix is not implemented by Monday I can have this issue looked into further but since this is a global issue I would recommend to wait for the fix to be rolled out. The moment I hear something as it pertains to the fix I will be sure to reach out and ask that you please try again for certification.

Update 5: I re-submitted my update and I am now waiting for the result.

Update 6: Failed again...

Update 7: Response from incident submission: This is still an ongoing issue and have escalated your issue to our Internal team for further investigation to try and bypass this error for you. Once I receive an update I’ll be sure to reach out.

Update 8: Eventually, after re-submitting, the certification process took two days (!), but now my update is in the store. Wow, what a fight...

Nuss answered 1/8, 2017 at 17:14 Comment(9)
Thanks - I just did the same, and was given a number to add to my Notes for Certification. It is currently in the pre-processing stage, so I'm hoping for the best...Screech
My resubmission failed with the same error, even after adding the reference number that I was given by Chat support. I added the notes to the Certification Report Feedback, and will wait to see if there is any progress.Screech
So far, there has been no movement with the Certification Report Feedback...it seems as though this temporary workaround is not working. Have you had any better luck?Screech
Yes, same for me. :-(Nuss
There's definitely a lot of miscommunication going on with this issue. The Certification Report Feedback response directed me back to Chat Support, who then told me to resubmit the Certification Report Feedback with the reference number again, and that the feedback team was expecting it this time. I just got the latest Certification Report Feedback response, which was just a generic response directing me back to Chat Support for dealing with WACK failures...Screech
Has anyone managed to get a submission accepted? MS support told me this would be resolved by last Friday but it still fails now. I submitted a post on social.msdn too: social.msdn.microsoft.com/Forums/en-US/…Fuji
I contacted the support as well. He saied he will check with the engineering team and come back to me. after 3 days he saied he will be out of office for the next couple of days and that a collegue will come back to me. so far nothing...Dekaliter
No update from Microsoft support but we've just been re-submitting our application daily in the hope it goes through and it has just been successful. Worth retrying if you are still waiting for this.Fuji
Can you try now? I've heard that some other folks have made it through submission this morning.Paulino
U
1

I'm facing the same problem. Have submitted a certification feedback report, awaiting some response from Microsoft...

Unaesthetic answered 24/7, 2017 at 21:46 Comment(2)
Is it the same API function, FindFirstFileEx, for you as well?Screech
It's the same function, yes.Unaesthetic
Z
0

After opening a ticket with Microsoft a few weeks ago I have finally been provided a waiver on my account that allowed me to pass the automated certification.

DO NOT RESUBMIT. I had been told to resubmit and provide certification report feedback on that solution. After resubmitting a few times, I received email responses that my submission had been manually passed, but these submissions had been deleted each time that I resubmitted, so my app still had not been pushed through.

One submission with the number you receive from Microsoft support included in the Notes for Certification and the Certification Report Feedback and with a ticket open with Microsoft will eventually get your submission passed.

Zacharyzacherie answered 14/8, 2017 at 18:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.