Create-react-native-app: `ScrollView` has no propType for native prop `RCTScrollView.contentInsetAdjustmentBehavior` of native type `UIScrollViewContentInsetAdjustmentBehavior`

Created on 27 Sep 2017  路  11Comments  路  Source: expo/create-react-native-app

Description

It run fine on iPhone Simulator in development or production mode;
But it run failed on iPhone only in development mode, production mode run fine;

Expected Behavior

It run fine on iPhone in development or production mode;

Observed Behavior

`ScrollView` has no propType for native prop `RCTScrollView.contentInsetAdjustmentBehavior` of native type `UIScrollViewContentInsetAdjustmentBehavior`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.

verifyPropTypes
    hashAssetFiles:30003:22
requireNativeComponent
    hashAssetFiles:29334:42
<unknown>
    hashAssetFiles:43505:41
loadModuleImplementation
    hashAssetFiles:106:12
<unknown>
    hashAssetFiles:44769:25
loadModuleImplementation
    hashAssetFiles:106:12
<unknown>
    hashAssetFiles:49545:23
loadModuleImplementation
    hashAssetFiles:106:12
<unknown>
    hashAssetFiles:48477:29
loadModuleImplementation
    hashAssetFiles:106:12
<unknown>
    hashAssetFiles:47923:29
loadModuleImplementation
    hashAssetFiles:106:12
guardedLoadModule
    hashAssetFiles:63:45
<unknown>
    hashAssetFiles:47810:36
emit
    hashAssetFiles:8088:40
__callFunction
    hashAssetFiles:6266:47
<unknown>
    hashAssetFiles:6103:29
__guard
    hashAssetFiles:6237:11
callFunctionReturnFlushedQueue
    hashAssetFiles:6102:19

Environment

  • npm ls react-native-scripts: 1.3.1
  • npm ls react-native: 0.47.2
  • npm ls expo: 20.1.3
  • node -v: 8.3.0
  • npm -v: 5.4.1
  • yarn --version: 0.24.6
  • watchman version: 4.7.0
  1. Operating system: Mac OS 10.13
  2. Phone/emulator/simulator & version: iPhone 7 Plus & iOS 11

Most helpful comment

@deot upgrading expo & RN fixes it
for upgrading to exp 21.0

All 11 comments

I suspect you may be loading an old version of React Native. Is this with a brand new project?

@deot upgrading expo & RN fixes it
for upgrading to exp 21.0

Ran into this error as well today, GeekRishabh link helped solve the problem.

However, my tests now appear to be broken. Each suite fails with the error:

 SyntaxError: Unexpected token / in JSON at position 704
        at Object.parse (native)

      at _readAppConfiguration (node_modules/jest-expo/src/createMockConstants.js:48:30)
      at createMockConstants (node_modules/jest-expo/src/createMockConstants.js:12:21)
      at Object.<anonymous> (node_modules/jest-expo/src/setup.js:38:22)
      at handle (node_modules/worker-farm/lib/child/index.js:44:8)

Downgrading to "jest-expo": "20.0.0" solves the issue, but it鈥檚 unusual that changing to v21 (as suggested in the Medium article) would be such a problem. It seems something is missing in the notes on that.

@filipdanic Does your app.json file contain non-JSON (but valid JSON5) code such as comments? If so, some versions of jest-expo wouldn't be able to parse your app.json file (jest-expo reads app.json so that it can mock out Expo.Constants.manifest.extra). The latest version of jest-expo (21.0.2-SNAPSHOT.d993f41d) has JSON5 support and might work for you.

@ide this is exactly the case. Thank you very much :)

@ide @GeekRishabh Thanks!

I'm going to close this since (a) the original issue was resolved (mis-matched JS and native code; be sure your versions all match up and that you have cleared all the caches!) and (b) the jest-expo issue with JSON5 files has been fixed.

Got the same error and solved it by upgrading Expo to 21.
simulator screen shot - iphone x - 2017-10-16 at 21 14 02

I am not using expo. Still getting same error message

Same here

Same problem here with Expo 21.0.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WeslleyNasRocha picture WeslleyNasRocha  路  4Comments

FezVrasta picture FezVrasta  路  3Comments

liujb picture liujb  路  5Comments

liyanxi picture liyanxi  路  3Comments

anp picture anp  路  3Comments