iOS Build Environment Help Center

fatal error: realpath() call failed

append delete Impeding2823

Hello! The builder errors out at the end, while (after?) signing.

Using the project builder for Unity - Unity 2020.3.35 LTS project

Windows version: 10 (21H2)
Builder version: 3.48
iOS SDK version: 15.5 (also tried with 15.0 earlier but no change)

%
 + Signing code as iPhone Developer: My Name ([removed]) with team ID [removed]...
fatal error: realpath() call failed in recursive_list_every_file_in_this_bundle() while calling realpath()
Press any key to continue . . .
%

Full log: https://pastebin.com/U352i9Bi

I'm unable to try a build with XCode right away but I'll try to arrange for it ASAP. From my (admittedly very limited) understanding though, this looks like something on the Windows side.

Thanks!

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

Looks like you hit a crash bug in the code signer. It's been a long time I haven't seen one. May I ask you to zip and send me your app directory so that I can reproduce the problem ? It's located in build\Release-iPhoneOS\iPhone-target\YourAppName.app (confidentiality guaranteed).

Thank you in advance.

:: @Pierre-Marie Baty added on 02 Jun ’22 · 11:49

P.S. don't bother trying with Xcode, this one is clearly the builder's fault. Also, it should be simple to fix so you can expect a solution quickly.

append delete #2. Pierre-Marie Baty

Well received. Bug reproducted. Investigating now.

:: @Pierre-Marie Baty added on 02 Jun ’22 · 12:08

*edit* I see. The problem is caused by your Asian languages CSV files. Their filename contains Unicode characters that are causing a problem somewhere. Probably a missing codepage conversion, I have to find out where exactly.

append delete #3. Impeding2823

Ah! I won't bore you with the details but for now I can move ahead without the fix, so it's not a huge priority for me personally. Thanks a lot for the blazingly fast help.

append delete #4. Pierre-Marie Baty

Okay. Contrarily to what I thought it won't be a simple one to fix. The cause is that the Windows filesystem stores paths in UTF16 format whereas in most POSIX systems (including macOS) paths are stored in a codepage-agnostic manner on the filesystem, but userland tools expect to find UTF8 here. While for the standard ASCII codepage, the characters map equally (taking one byte out of two in a UTF16 stream containing only ASCII characters is enough to do the conversion), when non-ASCII characters are encountered things complicate badly, because in UTF-8 these characters may be stored in 2, 3 or even 4 bytes beginning with an escape sequence code. There are functions to do that sort of conversion, but they're costy performance-wise, and it gets worse because after conversion, you no longer can pass these strings to the Windows file I/O API functions to do something on these files, because these functions expect either plain ASCII or UTF-16 only.

If you can just rename those files to ASCII characters, it'll be enough of a workaround for the code signer, while I decide on the best way to solve this issue. I know that in Win10 there's an option to pass UTF-8 to the ASCII version of the file I/O APIs, but that option doesn't exist in previous versions. It's getting more and more complicated to support Windows 7...

append delete #5. Impeding2823

In my case the files aren't necessary at all (they only matter for desktop, on mobile they were already embedded), I just didn't get around to implementing a cleanup step before, so I'm all good to go with 2 lines of code. Just launched the build on my banged up iPhone.

I really appreciate all your hard work wrangling this stuff. The builder is going to save me (and the planet) from buying an Apple device whose only purpose would be to let me participate in the walled garden. That's all from me for now, again - thanks a lot!

append delete #6. Pierre-Marie Baty

Glad to know you're out of trouble.

Don't hesitate to spread the word about this toolchain, that is (call it a philosophic choice) my sole source of publicity.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty