iOS app created with meteor create doesn't run

Hi everyone,

I’m trying to start a new project using these steps:

  • meteor create simple-todos --blaze
  • meteor add-platform ios
  • meteor run ios-device
  • Add arm64 to Excluded Architectures on build settings (I’m on M1 Mac)
  • Hit run: App stuck on splash screen and I got the error below. (running on meteor version: 2.7.2, XCode 13.4.1, iOS 15.5 simulator)
2022-07-09 00:26:41.646712+0300 simple-todos[80618:21922343] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xc07f55ad aa617467 6e0bb79e c1a0d1c3 ... d5844058 fdbbc1ca }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0x167f74be 8c26847b be1afbc4 d0f8127e ... 1d550b65 5d17b7d1 }}
2022-07-09 00:26:41.648085+0300 simple-todos[80618:21922343] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xc07f55ad aa617467 6e0bb79e c1a0d1c3 ... d5844058 fdbbc1ca }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0x167f74be 8c26847b be1afbc4 d0f8127e ... 1d550b65 5d17b7d1 }}
2022-07-09 00:26:41.921814+0300 simple-todos[80618:21922122] [Process] 0x7f7e0182fc20 - [pageProxyID=13, webPageID=14, PID=80631] WebPageProxy::didFailProvisionalLoadForFrame: frameID=3, domain=WebKitErrorDomain, code=102, isMainFrame=1
2022-07-09 00:26:41.922675+0300 simple-todos[80618:21922122] Failed to load webpage with error: Frame load interrupted

When I use the Debug view hierarchy, I see that WKWebView instance isn’t even created.

What am I doing wrong?

Hi @osrl
Which node, meteor, npm version are you using?
I had no problems using Meteor with m1

Can you also try creating it with React?

node: v16.13.2
Meteor: 2.7.3
npm: 8.1.2

I got the exact same error with --react option

Hi @osrl, as a Meteor developer it would be great to keep an eye on this information: https://github.com/meteor/meteor/blob/devel/docs/history.md . I think this explains your problem.

Thanks @paulishca , should I downgrade npm and node?

edit: If that’s what you meant, I’ve downgraded npm and node to the mentioned versions but I still have the same error :frowning:

Just to rule this out entirely, when you run meteor node -v and meteor npm -v do you get the right version numbers?

The meteor tools should be checking these version numbers at the start and giving out a user-friendly error message. Too many developers are tripping on these version mismatches (a few from our team did). And with such errors, we are only seeing the tip of the iceberg or those who have time to post and ask questions. There is a big majority who are getting the errors and cannot proceed and just move on to another framework.

Yes @paulishca I get the right numbers

Screen Shot 2022-07-14 at 13.47.23

Ok, now that you are confident Meteor is running in the right environment, it look that your issue is not Meteor related :).

You would probably need to check your Mac M1 configurations, XCode environment and maybe find something valuable here: Failed to initialize client contex… | Apple Developer Forums.
What I can say, same as the other mention above, I have 0 problems building both Android and IOS with a Mac Mini M1.

I saw that thread earlier but no useful information there :frowning:

Do you use a device or simulator? Did you add arm64 to excluded architectures to run on a simulator?

I use a device and never bothers with the simulator because my works are mostly related to Push notifications.

So the problem might be a simulator issue I guess. Can you try with a simulator when you have time?

I am doing that now. Will get back in 30 min

@osrl ok I can confirm everything works fine.
Some mentions: I use Meteor without Rosetta, I built my app this time for IOS13.6 and IOS 15.5 with XCode 13.0 - compatible.
I use Meteor build ios-device (instead of meteor build ios) so I can get XCode pop up and from there I push to device or Simulator.

I am not sure why you did this: “Add arm64 to Excluded Architectures on build settings”. IOS runs on arm64. Check this out: Arm64 in excluded architectures - … | Apple Developer Forums
I do not exclude it.

okay, I can confirm that adding arm64 to excluded architectures (all three projects in the workspace) caused this. I add it because of OneSignal. It’s only built with that option for simulator. I get the following error when I try to run on simulator if I don’t:

ld: in /blabla/ios/project/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal(OneSignal-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/blabla/ios/project/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal'

By the way I build the app using this:
meteor build ../release --server https://foo.com --mobile-settings ./foo-settings.json --platforms=ios

Can you try same thing after adding OneSignal?