Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on keep copy function #768

Closed
YankovWeb opened this issue Jan 30, 2025 · 1 comment
Closed

error on keep copy function #768

YankovWeb opened this issue Jan 30, 2025 · 1 comment

Comments

@YankovWeb
Copy link

const _pickDocument = async () => {
try {
const result = await pick({
mode: 'import',
allowMultiSelection: false,
});
const file = result[0];

  if (!file.uri) {
    console.log('File URI is undefined or null');
    return;
  }

  const [localCopy] = await keepLocalCopy({
    files: [
      {
        uri: file.uri,
        fileName: file.name ?? 'fallbackName',
      },
    ],
    destination: 'documentDirectory',
  });

error:

DocumentPicker err => TypeError: _$$_REQUIRE(...).NativeDocumentPicker.keepLocalCopy is not a function
at keepLocalCopy (keepLocalCopy.ts:49:41)
at &platform=ios&dev=true&lazy=false&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.baybridgedigital.bayretailv3test:510492:128
at Generator.next ()

package.json
{
"name": "bayretailv3",
"version": "0.0.1",
"private": true,
"scripts": {
"nuke": "watchman watch-del-all && rm -rf node_modules && yarn && yarn start --reset-cache",
"clearAll": "watchman watch-del-all && rm -rf node_modules && rm -rf mobile_sdk && rm -rf Pods && rm -rf Podfile.lock && rm -rf yarn.lock && yarn && yarn sdk && yarn start --reset-cache",
"android": "react-native run-android",
"androidDevice": "react-native run-android --deviceId=R9PTB1KWL3E",
"androidRelease": "react-native run-android --mode=release",
"androidDeviceRelease": "react-native run-android --deviceId=R9PTB1KWL3E --mode=release",
"iosRelease": "react-native run-ios --mode release",
"ipad": "react-native run-ios --simulator='iPad Pro (12.9-inch) (6th generation)'",
"ipadById": "react-native run-ios --udid='E6C7A83C-F9D2-4766-8F7D-76679D218B6E'",
"ipad9": "react-native run-ios --simulator='iPad Pro (9.7-inch)'",
"iphonese": "react-native run-ios --simulator='iPhone SE (2nd generation)'",
"iphone14": "react-native run-ios --simulator='iPhone 14 Pro'",
"iphone13": "react-native run-ios --simulator='iphone13'",
"iphone11": "react-native run-ios --simulator='iPhone 11'",
"iphone15": "react-native run-ios --simulator='iPhone 15 Pro'",
"iphone11ById": "npx react-native run-ios --udid='101599D7-E69C-4FF3-935A-34FC14A3B1B6'",
"iphone12": "react-native run-ios --simulator='iPhone 12'",
"start": "node --max-old-space-size=4096 node_modules/react-native/local-cli/cli.js start",
"ios": "node --max-old-space-size=4096 node_modules/react-native/local-cli/cli.js run-ios",
"start-max": "node --max-old-space-size=8192 node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"test:no-coverage": "jest --no-coverage",
"type": "tsc",
"prepush": "yarn lint && yarn type",
"android:buildApk:release": "cd android && ./gradlew assembleRelease && cd ..",
"android:buildApk:Debug": "cd android && ./gradlew assembleDebug && cd ..",
"android:buildAab:release": "cd android && ./gradlew bundleRelease && cd ..",
"android:buildAab:Debug": "cd android && ./gradlew bundleRelease && cd ..",
"sdk": "yarn install && node installandroid.js && node installios.js",
"devtools": "npx react-devtools",
"fastLaneBuidlIos": "bundle exec fastlane ios beta",
"fastLaneBuidlAndroid": " bundle exec fastlane android deploy",
"reinstallPod": "cd ios && rm -rf Pods && pod install && cd ..",
"podInstall": "cd ios && pod install && cd ..",
"gradlewClean": "cd android && ./gradlew clean && cd ..",
"gradlewClean1": "cd android && ./gradlew assembleDebug -Xlint:deprecation -Xlint:unchecked && cd ..",
"postinstall": "npx jetify",
"gradleVersion6": "cd android && ./gradlew wrapper --gradle-version 6.9.1 && cd ..",
"gradleVersion7": "cd android && ./gradlew wrapper --gradle-version 7.4 && cd ..",
"gradleCaches": "rm -rf ~/.gradle/cache",
"gradleRemove": "cd android && rm -rf .gradle && rm -rf .idea",
"reactNativeInfo": "npx react-native info",
"build:prod:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'",
"podInstall:ios": "cd ios && bundle exec pod install",
"cocopodsVersion": "pod --version",
"rubylist": "rvm list",
"performanceCheck": "px react-devtools",
"rubyDefult": "rvm use ruby-2.7.6",
"cocopodsUpdate": "sudo gem install cocoapods",
"prepare": "patch-package",
"patchCreate": "yarn patch-package react-native-vision-camera",
"patchCreateweb": "yarn patch-package react-native-webview",
"patchReactNative": "yarn patch-package react-native",
"keystore": "keytool -genkey -v -keystore bayretailv3.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000",
"debugKeyStore": "keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000",
"keystoreData": "keytool -v -list -keystore android/app/bayretailv3.keystore",
"openXcode": "open ios/consumer.xcworkspace",
"properLib": "npx @rnx-kit/align-deps --requirements react-native@0.73",
"openData": "vi ~/.zshrc // open",
"geninfo": "gem env",
"podClean": "pod repo remove trunk && rm -rf ~/Library/Caches/CocoaPods && rm -rf Pods && rm -rf ~/Library/Developer/Xcode/DerivedData/* && pod deintegrate && pod setup && pod install",
"xcodClearCache": "rm -rf $HOME/Library/Caches/org.swift.swiftpm/ && rm -rf $HOME/Library/org.swift.swiftpm && rm -rf $HOME/Library/Developer/Xcode/DerivedData ",
"firebaseInstal": "yarn add @react-native-firebase/analytics@19.2.2 @react-native-firebase/app@19.2.2 @react-native-firebase/auth@19.2.2 @react-native-firebase/messaging@19.2.2 ",
"firebaseRemove": "yarn remove @react-native-firebase/app @react-native-firebase/auth @react-native-firebase/crashlytics @react-native-firebase/messaging ",
"openBash": "nano ~/.bash_profile",
"e2e": "npx wdio run wdioConfig/wdio.ios.conf.ts",
"cleanqa": "rm -rf allure-results && rm -rf tests/specs/screenshots",
"allure": "npx allure serve allure-results",
"appiumkill": "pkill -9 -f appium",
"iosBuildWithFastline": "cd ios && fastlane beta && cd ..",
"addFastLineIos": "cd ios && fastlane init ",
"addFastLineAndroid": "cd android && fastlane init ",
"androidDeployBuildWithFastLine": "cd android && fastlane deploy && cd ..",
"androidBuildFastLine": "cd android && fastlane build && cd ..",
"installationsScript": "./install-dependencies.sh"
},
"sdkDependencies": {
"SalesforceMobileSDK-Android": "https://github.com/forcedotcom/SalesforceMobileSDK-Android.git#v12.0.1",
"SalesforceMobileSDK-iOS": "https://github.com/forcedotcom/SalesforceMobileSDK-iOS.git#v12.0.1"
},
"dependencies": {
"@bam.tech/react-native-image-resizer": "^3.0.10",
"@dotlottie/react-player": "^1.6.19",
"@flyerhq/react-native-link-preview": "^1.6.0",
"@meksiabdou/react-native-barcode-mask": "^2.0.0",
"@react-native-async-storage/async-storage": "^1.24.0",
"@react-native-clipboard/clipboard": "^1.14.1",
"@react-native-community/blur": "^4.4.0",
"@react-native-community/datetimepicker": "^8.2.0",
"@react-native-community/hooks": "^3.0.0",
"@react-native-community/push-notification-ios": "^1.11.0",
"@react-native-documents/picker": "^10.0.1",
"@react-native-documents/viewer": "^1.0.0",
"@react-native-firebase/analytics": "19.2.2",
"@react-native-firebase/app": "19.2.2",
"@react-native-firebase/auth": "19.2.2",
"@react-native-firebase/messaging": "19.2.2",
"@react-native-masked-view/masked-view": "^0.3.0",
"@react-native-picker/picker": "^2.7.7",
"@react-navigation/bottom-tabs": "^6.5.2",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^7.2.0",
"@react-navigation/stack": "^6.2.0",
"@redux-devtools/extension": "^3.2.3",
"@reduxjs/toolkit": "^1.9.1",
"@sayem314/react-native-keep-awake": "^1.2.2",
"@testing-library/jest-native": "^5.3.3",
"@testing-library/react-hooks": "^8.0.1",
"@types/lodash": "^4.14.191",
"@types/react-native-push-notification": "^8.1.4",
"@types/react-native-signature-capture": "^0.4.8",
"@types/react-native-simple-radio-button": "^2.7.2",
"@types/react-native-snap-carousel": "^3.8.5",
"@types/redux-logger": "^3.0.9",
"@types/styled-components": "^5.1.26",
"@types/tinycolor2": "^1.4.3",
"@wdio/allure-reporter": "^8.34.0",
"@wdio/cli": "^8.36.1",
"@wdio/types": "^8.39.0",
"awesome-debounce-promise": "^2.1.0",
"awesome-phonenumber": "^5.10.0",
"axios": "^1.2.1",
"babel-plugin-transform-remove-console": "^6.9.4",
"countries-list": "^2.6.1",
"create-react-class": "^15.7.0",
"date-fns": "2.29.3",
"deprecated-react-native-prop-types": "^4.0.0",
"html-entities": "^2.4.0",
"jetifier": "^2.0.0",
"libphonenumber-js": "^1.10.38",
"lodash": "^4.17.21",
"lottie-react-native": "^6.7.2",
"metro-react-native-babel-preset": "0.73.7",
"moment": "^2.29.4",
"moment-timezone": "^0.5.40",
"patch-package": "^6.5.0",
"postinstall-postinstall": "^2.1.0",
"react": "18.2.0",
"react-async-hook": "^4.0.0",
"react-error-boundary": "^3.1.4",
"react-hook-form": "^7.41.2",
"react-native": "0.73.6",
"react-native-actionsheet": "^2.4.2",
"react-native-animatable": "^1.3.3",
"react-native-animated-pagination-dot": "^0.4.0",
"react-native-autocomplete-dropdown": "^2.1.0",
"react-native-background-fetch": "^4.2.5",
"react-native-calendars": "1.1306.0",
"react-native-compressor": "^1.8.22",
"react-native-config": "1.5.3",
"react-native-device-info": "^10.3.0",
"react-native-device-time-format": "^2.4.0",
"react-native-devsettings": "^1.0.5",
"react-native-drag-sort": "^2.4.4",
"react-native-dropdown-picker": "^5.4.6",
"react-native-elements": "^3.4.3",
"react-native-encrypted-storage": "^4.0.3",
"react-native-fast-image": "^8.6.3",
"react-native-fast-shadow": "^0.1.0",
"react-native-flash-message": "^0.3.1",
"react-native-floating-action": "^1.22.0",
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#v12.0.1",
"react-native-fs": "^2.18.0",
"react-native-gesture-handler": "2.14.0",
"react-native-gradle-plugin": "0.71.12",
"react-native-hyperlink": "^0.0.22",
"react-native-image-crop-picker": "^0.40.0",
"react-native-image-picker": "5.0.2",
"react-native-image-slider-box": "^2.0.7",
"react-native-image-zoom-viewer": "^3.0.1",
"react-native-keyboard-accessory": "^0.1.16",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-keyboard-aware-scrollview": "^2.1.0",
"react-native-linear-gradient": "^2.6.2",
"react-native-maps": "1.15.4",
"react-native-mime-types": "^2.4.0",
"react-native-modal-datetime-picker": "^18.0.0",
"react-native-paper": "^5.10.4",
"react-native-pell-rich-editor": "^1.9.0",
"react-native-print": "^0.11.0",
"react-native-push-notification": "^8.1.1",
"react-native-qrcode-svg": "^6.1.2",
"react-native-raw-bottom-sheet": "^2.2.0",
"react-native-reanimated": "3.6.1",
"react-native-render-html": "^6.1.0",
"react-native-restart": "^0.0.27",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.30.1",
"react-native-section-list-get-item-layout": "^2.2.3",
"react-native-sensors": "^7.3.6",
"react-native-share": "^8.2.1",
"react-native-signature-capture": "^0.4.12",
"react-native-simple-radio-button": "^2.7.4",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "^15.6.0",
"react-native-svg-transformer": "^1.5.0",
"react-native-swipeout": "^2.3.6",
"react-native-toggle-element": "^2.0.1",
"react-native-torch": "^1.2.0",
"react-native-vcards": "^2.5.0",
"react-native-vector-icons": "^10.1.0",
"react-native-video": "^6.4.3",
"react-native-view-pdf": "^0.14.0",
"react-native-vision-camera": "4.5.3",
"react-native-walkthrough-tooltip": "^1.4.0",
"react-native-webview": "12.0.2",
"react-redux": "^8.0.5",
"redux": "^4.2.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"rn-fetch-blob": "^0.12.0",
"rn-swipeable-panel": "^1.2.7",
"styled-components": "^5.3.6",
"styled-components-react-native": "^1.0.0",
"tinycolor2": "^1.5.1",
"use-constant": "^1.1.1",
"victory-native": "^36.6.8"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.25.6",
"@react-native-community/eslint-config": "^3.2.0",
"@react-native/babel-preset": "0.73.21",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@testing-library/react-native": "^12.7.2",
"@tsconfig/react-native": "^3.0.5",
"@types/jest": "^29.5.13",
"@types/react": "^18.2.6",
"@types/react-native": "0.70.1",
"@types/react-native-actionsheet": "^2.4.7",
"@types/react-native-calendar-picker": "^7.0.3",
"@types/react-native-video": "^5.0.20",
"@types/react-test-renderer": "^18.0.0",
"@types/styled-components-react-native": "^5.2.5",
"@wdio/appium-service": "^8.39.1",
"@wdio/local-runner": "^8.35.1",
"@wdio/mocha-framework": "^8.35.0",
"@wdio/spec-reporter": "^8.32.4",
"allure-commandline": "^2.30.0",
"appium-xcuitest-driver": "^7.24.18",
"babel-jest": "^29.6.3",
"babel-loader": "8.2.2",
"babel-plugin-module-resolver": "4.1.0",
"eslint": "^8.19.0",
"jest": "^29.7.0",
"prettier": "2.8.8",
"react-test-renderer": "18.2.0",
"rimraf": "5.0.5",
"ts-jest": "^29.2.5",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
},
"resolutions": {
"react-native": "0.73.6"
}
}

Copy link
Contributor

👋 @YankovWeb, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue.
The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug.
Please create a new issue with this and we'll be happy to review it!

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants