Closed chzappsinc closed 1 year ago
{ pages:
[ { imagePath: 'file:///storage/emulated/0/Android/data/com.xxx.app/files/Pictures/DOCUMENT_SCAN_0_20230905_1141025239986292805769924.jpg',
imageFit: 'fill',
width: 594,
height: 843,
backgroundColor: '#fff' } ],
outputPath: 'file:///data/user/0/com.xxx.app/files/ecadb3e7-c1b5-46ce-8aff-b5bdc5a6993d.pdf' }
{ pages:
[ { imagePath: '/storage/emulated/0/Android/data/com.xxx.app/files/Pictures/DOCUMENT_SCAN_0_20230905_1142425484847059482707656.jpg',
imageFit: 'fill',
width: 594,
height: 843,
backgroundColor: '#fff' } ],
outputPath: 'file:///data/user/0/com.xxx.app/files/327d5f73-7566-4237-b6d3-6b20370da9c6.pdf' }
Even options changed, still error
@chzappsinc I was not able to reproduce this error: https://github.com/Canciller/rn-document-scanner-images-to-pdf-example/blob/01b870e960c215edcf317824784472556afded1d/App.tsx#L9
@chzappsinc I was not able to reproduce this error: https://github.com/Canciller/rn-document-scanner-images-to-pdf-example/blob/01b870e960c215edcf317824784472556afded1d/App.tsx#L9
Same code we are getting this error Android (31)
Please create a small repository demonstrating the issue. This will help me in fixing the problem.
@Canciller Its working fine on new repo buts its failing on my project,
these are packages i am using
"dependencies": {
"@backpackapp-io/react-native-toast": "^0.9.0",
"@gorhom/bottom-sheet": "^4",
"@react-native-async-storage/async-storage": "^1.19.3",
"@react-native-community/blur": "^4.3.2",
"@react-native-community/geolocation": "^3.0.6",
"@react-native-masked-view/masked-view": "^0.2.9",
"@react-navigation/devtools": "^6.0.19",
"@react-navigation/native": "^6.1.7",
"@react-navigation/stack": "^6.3.17",
"@reduxjs/toolkit": "^1.9.5",
"axios": "^1.5.0",
"country-state-city": "^3.2.0",
"crypto-js": "3.1.9-1",
"lodash": "^4.17.21",
"lottie-react-native": "^6.2.0",
"moment": "^2.29.4",
"react": "18.2.0",
"react-native": "0.72.4",
"react-native-animatable": "^1.3.3",
"react-native-asset": "^2.1.1",
"react-native-blob-util": "^0.19.1",
"react-native-bouncy-checkbox": "^3.0.7",
"react-native-config": "^1.5.1",
"react-native-device-info": "^10.9.0",
"react-native-document-picker": "^9.0.1",
"react-native-document-scanner-plugin": "^0.9.0",
"react-native-error-boundary": "^1.2.3",
"react-native-flipper": "^0.212.0",
"react-native-gesture-handler": "^2.12.1",
"react-native-hash": "^3.0.3",
"react-native-images-to-pdf": "^0.2.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-linear-gradient": "^2.8.2",
"react-native-localization": "^2.3.2",
"react-native-maps": "^1.7.1",
"react-native-pdf": "^6.7.1",
"react-native-permissions": "^3.8.4",
"react-native-phone-number-input": "^2.1.0",
"react-native-progress": "^5.0.0",
"react-native-radio-buttons-group": "^3.0.3",
"react-native-razorpay": "^2.3.0",
"react-native-reanimated": "^3.4.2",
"react-native-rename": "^3.2.13",
"react-native-restart": "^0.0.27",
"react-native-safe-area-context": "^4.7.1",
"react-native-screens": "^3.24.0",
"react-native-signature-canvas": "^4.6.1",
"react-native-skeleton-placeholder": "^5.2.4",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "^13.13.0",
"react-native-vector-icons": "^10.0.0",
"react-native-webview": "^13.5.1",
"react-redux": "^8.1.2",
"redux": "^4.2.1",
"redux-flipper": "^2.0.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.4.2",
"symbol-observable": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.11",
"@tsconfig/react-native": "^3.0.0",
"@types/lodash": "^4.14.197",
"@types/react": "^18.0.24",
"@types/react-native-snap-carousel": "^3.8.5",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"babel-plugin-module-resolver": "^5.0.0",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.8",
"module-resolver": "^1.0.0",
"prettier": "^2.4.1",
"react-devtools": "^4.28.0",
"react-test-renderer": "18.2.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"tslint-eslint-rules": "^5.4.0",
"tslint-react": "^5.0.0",
"typescript": "4.8.4"
},
@Canciller Please check with this repo https://github.com/chzappsinc/image-to-pdf-bug-checking-with-def-config
Using reanimated-babel-plugin
@chzappsinc can you try with latest version 0.2.1
@Canciller #17 version working fine
Closing bug
Summary
Failed to create PDF: Error: Attempt to invoke virtual method 'java.lang.String java.lang.String.replaceFirst(java.lang.String, java.lang.String)' on a null object reference
RN Info
Reproducible sample code
library version: latest
iOS / Android version: 0.72.4