XOJO 2022R1 and R11 - "Error creating Universal App: #2-"

Hi…I’m working on two existing deployed Mac Universal apps. Both built fine with earlier Xojo releases (2021). When XOJO 2022R1 was released, app1 built fine, but app2 gave me in error on building (see below). Just today, I downloaded XOJO 2022R11 hoping the new update would either fix the problem or at least give me a more detailed error message. So, I tried again with the latest R11 release. And, just like before, App1 built fine but app2 gave me the same error as shown below which said “Error creating Universal App: #2 -”…it’s as if it cut off the remainder of the error message, so I’m not sure what the error message is telling me. Any ideas?

Screen Shot 2022-05-03 at 12.45.59 PM

IO #2 in a Mac probably means “file or directory not found”. Something has broken.

Try executing xojo from the terminal, maybe you could see some extra info outputted.

The text in those dialogs are usually selectable. If you click at the left of the label and drag down to the right, you should be able to get more if there is any.

That said, you wouldn’t happen to have any build scripts that might be trying to move the resulting app, would you? A few bugs were fixed, most notably:

  • currentBuildAppName now always includes the .app extension instead of being dependent on the Finder preference.
  • currentBuildTarget is now set to 9 (Universal Binary) instead of 16 (ARM) when building a Universal Binary.
1 Like

Thanks for thoughts and ideas Rick and Greg. I’m not using build scripts. I did try dragging across the text of the error message to see if I could get it to scroll, but no luck. Dialog is also not able to be resized. When I tried to build it again, I selected some of the text of the error message, I was then able to do a Command-A to select all of the message and paste it elsewhere, in hopes it might give me more of the error message, but nothing more just the same “Error creating Universal App: #2 -” as before. So, back to the drawing board. A hint might be that my app1 doesn’t give the error message and app2 does…so maybe that’ll help me track down the problem.

Just out of curiosity, did the IDE produce a built app in the end, even though you got the error?

No. I could find no built-app. BUT…after I click the OK button on the error message, the build process does continue. It happens too fast to read, but I did a little screen recording of the screen. Here’s what I found…as you know Xojo gives you a running commentary on what it’s doing during the build. The feedback says “Packaging universal binary” when the error message appears. After I click OK to dismiss the error message, the build process continues and I see…“Running Post Build Scripts” then “Signing” then “Running post-signing scripts” with “Running step sign” underneath…then the process finishes, but no built-app. (And any reference to “scripts” in the above text must be referring to scripts that Xojo provides as I didn’t do anything special with custom scripts or anything.) You (and Rick) both might be on to something, it does sort of feel like something isn’t where it should be.

The steps that appear in the new build window could certainly be empty and if they are, they’ll certainly flash by. I fear that Xojo is the only one that will be able to figure this out though. You may have to send them the source for that project to figure this out.

Just out of curiosity, does this project that’s failing compile in 2021r3?

//Just out of curiosity, does this project that’s failing compile in 2021r3?

I know it had no problem in 2021r21 (I may not have used 2021r3 so can’t say.)

It would be helpful to know that because if it does, it would narrow down the possibilities… and since you have a license for 2022r1, you also have one for 2021r3. Please give it a try.

//It would be helpful to know that because if it does, it would narrow down the possibilities… //and since you have a license for 2022r1, you also have one for 2021r3. Please give it a try.

Thanks for continuing thoughts. I will try that later when I get a chance. I notice I have the installers for 2021r3 and 2021r31.

//It would be helpful to know that because if it does, it would narrow down the possibilities… //and since you have a license for 2022r1, you also have one for 2021r3. Please give it a try.

OK. Done. I did a build using 2021r3 AND 2021r31, and both resulted in a successful build of the application. Only when I do a build using 2022r1 and 2022r11 do I get that rather incomplete error message saying “Error creating Universal App: #2 -” during the build process.

Not sure what they did in 2022r1, but in 2022r1.1 they stripped some “probably unnecessary” contents introduced in r1 out:

68282 Build Reduced non-Universal macOS app size by stripping unused architecture parts from the final build.

Is there by any chance some non-ASCII chars in the path to those projects? like /whatever/âxxxçxxxöxxx/ ?

//Is there by any chance some non-ASCII chars in the path to those projects? like /whatever///âxxxçxxxöxxx/ ?

Good idea, but nope, not that I can find. Just for yucks, I deleted the BUILD folder within my project folder, and then built the app again…again I got the error message as before, and it did re-create the Build folder with a Universal subfolder but still nothing in it.

I’m still thinking it must be something I am doing wrong, because otherwise I’d be seeing a lot of complaints about this mysterious error from others.

Have you tried to build an empty project or an example?

The mystery here is the fact of that it compiles without problems with previous compilers. This pushes the guilt towards the IDE more than you, and that crappy half baked no clue error message seem to confirm it.

// Have you tried to build an empty project or an example?

Not specifically, but I do have another project (with the same history of Xojo versions past and present) that does NOT present this problem, and builds just fine.

Are you able to build separately for ARM and x86 64-bit?

This looks like it is happening when those separate builds are attempted to be glommed together into a Universal binary. It would be a great help if you could create a private Feedback case and attach your project so that we watch what is happening when it gets built here.

//Are you able to build separately for ARM and x86 64-bit?

Thanks for chiming in Paul. YES, I believe I can build them separately. I just built the x86 64-bit fine on its own, and I was able to build the ARM (resulting in my app with the icon with the circle with the diagonal line across it…the “No-No” icon, I presume meaning I can’t run an ARM app on my Intel-based iMac. So, YES…it seems the glomming together of both versions is getting closer to the problem.

I’m a little unsure about sending my project to Xojo as it is now, but thank you very much for the suggestion and may take you up on it soon. I wonder if I could ask you…have you not heard of this problem before? If I’m the first, sure sounds like the problem is on my end!! And, by chance, does the error message ("#2 -") mean anything to you? Thanks!

Can you clone it to another folder, see the error persisting, remove almost all content but keeping the error? That may solve your worries of sending the project.

I have not seen this problem elsewhere.

The Build process did change quite a bit in 2021r1, so it’s possible that something in your app is hitting a situation we did not anticipate.

As @Rick_A noted above, Error 2 seems to be a File IO error, perhaps with copying or moving these pieces around.

1 Like