skip to Main Content

Introduction/Problem Replication

I encountered this issue with my react-native project, and decided to use a brand new project straight from the react-native site to try and fix the issue.

Problem:

I pod install, my build configuration is set to Debug, and whatever else was needed to get the build up and running.

The message "Build Succeeded" pops up with no errors. But then I receive this (os.kern) no space available error.

Visible Error Message Here

Error Details:

(os/kern) no space available
Domain: NSMachErrorDomain
Code: 3

What I use:

My Computer: iMac Late 2015

OS: macOS BigSur 11.2.3 (Build 20D91)

Available Memory: 200GB

XCode 12.4 (17801) (Build 12D4e)

Relevant Packages:

react:^17.0.1
react-native:^0.64.0

Apple Delegate.h:

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>

@property (nonatomic, strong) UIWindow *window;

@end

Apple Delegate.m:

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#ifdef FB_SONARKIT_ENABLED
  InitializeFlipper(application);
#endif

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"MyTestApp"
                                            initialProperties:nil];

  if (@available(iOS 13.0, *)) {
      rootView.backgroundColor = [UIColor systemBackgroundColor];
  } else {
      rootView.backgroundColor = [UIColor whiteColor];
  }

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end

What I’ve Tried:

  • Issue started in Catalina, decided to upgrade BigSur to see if it
    would alleviate issue. Issue persists.

  • Tried both processes on bash and zsh terminals. Issue persists.

  • Tried with other react-native projects. Issue persists.

  • (Possible Solution?) Attempted to use the command npx react-native run-ios, installs the app on the simulator but ends up crashing on the storyboard. Still issue persists.

2

Answers


  1. Chosen as BEST ANSWER

    Update 1

    Right, 4 days of work have passed and I have only discovered a work-around. Still no idea what caused the os/kern issue.

    Work-Around: All that was needed was to use a newer version of phone (iPhone 12) on iOS simulator, (previously on iPhone 11).

    NOTE: All iOS simulators before iPhone 12 have the same os/kern issue.

    Update 2

    Answer:

    I had deleted my Derived Data so much it backed up my memory, so I had to empty the trash. Simulator is now functional.


  2. i had same issue and same error with iPhone 11 simulator and 12 too but not the pro max version.

    My Solution
    delete the simulator from the simulator list the i add it again and its work for iPhone 11 normal version perfectly.

    [1]: https://i.stack.imgur.com/Bkr4z.png`go to simulators`

    [2]: https://i.stack.imgur.com/OkWHG.png`remove the version with issue`

    [3]: https://i.stack.imgur.com/3YRGi.png`clic on the + to add new one`

    [4]: https://i.stack.imgur.com/3RPGv.png`add the version you work with`

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search