I'm using the google sample 'android-Camera2Video':
https://github.com/googlesamples/android-Camera2Video
The problem is that when the app is finishing the recording, sometimes it stucks for a moment, and then calls the onError() handler of the CameraDevice.StateCallback with 1 - 'ERROR_CAMERA_IN_USE' error code.
It does not happen every single time, it happens in about 90% of cases, and sometimes everything works fine with no errors. I couldn't find out on what it depends and how to resolve this issue. If anyone have met this problem before, please help.
Related
I had a react app that was working fine before my computer was force shut. I am using npm start to serve my app in a local server. When I reopen my computer and start my server the first page( the "/" url) works fine, but when I push a new url to the history( props.history.push("/pages")), the browser freezes and it give me this error . This was in chromium and I even tried it with other browsers like firefox but the browser just freezes. Assuming the problem might be with my computer I have also tried other devices on the network and the same problem keeps happening. I have even cleared the npm cache by npm cache clean --force. But nothing solves the problem and it is frustruting to debug since nothing is printed on the dev tools and no error message is throwen by react. If some one has come accross such a problem would like to hear a suggestion.
This had happened to me a couple of times. This seems to keep happening in chrome browser when you have an array and you are pushing too many items to it (it is like
stackoverflow:)
). You may want to edit your question so that more people can benefit from these, it isn't actually a react problem. It is a limitation in browsers I guess. They should at least warn you about what the error is. so for anyone who wants to regenerate this problem use the following code in the chromium console or run any js script on your chromium browser.
let arr = [];
let arrcounter = 13;
for (let x = 1; x <= arrcounter; x) {
arr.push(x);
}
This is an infinite loop as x isn't being incremented, which means an infinite amount of 1's are pushed to the array which causes the above error. This atleast was in my case. There might be other reasons for this problem to be caused, but check for such a mistakes in your code because neither your browser (which is a bammer) nor your editor notify you about such mistake. If this solves your mistake let me know.
As to how to debug your code.
You can start by commenting out all your code except the necessary react requirements then uncommenting each part in a controlled way to see which part of your code is causing the problem.
I'm building a React Native app. Everything was working fine but now when I try to run on Android it gets to the task :app:transformClassesWithDexForDebug, it hangs for 30-60 seconds and then Windows shuts down.
I tried to setup multidex as mentioned here: https://stackoverflow.com/a/56875424 but the result is the same.
I'm not getting any error message, the computer just shuts down abruptly and I have to turn it on again.
Any advice is much appreciated.
In the end, it was two problems mixed:
I was using the new Windows Terminal which is still in beta so I guess the shutdown problem was something to do with it, because I changed to normal good ol' cmd and the shutdown problem disappeared.
The actual error in the compilation process was actually the setup of multidex. I was not extending the MultiDexApplication class.
Thank you all.
I'm developing a PWA (VueJS/Quasar) and, from time to time, face the following error when re-opening the app (saved on the home screen) after a while.
Black screen with: A problem repeatedly occurred on "https://..."
I have found some hints (memory/performance, css issues) and related questions (e.g. iOS safari crashing (a problem repeatedly occured)) but I have not fully understood how to trace down that problem.
Does anyone have a clear idea on how to tackle it? As said, it only happens once in a while.
While preventing the error in the first place is a priority, is there anything I can do to e.g. reload the app once this error occurs or is this fully out of my control as the app has crashed anyway?
I have a web application that makes calls to axapta, if I test the web with only one user, then evething goes perfectly. But, if I test the web with two or three users at the same time, and make calls with all the users to the same ax method (I have not tested diferent methods), then ax randomly crashes and even return diferents exceptions, BusinessConnectionException it's the most usual, but event so, the Message of the exception varies from error to error.
How can I detect the errors?
How can I get more info of what is wrong?
How can I solve this problem?
EDIT:
This event crashes IIS somtimes...
EDIT:
see coments for solution explanation until I can answer my own.. "silly" question.
It was my fault all along... I have created the axapta client as a Singleton (static), and all the clients (I did not think about that) shared the same connection with ax. When I changed the static for a non static, then all worked, a little bit slower, but worked.
Community, I have the following problem. I am running an action every certain stretch of time, for example, 1 minute. The function, if the device is locked continues to run normally but there comes a time (about 5 minutes) fails, no error or any type of log to run, to keep track of the function check my log server as I check my webservice and receives more requests. I am occupying the interval function and as I said, it works well about 5 minutes and then with nothing to stop running calls.
setInterval(function(){update()}, 10000);
If anyone knows how to solve or a better way to simulate a cron on a device agradeceria.
Thanks!
Most likely the js runtime was unloaded from the device browser for your page (since the user is not looking at it and the device wants to save on battery), that is why it stops working, I don't think it is possible to overcome this completely
you could somewhat fake it by saving last run time in localStorage and running your code with windows.onfocus to determine what changes need to be made (did not test if it actually works tho I see no reason for it not to work)