I get ENOMEM error when I run a raspistill or a raspivid: - camera

I get the following error when I run either raspistill or raspivid:
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detetected. Please check carefully the camera module is installed correctly
I have reinstalled the camera strap several times. The led light also is on on the camera.

Below solved it for me
sudo raspi-config
-> 5 Interfacing Options
-> Camera
-> Yes
-> Reboot

Related

How to receive tile data from ClusterBuster vector tile server in the sample example?

Summary
Seems the guys did a great work with the built-in filtering, clustering and caching on the ClusterBuster vector tile server.
I'm really excited about this project that looks very promising and i'm eager to try it!
I'm working on a project on plotting Deck.gl layers (MVTLayer) on top of Google Maps from a vector tile server through their integration.
I want to try to integrate and to serve from ClusterBuster server some clustered points saved in PostGIS.
Expected result:
I want to receive tile data from ClusterBuster vector tile server like in their provided sample example.
Actual result:
Provided sample example not working (points not showing on map, neither on Mapbox, nor on Google Maps with Deck.gl).
My attempts
I tried building and running the example provided but somehow, i'm not able to do this.
I ran the provided express server clusterbuster/example/express.ts and for frontend tried with the provided mapbox example from clusterbuster/example/mapbox.html (with my mapbox token) but nothing appears on mapbox map (nor on Google maps with my Deck.gl example).
As stated in the clusterbuster/example/readme.md i created an .env file with PostGIS connections settings.
After running the following commands:
yarn
yarn start
i get this output:
C:\zFVStuff\Google Maps - Deck.gl\_Servers\ClusterBuster\clusterbuster-master> yarn start
yarn run v1.22.4
$ yarn build && ts-node example/express.ts
$ rollup --config rollup.config.js
./lib/index.ts → dist/index.d.ts...
created dist/index.d.ts in 5.7s
./lib/index.ts → dist/index.js...
created dist/index.js in 5.1s
attempting to create supporting SQL functions
failure in creating First SQL function
failure in creating TileBBox SQL function
failure in creating TileDoubleBBox SQL function
Example app listening on port 3005!
send3663284b-0e58-4587-af82-b35604a99303: 4.964ms
3663284b-0e58-4587-af82-b35604a99303: 817.819ms
sendd0bdd671-1f47-4b40-84ba-2fed6adfd045: 3.451ms
d0bdd671-1f47-4b40-84ba-2fed6adfd045: 1276.588ms
sendcd36f672-4c4b-4a95-b772-7584e6eb8c55: 1.349ms
cd36f672-4c4b-4a95-b772-7584e6eb8c55: 1754.146ms
The requests seems to be ok, returning status 200 but tile data from ClusterBuster server is undefined nothing appears on the map (neither your Mapbox, or my Google Maps).
Also, it's curious that all tile responses seems to have the same size 216 B.
The data was imported ok in the PostGIS database.
Result is undefined after debugging the express.ts server file with VSCode Javascript Debug Terminal and starting it with the command ts-node .\example\express.ts.
In the Chrome network tab, in none of the sub-tabs Preview or Response i can't see any data.
I also tried logging the result tile in the express server in the success function,
server({
...//excluded for visibility
}).then(result => {
...//excluded for visibility
console.log(result)
res.status(200).send(result);
})
and below is the output, i get undefined:
Any help or advice is really appreciate! Thank you in advance!
After enabling debug in the TileServer configuration (with debug: true), i noticed 2 errors:
SELECT ST_AsMVT(tile, 'points', 4096, 'geom') AS mvt FROM tile
{
e: error: password authentication failed for user "userXYZ"
...
SELECT ST_AsMVT(tile, 'points', 4096, 'geom') AS mvt FROM tile
{
e: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:205:27) {
...
Initially I ran from the root of clusterbuster with ts-node .\example\express.ts or with yarn start (that underneath uses the same and it tries to connect with my user instead of .env config file)
After running ts-node express.ts from the example folder it took into account the .env config file with postgres user instead of my user. Now the tile data from the server is returned ok and the example works at expected.
Many thanks to the contributor cosmin-petrescu that helped me.
Entire thread can be seen here on github.

Gstreamer Playbin fails to play video on Virtual Machine

I have hard time getting the playbin element working on a VM. When I run the pipeline:
gst-launch-1.0 playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
I get the following error:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'source': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'playsink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Redistribute latency...
ERROR: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement:glcolorconvertelement0: Failed to convert video buffer
Additional debug info:
gstglcolorconvertelement.c(218): gst_gl_color_convert_element_prepare_output_buffer (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement:glcolorconvertelement0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Does anyone know why the element glcolorconvertelement0 fails to convert the video buffer?
I'm currently working on a VM with xubuntu (18.04.1), with the last gstreamer pakage installed (1.14.1).
Additional info: I've got the same error also when I try to play a local .mp4 file. Outside of the VM it all works just fine.
Thanks to you all
I managed to figure it out. It's as simple as changing the (virtual) video card on the VM Screen settings.
VM Screen Settings

expo error installing or running app

when I try to run my app on the iOS simulator I get the error :
Error running xcrun simctl openurl booted exp://localhost:19000: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=60):
The operation couldn’t be completed. Operation timed out
Operation timed out
Error installing or running app. Error: Process exited with non-zero code: 60
any idea how to solve this error ?
This usually is an error with the Simulator. If you remove expo (delete the app) from the simulator and run the command again, it should build fine.
However, if it still fails, Erasing all content and settings on the simulator does the trick too.
FOUNT IT!
you must have a .watchmanconfig file (like below)
File example
When you initialize a project with expo init "projectname", there is no .watchmanconfig file.
So, create one and in this file, just initialize an empty object like this : {}
Then you can start with expo start or yarn/npm start
It solved all my problem.
Hope it does for you too.
For anyone like me also searching this issue, it is possible to un-eject your app and run again like normal. From the docs, Delete the ios and android directories from your project. Delete the isDetached and detach keys from your project's app.json. You can now use your project like a normal Expo project (with no ExpoKit). Read more at https://docs.expo.io/versions/latest/expokit/advanced-expokit-topics/
It may be an issue with some outdated simulators in your simulator cache. On MacOS remove the sub-directories in the following directory:
~/Library/Developer/CoreSimulator/Caches/
check if you have .watchmanconfig file present in root, if not create one .watchmanconfig and initialize empty object and run command npm start again

No (USB3) camera device on ubuntu

After installing the necessary driver, mvBlueFox3 camera is well detected according to demsg (ubutnu 16.04). However, when I launch factory GUI, I get the error message telling "No Device"...
The provided log scripts have generated these error messages:
<logmsg ts="423100378" td="56" procId="6175" df="3" msg="enumerate: Call to 'LibraryAdapter::instance()-#plibusb_open_( ppDeviceList_[i], #hDevice )' failed. Error: -3(LIBUSB_ERROR_ACCESS).
" />
<logmsg ts="423100381" td="3" procId="6175" df="3" msg="enumerate: Call to 'LibraryAdapter::instance()-#plibusb_open_( ppDeviceList_[i], #hDevice )' failed. Error: -3(LIBUSB_ERROR_ACCESS).
" />
Has anyone an idea on the source of the problem....?
Am stuck on this issue since a couple of days already..
this is permissions error. if you launch the factory GUI with root privileges sudo it will work
( http://www.askubuntu.com/questions/325416/why-do-i-get-libusb-error-access-when-trying-toget-my-xbox-controller-working )
you can write a udev rule if you do not want to launch the program as root, see https://unix.stackexchange.com/questions/72437/how-to-grant-non-root-user-access-to-device-files

Does react-native support react-click-outside?

I am porting a react-js project to react-native. I would like to reuse the react-click-outside library. But I consider the following problem when adding it to my dependencies and using handleClickOutside() method. The error message is:
The development server returned response error code: 500
URL:
http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false
Body: {"message":"Unable to resolve module react-dom from
/Users/xxx/ReactNativeProjects/react_native_prototype/node_modules/react-click-outside/dist/index.js:
Module does not exist in the module map or in these directories:\n
/Users/xxx/ReactNativeProjects/react_native_prototype/node_modules\n\nThis
might be related to
https://github.com/facebook/react-native/issues/4968\nTo resolve try
the following:\n
Clear watchman watches: watchman watch-del-all.\n
Delete the node_modules folder: rm -rf node_modules && npm install.\n
Reset packager cache: rm -fr $TMPDIR/react-* or npm start -- --reset-cache
I went through all the steps but still I get the same error message when I run the app in Android and/or iOS simulator.
Then I looked into the /Users/xxx/ReactNativeProjects/react_native_prototype/node_modules/react-click-outside/dist/index.jsfile and saw that the library imports something from react-dom. But I think react-native doesn't use any DOM? Is that right? So react-click-outside only seems to be compatible with react-js but not with react-native. Am I right? Or did anyone maybe find a simple solution to simulate handleClickOutside()behaviour?
My code looks like this:
import React from 'react';
(...)
import clickOutside from 'react-click-outside';
const newClass = class TrafficNodeFinder extends React.Component {
(...)
handleClickOutside() {
this.setState({
listOfNodes: ds.cloneWithRows([])
});
}
(...)
}
export default clickOutside(newClass);
The error I get now looks like this:
Can't find variable: document
WrappedTrafficNodeFinder_componentDidMount
index.js:17
ReactCompositeComponent.js:353
measureLifeCyclePerf
ReactCompositeComponent.js:85
ReactCompositeComponent.js:352
notifyAll
CallbackQueue.js:73
close
ReactNativeReconcileTransaction.js:36
closeAll
Transaction.js:222
perform
Transaction.js:163
batchedMountComponentIntoNode
ReactNativeMount.js:77
perform
Transaction.js:149
batchedUpdates
ReactDefaultBatchingStrategy.js:65
batchedUpdates
ReactUpdates.js:111
renderComponent
ReactNativeMount.js:141
render
ReactNative.js:31
renderApplication
renderApplication.js:33
run
AppRegistry.js:76
runApplication
AppRegistry.js:105
__callFunction
MessageQueue.js:236
MessageQueue.js:108
guard
MessageQueue.js:46
callFunctionReturnFlushedQueue
MessageQueue.js:107
I just tried to simulate the behaviour of react-click-outside. I wanted to already surrounded the component which shall react on a click outside of it with View-Elements. But it seems that Views and other react-native UI components don't have any click handler. When I surround my View with a TouchableHighlight it is only clickable if I put a padding. Otherwise all children components "consume" the click events of there parents. Maybe I can somehow tell the children in my view hierarchy to pass the click events to there parents?
No, react-click-outside relies on document.addEventListener, but there is no document in React Native, as there is no underlying DOM.