0

While trying to export (distribute) an archive (Mac M1 Ventura 13.3, Xcode 14.3) I get the following error:

The operation couldn’t be completed. (AppThinning.StubError error 1.)

The logs show the following error:

'/Library/Ruby/Gems/2.6.0/gems/sqlite3-1.6.0/lib/sqlite3/sqlite3_native.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

In the past, I've ran Xcode using Rosetta, which isn't possible anymore...

So it seems like an Arm / x86 issue...

I've tried (from here):

gem install CFPropertyList

gem install sqlite3

And even

gem install sqlite3 --platform arm64-darwin

No luck... Any ideas?

user6097845
  • 1,257
  • 1
  • 15
  • 33
  • Why did you have to run Xcode under Rosetta in the past? Something else must be going on that made you think you had to do that. What was it? There is something _in_ your app that is causing this. What is it? You need to get to the real heart of the problem. For example maybe you have a bad pod. – matt Apr 02 '23 at 13:52
  • Also it's interesting that you are able to say `gem install` without saying `sudo`. That's _good_, because you should _never_ install any gems into the _/Library_ Ruby. It suggests, though, that you have another Ruby somewhere. Right? – matt Apr 02 '23 at 13:54
  • I have to admit that I have very little experience with all the tools that Xcode uses. I'd love to know how I can get to the bottom of that issue and somehow "reset" all the tools and libraries that Xcode uses on my Mac M1, in order to be able to correctly use XCode – user6097845 Apr 02 '23 at 13:56
  • How can I find out the "heart of the problem" here, as you described here? Find out which library/tools I have, and maybe uninstall and re-install the correct ones? – user6097845 Apr 02 '23 at 13:57
  • Well, there's an easy way to do that: erase your hard drive and reinstall Ventura. It does seem like maybe you have somehow lamed the system Ruby, but that's just a guess. It would be interesting to know if you can export an archive from a plain vanilla project. If you can, the problem lies in this _this_ app. As I said before, maybe it's a bad pod. – matt Apr 02 '23 at 13:58
  • But one thing is certain: you should never never never touch the system Ruby in any way. If `gem install` means install into the built-in system Ruby, _don't do it_. For instance, to install cocoapods, start by installing _your own Ruby_ under `rbenv` or `rvm` (I like `rbenv`). – matt Apr 02 '23 at 13:59
  • Yeah, reinstalling my HD would be the "clean" way, but I prefer to try other options before I do that. How can I query the pods I have and isolate the problematic one? – user6097845 Apr 02 '23 at 14:00
  • If `cocoapods` is installed in the system Ruby, they are _all_ problematic. Open _/Library/Ruby/Gems/2.6.0/gems_ and look in it. Do you see more than about 10 gems? Do you see _cocoapods_? If so, that's the problem. – matt Apr 02 '23 at 14:02
  • see a lot more than 10... Don't see cocoapods... – user6097845 Apr 02 '23 at 14:05
  • So that sounds like you've been installing gems into the system Ruby. That is wrong. But I'd be curious to know where cocoapods is. – matt Apr 02 '23 at 14:08
  • any advice on how to sort it all out, without reinstalling my Mac? – user6097845 Apr 02 '23 at 14:09
  • Not really, no. Maybe I would if I knew the details of what you've done with Ruby here, but I don't know them. It doesn't seem like you do either, which is probably the heart of the problem. – matt Apr 02 '23 at 14:19
  • well, reinstalling it is, I guess. Thanks :) – user6097845 Apr 02 '23 at 14:36
  • Well, before you do anything drastic, convince yourself as I suggested before about what the state of things is. Can you export the archive made from a plain vanilla project, with no pods? – matt Apr 02 '23 at 14:37
  • I'll test this and see what happens – user6097845 Apr 02 '23 at 14:41
  • check this link https://stackoverflow.com/questions/73777636/the-operation-couldn-t-be-completed-appthinning-stuberror-error-1 – Maziar Saadatfar Apr 09 '23 at 20:36
  • Looks like you just need to install a 'sqlite3' version that's supports arm64 as you said, to get a better look at what version support which ruby version you can look here https://rubygems.org/gems/sqlite3/versions, If there is a version which support arm64, and requires ruby version higher then 2.6 i suggest doing what @matt has said and installing a different ruby version using either rbenv, brew or rvm. – Mr Spring Apr 27 '23 at 11:39

0 Answers0