wkh237 / react-native-fetch-blob-dev Goto Github PK
View Code? Open in Web Editor NEWDevelopment repo of react-native-fetch-blob
License: MIT License
Development repo of react-native-fetch-blob
License: MIT License
Hi everyone! after update phone to android 11 apps stop generating a CSV file on external storage using pathToWrite =
${RNFetchBlob.fs.dirs.SDCardDir}/Control.csv;
. Before the update its working fine. Now I'm getting message "open failed: EPERM (Operation not permitted)".
Please help me to solve this issue. Thanks!
system and libraries information...
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
Memory: 3.33 GB / 15.94 GB
Binaries:
Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.12.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 4.6.1 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 18, 23, 24, 25, 26, 27, 28, 29, 30, 31
Build Tools: 23.0.1, 25.0.1, 26.0.1, 27.0.3, 28.0.3, 29.0.0, 29.0.2, 30.0.2
System Images: android-24 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7486908
Visual Studio: 16.7.30621.155 (Visual Studio Community 2019)
Languages:
Java: 1.8.0_111
Python: 3.5.0
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
EDITED:
Since my problems have changed throughout the experiments - to have a starting point I tried to install everything as-is and run it but that leads to many errors.
BUILD error description removed, using my own code and updating the image picker as described in the next comment got rid of that.
When I try to run node server
I get
fs.js:652
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EPERM: operation not permitted, open 'D:\Documents\Projects\react-native-fetch-blob-dev\src\.git'
at Object.fs.openSync (fs.js:652:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at D:\Documents\Projects\react-native-fetch-blob-dev\test-server\server.js:300:12
at D:\Documents\Projects\react-native-fetch-blob-dev\node_modules\mkdirp\index.js:48:26
at FSReqWrap.oncomplete (fs.js:153:5)
This is an impossible error, I'm doing everything as the same user and I have full permissions for that file:
$ ls -l /d/Documents/Projects/react-native-fetch-blob-dev/src/.git
-rw-r--r-- 1 mha 197609 28 Aug 14 12:57 /d/Documents/Projects/react-native-fetch-blob-dev/src/.git
mha@mha-MAINPC MINGW64 /D/Documents/Projects/react-native-fetch-blob-dev/test-server (master)
$ cat /d/Documents/Projects/react-native-fetch-blob-dev/src/.git
gitdir: ../.git/modules/src
When I put a console.log(111111, targetPath, path)
in front of the error-causing line I get
'..\\src\\.git' '..\\src\\.git'
But all calls are of this pattern (not that I understand why the code copies files onto themselves?) but only that one causes that message. For example, the first one with the two variable values '..\\test\\.flowconfig' '..\\test\\.flowconfig'
worked just fine...
EDIT: When I use my own repo this same problem appears at a different point:
file changed ..\src\.git\hooks\update.sample
fs.js:652
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EPERM: operation not permitted, open 'D:\Documents\Projects\react-native-fetch-blob-dev\src\.git\objects\pack\pack-5a17f2a83dd647dbf3bacaa904c799a4ec54f500.idx'
I have no idea what to do. I'm running out of ideas, options and time. I don't think there should be much wrong with my patch(es) over at https://github.com/lll000111/react-native-fetch-blob/tree/0.10.9, but I just can't run those tests.
By the way, what is missing from the instructions is how to use my own folk of the repo. I can just manually clone it to ./src/
, but I don't want to learn how to manipulate the git submodule stuff you already setup. I guess I can just ignore it apart from the initial install, I think don't need git any more for this test-dev repo?
When I open the (thus far unchanged) ./src/android/
code in Android studio I already get numerous errors: https://gist.github.com/lll000111/423b858d707daf5eba5212ca5e1f6baa
Shouldn't the project be error-free when I use that IDE?
If not, what do I have to do to make it error-free? Shouldn't I be able to build it in Android Studio?
If not, what IDE and environment are you using for development?
I just checked if the tests are even relevant to my changes - since I concentrated on filesystem access, I don't care about the download code.
Looking inside test/test-init.js
I see that the only test that is "on" is an include for require('./test-0.10.7')
.
Do I simply enable the other ones? Are the tests version-specific (see above require and all the other per-version tests)? What does that mean for the current tests?
I don't think those tests actually all work as they should, independent of any of my changes.
Many of the tests fail, but those are tests for things that my edits didn't touch. I concentrated on a few filesystem related things only.
Here's a hilarious example, test-stream.js
only is enabled:
The test is actually still running (-13,000% and counting now), the server still shows "write data " messages.
test-0.10.7
and test-background.js
don't work either. The "fs" tests are at 100% - the only ones that I care about.
"compaer"
I guess that should be "comparer"
I ran them all on my current code (https://github.com/lll000111/react-native-fetch-blob/tree/0.10.9) and this is the result. I don't think any of those errors are related to anything I did.
9 of 10 pass
5 of 7 pass
2 x Error: Download manager could not resolve downloaded file path.`
Line 75 says
res.set('Contet-Length', 1024000*10)
I guess that is misspelled?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.