Error: sdcard/hello.mp3: open failed: EACCES (Permission denied) - javascript

I am testing the "react-native-audio-recorder-player": "^3.5.3" on Android 11 & 12 with the targetSDKversion 31 but it's showing me the error Error: sdcard/sound.mp3: open failed: EACCES (Permission denied)
I have tried many solutions as suggested by many developers like adding requestLegacyExternalStorage permission in AndroidManifest file and also giving permission of MANAGE_EXTERNAL_STORAGE but still the error is same.
After decreasing the targetSDKversion to 29. App is working fine on Android 12 but since we can't upload it on Play Store, it's not useful and also some features becomes slow and lagged.
What should I do to make this feature work on Android 12 and above without decreasing the TargetSDKversion?
Can anybody help?

I resolved this issue by changing this path with android: ${RNFS.CachesDirectoryPath}/hello.mp3, it worked for me.

Related

"connect ETIMEDOUT" error when I tried to debug the react-native app

I have something to tell you.
When I tried to debug the react-native app,
I get an error of "connect ETIMEDOUT 10.0.2.16:8083".
If the Android API level is 30 or less, you can debug without problems,
An error occurs if the Android API level is 31 or higher.
I haven't made any special network settings.
What is the cause?
react-native: 0.60.6
debug tool: VSCode

'expo start' or 'npm start' command stuck at ''Starting metro bundler"

I am using react native expo for building mobile app. I followed below steps:-
expo init myapp
cd myapp
expo start
After running above 3 commands everything was working fine few days ago. But from today it gets stuck on "Starting Metro bundler".
It should proceed further to "Building javascript bundle". But It is stuck with "Starting Metro bundler".
Try to restart your PC. It works for me. I think it happens to me everytime I install new packages while the Metro Bundler is running.
This happened to me because I reset my network settings on my phone earlier today which wiped out my all Wi-Fi connections. So my root cause was simple- my phone just wasn't on the same network as my PC anymore.
If you know you're on the right network, there are more details and potential solutions here: https://github.com/expo/expo-cli/issues/2934 and I think it's important to note that bundling won't start until you click the link from the QR code.
Most likely, it is a network access issue.
I had similar problem several times. To me the previous answers are legit and an even simpler measure also worked for me: just tap phone screen to disconnect wifi of my phone and after a few seconds tap again to reconnect wifi, this solved the problem for me.
More info: the error message on my phone was
Uncaught Error: java.net.ConnectException: Failed to connect to /192.168.1.69:19000
My pc and phone are connected via wifi to the same router. Pc runs windows and phone runs Android.
what I did was restart my computer,
then I shared a network (hotspot) from my computer and connected again the android and iPad, and it worked.
also, connecting your computer to the same router with your devices is also the same,
always remember to log in with expo login command

Sequelize connection error

I'm trying to transfer my application to a new machine. It works on the old machine perfectly, and I have been trying to copy the settings as closely as possible, but there is something missing. This is the error I'm getting:
Unhandled rejection SequelizeConnectionError: Handshake inactivity timeout
at Handshake._callback (/Applications/MAMP/htdocs/dashboard-server/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:63:20)
at Handshake.Sequence.end (/Applications/MAMP/htdocs/dashboard-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at /Applications/MAMP/htdocs/dashboard-server/node_modules/mysql/lib/protocol/Protocol.js:393:18
at Array.forEach (native)
at /Applications/MAMP/htdocs/dashboard-server/node_modules/mysql/lib/protocol/Protocol.js:392:13
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13)
Thoughts?
Just confirmed the problem is either Sequelize / mysql in conjunction with Node 4.2.0 after manually re-installing 4.1.1 my problems went away.
Downgrade to Node 4.1.x or wait for a patch/fix/etc to solve your issues.
Additional Information
The bug has been reported here on the node-mysql repository issue tracker. Seems someone regressed something in Node 4.2.0 and it wasn't caught. Here's the pull request to fix it which was merged in and is in the candidate for 4.2.1.
Update Oct 13th, 2015
Node 4.2.1 was just released (Changelog) containing the aforementioned fix. Upgrading to 4.2.1 should also fix your problems.

Three.js + Chrome 43: Error creating WebGL context

I get an "Error creating WebGL context" error when running this script in chrome 43 under Ubuntu Linux. It worked perfectly fine in chrome 42 ad in the stable release of Firefox. Here's the stack trace:
Error creating WebGL context.THREE.WebGLRenderer # three.min.js:517(anonymous function) # pen.js:24(anonymous function) # pen.js:120
Note that I get this error in Chrome release 43 on the example script, but also on all the examples on threejs.org. The scripts prodcing this error use threejs r70 and r71
EDIT: I just noticed that this bug is specific to the chromium package on ubuntu linux, chrome works fine.
How do I fix this?
I get the same thing for Chromium 43.0.2357.81 Ubuntu 14.04 (64-bit), but Chrome 43 is fine. It seems to be a bug, here is an issue in Chromium bug tracker about it. Chromium developer says:
We have no control over which Chromium revision Ubuntu decides to pull into their distribution. It's entirely possible they pulled a broken revision. Sorry, but this is an issue you'll have to take up with Canonical.
Here and here are possible issues for Ubuntu Chromium distribution, but it seems to be not fixed yet.
I think for now the solution will be to downgrade to a working version and wait for a fix.

StatsD start error

I'm having some troubles with statsD from etsy, and seeing that i'm not really experienced with javascript I thought I should ask a question maybe somebody has encountered this error before, because sadly this time google hasn't been that helpful.
The troubles have started a couple of days ago when I decided to restart the node process that was keeping statsD up, when after the restart it just wouldn't start. It gives me the following output:
2 Jul 03:02:08 - reading config file: /opt/statsd/statsd/psrkConfig.js
2 Jul 03:02:08 - server is up
2 Jul 03:02:08 - Loading backend: ./backends/graphite
events.js:72
throw er; // Unhandled 'error' event
^
Error: bind Unknown system errno 92
at errnoException (dgram.js:440:11)
at dgram.js:207:28
at dns.js:72:18
at process._tickCallback (node.js:415:13)
First of all I think I should have described a little my environment. I'm using gentoo as an OS, I have net-libs/nodejs-0.10.10 installed on the system(was actually 0.10.8 but I upgraded in my search for the problem resolution) and I have cloned the latest etsy/statsD repo from git. I have also tried with the npm version of statsD but got the same behaviour.
I tried following the program with strace and got to the error, but I have no idea how to procede forward. The syscall that fails from what I'm guessing is the following one:
setsockopt(11, SOL_SOCKET, 0xf /* SO_??? */, [1], 4) = -1 ENOPROTOOPT (Protocol not available) <0.000009>
but it has to be called from somewhere inside statsD (making it easier to debug), and I could not find it.
I would appreciate any kind of little help or pointers, because I'm guessing the error comes form the node.js libraries and I'm pretty clueless about them. Thank you.
similar to #user1135, had trouble with binding to UDP sockets on a recent build of debian/testing. we commented out the #ifdef sections in udp.c and recompiled to fix the problem.
I had a similar problem recently, also on Gentoo Linux. It so happened I had the 3.9 linux headers installed but was still running an older kernel. This caused SO_REUSEPORT to be defined when building node.js (specifically uv). Going back to the proper header version or doing #undef SO_REUSEPORT inside of deps/uv/src/unix/udp.c should fix it. Also upgrading to a 3.9+ kernel would do it.

Categories

Resources