iOS Build Environment Help Center

parameter format not correct - 437 CocoaPods

append delete flamacore

• Windows version: Version 10.0.19045 Build 19045
• Builder version: 3.59
• iOS SDK version: 16.4

Trying to build a Unity project. I've built this project before fine, till I added ironSource and thus, CocoaPods.

When trying to deal with CocoaPods, after I prompt Accept, the cmd window keeps throwing the error Paremeterformat falsch - 437 (in German) and I assume the english version would be Parameter format not correct or incorrect. The error throws every second and although I increased the time for daemon check to 500 from 120, it still fails to detect the daemon. I presume it has something to do with the error.

Any ideas?

Reply RSS

Replies

append delete #1. flamacore

And additional note: PC power is not a question here. Building pc is a very beefy one.

SS when it finally can't reach the daemon: https://postimg.cc/SX46TvBn

append delete #2. Pierre-Marie Baty

Hello

I'm in the process of doing a big upgrade of the CocoaPods daemon (upgrading the OS in the underlying VM, updating Ruby, and updating CocoaPods itself) so the next version (3.60.1) should hopefully fix this problem. It'll be ready in a few days.

append delete #3. flamacore

Hey again. I've updated and sadly it's not fixed. I still get the Parameter format not correct error and now plus it complains about some 32bit number limit issue. I presume it's about integer number limit? The exact error is something like this: Invalid number. Numbers are limited to a precision of 32 bits.

append delete #4. Pierre-Marie Baty

Can you provide a log please so that I can better understand what you're describing ?

append delete #5. flamacore

Of course, not much to go on with really sadly but here it is for what it's worth:

https://pmbaty.com/paste/?f5652cd0a67c59bc#6Lm5e6WTgNw2mRCkkXopezQBMgpJjyjT2yM9osUnaiN2

Feels like the daemon just doesn't start in any way. And again, pc is a very beefy pc. i9-12 series cpu, done a lot of virtualizations myself before. Multiple VMs running at the same time etc. without a hitch.

append delete #6. flamacore

Can you maybe guide me on how to debug this better? Maybe add a few lines to the cmd to make it pour more info for you to better understand for example?

append delete #7. Pierre-Marie Baty

Yes. I suspect an executable is called which is not the right one. Please open cmd.exe and type "set". Then post the output. This will show me your environment variables. If there is sensitive data, please redact them out before posting.

Alternatively you may try this:
1. Create a new, empty Windows account and try running the builder from there. Does it work ?
2. Try switching your Windows account’s locale to English/U.S. Does it work ? (I’m not particularly hopeful with this one as I usually do my tests from a French version of Windows and it seems unrelated. But we have to try nevertheless).

append delete #8. flamacore

Boy that's gonna be long :D Here it is. I also prettified the path variable in there and redacted important info.

https://pmbaty.com/paste/?0c80c65f1b59a357#Ahqxu7Kfj9thvK3GiMDwffvVw1gbRQh7X9UNypzDFHtV

append delete #9. Pierre-Marie Baty

Okay

Indeed your PATH environment variable is one of the longest I’ve seen, if not the longest at all.

What looks problematic with it is the fact that all your additional search paths are defined *before* the standard search paths. So for example if one of those extra search paths contained a tool that’s named identically to a standard Windows tool (for example "find.exe") then that tool would be called instead of the normal tool. Which might explain the curious error as the substitute tool may expect other parameters than the Windows one.

Creating a new Windows user account with an unpolluted environment and testing in it would confirm or infirm the diagnosis. Can you do that ?

append delete #10. flamacore

Thanks. Yeah I know. I do millions of things on this machine :D

I will try that when I get the time - quite possibly today. Will report back with results.

append delete #11. Pierre-Marie Baty

Another thing you can do is this: reset the PATH environment variable to a strict minimal value.

Edit Toolchain\cocoapods\cocoapods.cmd and right after the ":startup" label, add this:

% cocoapods.cmd
:startup

rem // for safety, rebuild a minimalistic, default PATH. This is the default PATH for Windows 10.
set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
%

Let me know how it turns out.

append delete #12. flamacore

Ok so tried both things. I feel like there's no need to share the log because it's exactly the same...

I'm also trying cocoapods 1.7 for windows btw. I think it can also work. Any advices on that part? Powershell can execute cocoapods for sure.

append delete #13. Pierre-Marie Baty

PowerShell can execute Ruby which can execute CocoaPods on Windows, but really, if that was a viable solution I wouldn't have gone through the pain of creating such a complicated setup to make it run. the CocoaPods master repo hosts countless user-supplied modules, 99% of which are submitted from an operating system which uses a POSIX-compliant filesystem. What happens when you try to download pods from Windows on a Windows filesystem is that you too often end up with failures because, for example, a random chinese guy created a pod whose name ends with a space character, and that is illegal as a file/directory name on Windows. Or the name contains a slash, or a colon, and Windows can't create it. Or a pod hosts files with very long names in a great number of nested subdirectories which makes the total absolute pathname exceeds the MAX_PATH limit on Windows which is 260 characters. Or...

The only restriction for file names on a POSIX filesystem is that the file names must not contain a slash, which is the directory separator character.

On Windows, the restrictions are many. The filename must not exceed a certain length, it must not contain a dozen forbidden ASCII characters : slashes, backslashes, colons, etc ; it must not *end* with some characters (spaces for example), and its total path from the drive root must not exceed 260 characters. This is just impossible to make CocoaPods work reliably when it runs natively on Windows. Hence the VM.

Looking at what can print "Parameterformat falsch - <something>" among the Windows tools I think it's the "chcp" tool. Its output format changed recently (a very bad thing!) and now it includes a dot. https://github.com/python/cpython/issues/78325

The script tries to store the current codepage by parsing the chcp tool output. It already strips spaces:

% cocoapods.cmd line ~40
rem // get the current codepage
for /f "tokens=2 delims=:" %%a in ('chcp') do set ORIGINAL_CP=%%a
set ORIGINAL_CP=%ORIGINAL_CP: =%
%

but your situation tells me that it should also strip dots from the output:

% cocoapods.cmd line ~40
rem // get the current codepage
for /f "tokens=2 delims=:" %%a in ('chcp') do set ORIGINAL_CP=%%a
set ORIGINAL_CP=%ORIGINAL_CP: =%
set ORIGINAL_CP=%ORIGINAL_CP:.=%
%

Try this patch and let me know what it does please.

append delete #14. flamacore

(HARD agree on every point you make about CocoaPods being a lame-ass lazy pseudo-repo)

That is indeed a criminally bad msitake to change a core format like that. Weird stuff. The error disappeared after I added your line and it finally started to build properly!

Thanks a TON for helping me through this. Big kudos for you.

However, seems like IronSource has some shell script to include its frameworks (I think?) and the tool obviously can't execute it and warns me about it. I'll send you a log below:

https://pmbaty.com/paste/?f3c3b32580500988#Fq8TfupWqAqu7AR4EN7FmAb2vNc6wkuHcV27TZVuv4iE

I guess it's just me being out of luck but is there anything I can do to ensure build stability at this point or is this a lost cause? :)

append delete #15. Pierre-Marie Baty

The build system makes a lot of effort to compensate for these shell script-based custom build phases. It manages to lay out the necessary frameworks properly, except when there’s resource data files. In this case they must be laid out by hand using a pre-packaging script.

From what I see in your build log, your app seems to build successfully. That means 95% of the job is done.

Now you should test it on your phone ; if it works, congratulations ! If not, use the remote debug console to catch the error logs and provide it with what it needs (a missing Info.plist key with your ad publisher ID is by far the most common cause). Read the framework publisher’s documentation to find out what needs to be done. Post the crash log here if you need help.

append delete #16. flamacore

Sad to report that it doesn't work. IronSource doesn't seem to initialize at all. Thing is I'm using TestFlight and have been using it for a long time. Don't think I have an ad-hoc certificate so I'll need to generate, shoot up the mac VM, run the SDK migration again etc. with all the shennanigans.

Anyways. Thanks a lot for the effort regardless.

I'll report if I can easily get to that point.

append delete #17. Pierre-Marie Baty

There’s no reason it doesn’t work if you followed the steps indicated by IronSource themselves here :

https://developers.is.com/ironsource-mobile/ios/ios-sdk/#step-1

Just read through everything. I see that you need to build using the -ObjC linker flag and that some plist files require to be updated. Have you done so ?

append delete #18. flamacore

Hmm, simply to say: No.

Sadly I know only a little of the Xcode part of things. When I build the project from Unity and then just Archive and upload to app store from Xcode in my mac VM, it just simply works fine. I didn't need to do anything like this at all.

But still, could it be something that solves things? I could give it a try. Dunno where I would start but I can dig in for sure.

Question still stands tho. I didn't do anything like that for the Unity -> Xcode in Mac VM. Is that to be expected?

append delete #19. Pierre-Marie Baty

It will solve things, absolutely. Many users already successfully built and published projects that use IronSource. All is needed is to understand the IronSource instructions.

Is this configuration expected ? Yes, it is. Using the CocoaPods daemon helps you *build* your pods automatically, but *configuring* your assets is still to be done manually by following the asset publisher's instructions. The same would be true for Google Ads and other ad frameworks.

The -ObjC linker flag that you should use at build time should already have been added by the CocoaPods daemon. So your next task is to do the changes indicated by IronSource to your project's plist files.

I can't stress enough how important it is to test your iOS app on a real device with the remote debug console enabled. The logs are generally immensely helpful in this situation because they tell you exactly why something doesn't work - and you can deduce what remains to be done to make it work.

:: @Pierre-Marie Baty added on 21 Nov ’23 · 16:17

*edit* About your remark: "Sadly I know only a little of the Xcode part of things. When I build the project from Unity and then just Archive and upload to app store from Xcode in my mac VM, it just simply works fine. I didn't need to do anything like this at all." -- Xcode can do all that automatically, because your project contains shell scripts in its "custom build phase" step. But these scripts run Apple shell commands. They can't run on Windows: the command-line tools are not the same. But these scripts simply do automatically what the IronSource documentation instructs developers to do manually, which is why it has to be replicated by hand (or automated using a tailor-made Windows-specific batch script) when building on Windows.

append delete #20. flamacore

Hmm ok that changes things.

First, thanks a lot for patiently guiding me through this.

So I do see that the plist file already contains the suggested part but that's not the point here. I get your idea. I should be able to figure stuff out if I follow through their guide it seems. Which is already a good start for me to follow.

Again, big thanks :)

append delete #21. Pierre-Marie Baty

Don’t hesitate to ask for explanations on anything you would have difficulties to understand.

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