React-native: [iOS] 0.56.0 React Native version mismatch. regeneratorRuntime is not defined

Created on 9 Aug 2018  路  18Comments  路  Source: facebook/react-native

Environment

Run react-native info in your terminal and paste its contents here.

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
      Memory: 130.34 MB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.1.0 - /usr/local/bin/node
      Yarn: 1.6.0 - /usr/local/bin/yarn
      npm: 6.0.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.3
        API Levels: 22, 23, 24, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.2 => 16.4.2
      react-native: 0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-calendario: 0.0.2
      react-native-cli: 2.0.1
      react-native-create-bridge: 1.2.2
      react-native-create-library: 3.1.2
      react-native-git-upgrade: 0.2.7

Description

React Native version mismatch.

JavaScript version: 0.56.0
Native version: 0.55.3

Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with watchman watch-del-all && react-native start --reset-cache.
regeneratorRuntime is not defined

simulator screen shot - iphone 5s - 2018-08-09 at 17 41 42

It only happens in iOS on Debug mode. It works fine on Release mode or Android.

Reproducible Demo

https://github.com/maggialejandro/react-native-calendario/tree/fix-react-native-0.56.0

iOS Locked

Most helpful comment

Reset cache wasn't worked for me.
For me, deleting whole build file and restart worked.

rm -rf ios/build
react-native run-ios

All 18 comments

This is not an issue of React Native but an wrong installation inside your project.
Already tried watchman watch-del-all && react-native start --reset-cache? Or removing your node_modules and install them again?

@vdlindenmark yes, I've done that already

That error is saying that your app was built & installed with RN 0.55.3 and you're trying to run it with a javascript bundle that has RN 0.56. You need to rebuild & reinstall the app using react-native run-ios / run-android

Yes I've done that.
Here you can reproduce the issue
It happens on iOS only (debug build)

Have you fully uninstalled the app on the simulator/device? It's possible that the build may be failing and instead launching a previous version of the app.

Yes I have, any ideas?
Thanks in advance

i have the same issue. This only happens when I run react-native run-ios, but if i run project direct with XCode, it works fine. And it only happens in iOS. Does anyone have other ideas why it that so?

@alberttra , I am seeing the exact same behavior you described. Did you ever find a solution to this?

It has happened to me. In VSCode when I have opened one project (have ran the packager for that project), then open another one with different RN version and try to run that one, it breaks with that error. Usually just closing VSCode and opening it with only one project works fine. Don't think stopping the packager from the first window worked but with recent updates it might work now.

i've tried changing the build.gradle settings and that does not work for me.
implementation("com.facebook.react:react-native:0.57.1") {force = true}

I suspect that the Device is still caching the app data even though the app on the phone has been deleted. any solution or thoughts?

Idk why but React Library on iOS remained at version 55.3
https://github.com/facebook/react-native/blob/v0.57.3/React/Base/RCTVersion.m#L23-L25
I had to update iOS React libraries manually

@maggialejandro How would I do that correctly? Remove the React.xcodeproj from Libraries in Xcode and add it again?

@qasimalbaqali Yes, that worked for me

Reset cache wasn't worked for me.
For me, deleting whole build file and restart worked.

rm -rf ios/build
react-native run-ios

@JWWon Thanks for your help. I knew something was missing from all the cache clearing I kept doing.

maybe you have another jsbundle server锛宲lease close the server, then npm start && reload js

I have the same issue. Which only occurs on the Debug scheme. More info here.

I've tried the following:

  • Removing node modules;
  • Removing Pods and reinstalling;
  • watchman watch-del-all && react-native start --reset-cache;
  • Checked through my project for any 0.59.10 versions (nothing found);
  • Made sure all my terminal windows were closed;
  • Used react-native-clean-project;
  • Uninstalled app in Simulator.
2019-10-10 13:45:17.872 [error][tid:com.facebook.react.JavaScript] React Native version mismatch.

JavaScript version: 0.59.1
Native version: 0.61.2-undefined

Can someone shine some light on this?

Update

After creating a new bundle.js with "build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=true --platform='ios'", it worked.

The 'fix' above only fixed a part of the issue. I noticed that after manually creating the iOS bundle, React Native did not create a new bundle on load/refresh. That was my first clue which reminded me in some changes I made in AppDelegate.m:

#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif

After changing back the else statement to what I had before return [CodePush bundleURL]; it fixed the issue. I'm not sure what caused me to change it in the first place, I think it was the Codepush documentation.

+1

Was this page helpful?
0 / 5 - 0 ratings