Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Hand not in view" and inline script error- chrome ex. #44

Open
jesskeating opened this issue Mar 14, 2013 · 10 comments
Open

"Hand not in view" and inline script error- chrome ex. #44

jesskeating opened this issue Mar 14, 2013 · 10 comments

Comments

@jesskeating
Copy link

Hi,

I am having a problem getting the hand to show up in the basic demo file. Everything is connected and working but the hand status says "no hand in view", but when I open NITE I can see the motion just fine. When I inspect background.html I get this error:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".

I know that you can't have inline script but I don't know what/how to fix it.

thanks!

@royshil
Copy link
Collaborator

royshil commented Apr 14, 2013

That error (Content Security Policy) should not change the operation of the plugin.
But the recent version of DJS was updated to meet the new chrome extension standards, you can try it out.

@victoruni
Copy link

I have the same problem as the jesskeating

DJS (download today)
"Everything is connected and working but the hand status says "no hand in view", but when I open NITE I can see the motion just fine. When I inspect background.html I get this error:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".
Windows - Chrome 26.0.1410.64 m
Linux - Chrome 25.0.13.64.160 Ubuntu 12/04

This is - an unsolved problem.

@royshil
Copy link
Collaborator

royshil commented Apr 16, 2013

i'm still figuring out the "Content Security Policy" problem, it also appears on my install.
But - it doesn't stop DJS from working, so that's not the problem.

Please inspect the background.html page and paste the errors here
If anything is wrong it will appear in there

@victoruni
Copy link

windows or linux - same error
background.html
Console:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".
background.html:1
background.html Starting DepthJS root.js:20
Initing background.html message handling message_routing.js:1
DepthJS Loading Chrome shit chrome.js:2
Starting DepthJS... init_plugin.js:4
Initing DepthJS background root.js:39
DepthJS: Initing Chrome background chrome.js:5
DepthJS: Initing port listener chrome.js:10
Connecting to Backend root.js:43
Uncaught TypeError: Object # has no method 'InitDepthJS' backend.js:142
event port connected chrome.js:14
Assertion failed: chrome.js:13
thumbnails port connected chrome.js:14
event port disconnected on tab 4 chrome.js:26
thumbnails port disconnected on tab 4 chrome.js:26
for all ports on this tab chrome.js:33
event port connected chrome.js:14
Assertion failed: chrome.js:13
thumbnails port connected chrome.js:14

@royshil
Copy link
Collaborator

royshil commented Apr 16, 2013

what do you see in chrome://plugins ?
you should be able to see

DepthJSPlugin - Version: depthjsplugin 1.0.0.0
The native plugin part of the DepthJS project
Name: DepthJSPlugin
Description: The native plugin part of the DepthJS project
Version: depthjsplugin 1.0.0.0
Location: /.../DepthJSPlugin.plugin
Type: NPAPI
Disable
MIME types:
MIME type Description File extensions
application/x-depthjsplugin The native plugin part of the DepthJS project

if there's no such entry, the plugin wasn't loaded successfully

@ilessiivi
Copy link

I seem to have the same problem as the original poster. My Chrome is version 25.0.1364.36, running on OS X 10.8.3. There isn't an entry for DepthJSPlugin in my chrome://plugins. Any ideas what could cause the unsuccesful loading?

@royshil
Copy link
Collaborator

royshil commented Apr 16, 2013

if you built in on your machine then the problem is probably dynamic linking.
please show the output of "otool -L chrome-extension/plugin/DepthJSPlugin.plugin/Contents/MacOS/DepthJSPlugin" (when you're in the main project directory)
if you see some relative paths like
../../Bin/x86-Release/libOpenNI.dylib (compatibility version 0.0.0, current version 0.0.0)
../../../Bin/Release/libXnVCNITE_1_4_1.dylib (compatibility version 0.0.0, current version 0.0.0)
../../Bin/Release/libXnVFeatures_1_4_1.dylib (compatibility version 0.0.0, current version 0.0.0)
../../Bin/Release/libXnVHandGenerator_1_4_1.dylib (compatibility version 0.0.0, current version 0.0.0)
../../../Bin/Release/libXnVNITE.jni.dylib (compatibility version 0.0.0, current version 0.0.0)
../../Bin/Release/libXnVNite_1_4_1.dylib (compatibility version 0.0.0, current version 0.0.0)
then these libraries are probably not loading dynamically.
one solution is to set the DYLD_FALLBACK_LIBRARY_PATH environment variable to the location where OpenNI/Sensor/NiTE installed their libs.
the default in the openni installer is /usr/lib, so you'd do:
export DYLD_FALLBACK_LIBRARY_PATH=/usr/lib
then try to run chrome from command line

@steverhoades
Copy link

Any resolution to this issue? I am having the same issue with a build today.
OS: 10.6.8
Chrome Version 30.0.1599.66

I show that the Kinect is connected but hand is not in view. I copied the DepthJSPlugin.plugin to /Library/Internet Plugins however after restarting browser I do not see it listed in chrome://plugins.

Here is output of background.html:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".
jquery-1.4.4.min.js:39
background.html Starting DepthJS root.js:20
Initing background.html message handling message_routing.js:1
DepthJS Loading Chrome shit chrome.js:2
Starting DepthJS... init_plugin.js:4
Initing DepthJS background root.js:39
DepthJS: Initing Chrome background chrome.js:5
DepthJS: Initing port listener chrome.js:10
Connecting to Backend root.js:43
Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'InitDepthJS'
DepthJS.npBackend.connect backend.js:142
DepthJS.init root.js:44
(anonymous function)

@steverhoades
Copy link

Just wanted to post a follow up to my post yesterday. It appears you cannot compile the firebreath-plugin with X86_64, you must use i386.

Here is what I used:
sudo ../../firebreath-dev/prepmac.sh . build/ -D VERBOSE=1 -D CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk/ -D CMAKE_OSX_DEPLOYMENT_TARGET=10.6 -D CMAKE_OSX_ARCHITECTURES=i386

Also, i had to make sure and compile libusb and openni with universal support (using homebrew).
brew tap totakke/openni
brew uninstall libusb
brew uninstall openni
brew install libusb --univesral
brew install openni --universal

After that run prepmac.sh with the command above and compile, place the new plugin in the chrome-extension/plugin directory replacing the old one.

This enabled the plugin to start:
background.html Starting DepthJS root.js:20
Initing background.html message handling message_routing.js:1
DepthJS Loading Chrome shit chrome.js:2
depthjsplugin::onPluginReady jquery-1.4.4.min.js:40
OpenNIBackend: init() jquery-1.4.4.min.js:40
OpenNIBackend: getResourcesDirectory jquery-1.4.4.min.js:40
XML in: /Users/rhoadess/Downloads/firebreath/depthjs/chrome-extension/plugin/DepthJSPlugin.plugin/Contents/Resources jquery-1.4.4.min.js:40
InitFromXmlFileOne or more of the following nodes could not be enumerated:

jquery-1.4.4.min.js:40
Starting DepthJS... init_plugin.js:4
Initing DepthJS background root.js:39
DepthJS: Initing Chrome background chrome.js:5
DepthJS: Initing port listener chrome.js:10
Connecting to Backend root.js:43
depthjspluginAPI: start DepthJS backend.js:142
depthjsplugin::RunDepthJS backend.js:142
depthjsplugin::RunDepthJS - thread running? backend.js:142
Successfully acquired Kinect event monitor from plugin! backend.js:145
Init complete root.js:48
OpenNIBackend: start openni backend thread

Problem now is that it still doesn't work!!! I'm not getting any hand tracking... still says "Hand Not In View".

@bgkittrell
Copy link

This seems to still be an issue. Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants