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.

Warning: Invalid argument supplied to oneOf, expected an instance of array.

See original GitHub issue

just copied the example swiper provided by the repo and it throws an Warning: Invalid argument supplied to oneOf, expected an instance of array. but the swiper works fine

my package.json

{
  "name": "taxitul",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "android": "react-native run-android",
    "ios": "react-native run-ios --simulator='iPhone 6s Plus'",
    "test": "jest",
    "tsc": "tsc"
  },
  "dependencies": {
    "axios": "0.18.0",
    "formik": "1.3.2",
    "human-readable-ids": "1.0.4",
    "moment": "2.22.2",
    "native-base": "2.8.1",
    "react": "16.6.1",
    "react-native": "0.57.5",
    "react-native-animatable": "1.3.0",
    "react-native-audio-toolkit": "^1.0.6",
    "react-native-deck-swiper": "^1.5.26",
    "react-native-device-info": "0.24.3",
    "react-native-dropdownalert": "3.7.1",
    "react-native-exit-app": "1.0.0",
    "react-native-firebase": "5.1.1",
    "react-native-geocoding": "0.3.0",
    "react-native-loading-spinner-overlay": "1.0.1",
    "react-native-maps": "0.22.1",
    "react-native-mauron85-background-geolocation": "0.5.0-alpha.47",
    "react-native-permissions": "1.1.1",
    "react-native-side-menu": "^1.1.3",
    "react-router-native": "4.3.0",
    "unstated": "2.1.1",
    "validator": "10.9.0"
  },
  "devDependencies": {
    "@types/jest": "23.3.9",
    "@types/node": "10.12.9",
    "@types/react": "16.7.6",
    "@types/react-native": "0.57.11",
    "@types/react-native-permissions": "1.1.1",
    "@types/react-router-native": "4.2.3",
    "@types/react-test-renderer": "16.0.3",
    "@types/validator": "9.4.3",
    "babel-jest": "23.6.0",
    "jest": "23.6.0",
    "metro-react-native-babel-preset": "0.49.2",
    "react-test-renderer": "16.6.1",
    "ts-jest": "23.10.4",
    "typescript": "3.1.6"
  },
  "jest": {
    "preset": "react-native",
    "transform": {
      "^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js",
      ".+\\.tsx?$": "ts-jest"
    },
    "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js"
    ],
    "modulePaths": [
      "<rootDir>"
    ]
  }
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
webraptorcommented, Jan 9, 2019

@igorbrandao That’s why I recommended going back with some of the commits, as some may have introduced issues.

I don’t recall experiencing the forceUpdate issue on our latest version, prior to our PR on the 28th of November, 2018.

@JorgeMoralesLopez try with “luminos-software/react-native-deck-swiper#36807af7b85e05c316a95809541d689df12777f2” which is when we bumped the version to 1.6.2 . I don’t know at this point what other changes have been made since then as we were off for the holidays.

1reaction
igorbrandaocommented, Jan 9, 2019

@webraptor latest master (1.6.2) still has the can't call forceUpdate warning.

@JorgeMoralesLopez the latest version that has no warnings is 1.5.25, and 1.5.22 also works fine as well. If you are still encountering these warnings it is because of your local setup.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid argument supplied to oneOfType, expected an ... - GitHub
Warning : Invalid argument supplied to oneOfType, expected an instance of array. #287 ... I pass everywhere an array. I repeat, this warning ......
Read more >
How to resolve React Warning: Invalid argument supplied to ...
How to resolve React Warning: Invalid argument supplied to oneOfType. Expected an array of check functions, but received undefined at index 2.?
Read more >
prop-types @ 15.6.1 .. 15.7.2 - Package Diff
'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;. - return emptyFunction.thatReturnsNull;.
Read more >
How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >
react-formik-ui - UNPKG
n * ---\n * Similar to invariant but only logs a warning if the condition is ... {\n printWarning('Invalid argument supplied to oneOf,...
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