question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After upgrading to react-native 0.60.x schemes other than production (default) do not work.

See original GitHub issue

Steps to reproduce the behavior

  1. Upgrade to react-native 0.60.x
  2. Adapt code & configuration of packages to conform with auto-linking, etc.
  3. Run the ios version of the app using a configured scheme

Expected behavior

The app should install and run with the defines scheme

Actual behavior

When using cli (i.e. react-native run-ios --scheme \"TheSampleApp-Development\" --configuration Debug.Development) the command compiles successfully, the app is installed but opens with a blank black screen (after showing the splash screen) on the simulator.

On the other hand when using xcode to build the development scheme, the app again installs and runs, reaches the splash screen and after that we get a white blank screen. In xcode the output is the following:

2019-07-22 21:02:18.412065+0300 TheSampleApp[22447:687268] Attempted to override non-null API key with nil - ignoring.
WARN : BSG_KSCrashSentry.c (109): BSG_KSCrashType bsg_kscrashsentry_installWithContext(BSG_KSCrash_SentryContext *, BSG_KSCrashType, void (*)(char, char *)): KSCrash: App is running in a debugger. Only user reported events will be handled.
2019-07-22 21:02:18.451 [fatal][tid:main] No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
2019-07-22 21:02:18.451125+0300 TheSampleApp[22447:687268] No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
2019-07-22 21:02:18.467287+0300 TheSampleApp[22447:687268] *** Terminating app due to uncaught exception 'RCTFatalException: No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.', reason: 'No bundle URL present.

Make sure you're running a packager server or have included a .jsbundle file in your application bundle.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001072d96fb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x00000001053aaac5 objc_exception_throw + 48
	2   TheSampleApp             0x0000000101f860dc RCTGetFatalHandler + 0
	3   TheSampleApp             0x0000000101f9e39e __28-[RCTCxxBridge handleError:]_block_invoke + 685
	4   libdispatch.dylib                   0x0000000109835d7f _dispatch_call_block_and_release + 12
	5   libdispatch.dylib                   0x0000000109836db5 _dispatch_client_callout + 8
	6   libdispatch.dylib                   0x0000000109844080 _dispatch_main_queue_callback_4CF + 1540
	7   CoreFoundation                      0x00000001072408a9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	8   CoreFoundation                      0x000000010723af56 __CFRunLoopRun + 2310
	9   CoreFoundation                      0x000000010723a302 CFRunLoopRunSpecific + 626
	10  GraphicsServices                    0x000000010d52a2fe GSEventRunModal + 65
	11  UIKitCore                           0x0000000110edaba2 UIApplicationMain + 140
	12  TheSampleApp             0x0000000101e752a0 main + 112
	13  libdyld.dylib                       0x00000001098ab541 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

The bundler is already running separately in both occasions via yarn start as for some reason it stopped running automatically after/during building the app.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:28 (6 by maintainers)

github_iconTop GitHub Comments

71reactions
bericp1commented, Aug 16, 2019

@TylerNRobertson

Per the convo here, if you’re on or upgrade to 0.60.5 and you make the changes in your ios/Podfile described above, this library is likely not necessary anymore (can’t really speak to non-cocoapods dependencies at this point, all of our deps right now have a podspec). So if you upgrade, you should uninstall react-native-schemes-manager which is where that error is coming from.

The update you need to make in ios/Podfile depends on what build configurations you created.

Based off the docs here, you generally need to add something like the following near the top of the file, right after require_relative.

project 'TheNameOfYourProjectWithoutTheXprojExtension',
    'Debug' => :debug,
    'Release' => :release,
    'FooDebug' => :debug,
    'FooRelease' => :release

Where:

  • Debug and Release are the built-in build configurations
  • FooDebug is a build configuration you cloned from Debug
  • FooRelease is a build configuration you cloned from Release

And then you need to run cd ios/Pods && pod install && cd ../ to update your project.

What you’re essentially doing is converting your json build configuration map you had in your package.json for xcodeSchemes into ruby code in your Podfile to tell cocoapods about the build configurations now that RN core uses cocoapods.

22reactions
bericp1commented, Aug 16, 2019

Today react-native 0.60.5 dropped but it doesn’t seem to include that PR for fixing custom release scheme. I had to manually make the changes in that PR to my project.

When I made the change @doomsower recommended, I was able to build and run release builds and debug builds with custom schemes and build configurations without installing this library at all.

The specific change to ios/Podfile I made was just adding that project call right after require_relative at the top level. Then I just ran rm -rf Pods && pod install (EDIT: in the ios/ directory)

project 'MyProject',
    'DevDebug' => :debug,
    'StagingDebug' => :debug,
    'Debug' => :debug,
    'DevRelease' => :release,
    'StagingRelease' => :release,
    'Release' => :release

(where MyProject is the name of your XCode project without the extension).

EDIT: You’ll also need to change the hash/map there. The keys (i.e. DevDebug, etc.) should be the name of the build configurations you clones from Debug/Release and the values are the type of configuration they are. See my comment farther down here.

So as far as the react-native core 0.60+ goes, this library isn’t needed it seems. For third-party deps though that don’t use cocoapods it probably will be? I’m not familiar enough to say for sure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-native version mismatch after upgrading to 0.60.4
Use this : First of all uninstall app from your device; After this clean gradlew; close the Metro bundler and also terminal
Read more >
Building React Native app for multiple environments (updated ...
Click on the Duplicate Scheme button at the bottom of the window to make a copy of your current scheme, name it Beta....
Read more >
React Native Upgrade Helper
React Native 0.60 includes Cocoapods integration by default, AndroidX support, ... When upgrading, you should replace them with your actual project's name.
Read more >
Upgrading to new versions - React Native
Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies. Upgrading requires a ......
Read more >
Upgrading to React Native 0.60 - YouTube
Here are some quick tips if you're a developer upgrading his/her react native project from 0.59 or lower version to 0.60.0Strictly follow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found