apprtc - getusermedia() failed - python

i downloaded apprtc from here. Then i installed python 2.7, the google-appengine-api and all dependencies. i add all to my path and run the following command:
dev_appserver.py apprtc
which produce the following output:
INFO 2014-04-24 21:31:34,246 sdk_update_checker.py:242] Checking for updates
to the SDK.
INFO 2014-04-24 21:31:35,681 sdk_update_checker.py:286] This SDK release is
newer than the advertised release.
INFO 2014-04-24 21:31:35,917 api_server.py:171] Starting API server at: http
://localhost:46857
INFO 2014-04-24 21:31:35,924 dispatcher.py:182] Starting module "default" ru
nning at: http://localhost:8080
INFO 2014-04-24 21:31:35,927 admin_server.py:117] Starting admin server at:
http://localhost:8000
but if i now open localhost:8080 in chrome or firefox there popup the following message:
getusermedia() failed. is this a webrtc capable browser
Gathered ICE Candidates
Local:
Remote:
getUserMedia failed with exception: getUserMedia is not defined
but if i open the official apprtc demo it's running fine.
what can be the reason for the failures i get local?
thank you!

try this to getuser media
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;

Related

Extension host terminated unexpectedly - Visual Studio Code

One day I worken on my python project but then (idk why) I get this error... I fully reinstalled vs code & python (absolutely full, trust me), this error still continued appearing. Then I checked my extensions and that problem was Jupyther! This error always appears when I'm starting VS Code, but when I switch it off I can't run any file (but I still can use console commands like pip). I don't know why Jupyther is not working on my netbook, if someone knows the answer - you are welcome, I need your help so much!
VS Code version: 1.64.2
Python version: 3.10.2
OS: Windows 10 Pro - x64
In dev tools logging:
log.ts:307 WARN Settings pattern "keyboard.*" doesn't match any settings
log.ts:301 INFO IExtensionHostStarter.start() took 442 ms.
log.ts:313 ERR [Extension Host] (node:10404) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
console.ts:137 [Extension Host] (node:10404) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use `Code --trace-deprecation ...` to show where the warning was created)
I # console.ts:137
log.ts:307 WARN Settings pattern "keyboard.*" doesn't match any settings
console.ts:137 [Extension Host] Git installation not found.
I # console.ts:137
2log.ts:307 WARN Settings pattern "keyboard.*" doesn't match any settings
log.ts:301 INFO Setting search error: XHR failed
bingsettingssearch.trafficmanager.net/api/Search:1 Failed to load resource: net::ERR_CERT_DATE_INVALID
log.ts:301 INFO Setting search error: XHR failed
bingsettingssearch.trafficmanager.net/api/Search:1 Failed to load resource: net::ERR_CERT_DATE_INVALID
log.ts:307 WARN Settings pattern "keyboard.*" doesn't match any settings
log.ts:301 INFO Setting search error: XHR failed
bingsettingssearch.trafficmanager.net/api/Search:1 Failed to load resource: net::ERR_CERT_DATE_INVALID
log.ts:301 INFO Setting search error: XHR failed
bingsettingssearch.trafficmanager.net/api/Search:1 Failed to load resource: net::ERR_CERT_DATE_INVALID
log.ts:301 INFO Setting search error: XHR failed
bingsettingssearch.trafficmanager.net/api/Search:1 Failed to load resource: net::ERR_CERT_DATE_INVALID
log.ts:301 INFO Setting search error: XHR failed
bingsettingssearch.trafficmanager.net/api/Search:1 Failed to load resource: net::ERR_CERT_DATE_INVALID
localProcessExtensionHost.ts:325 Extension Host
localProcessExtensionHost.ts:326 Assertion failed: error not defined [0] (C:\Users\travis\build\zeromq\zeromq.js\build\libzmq\zeromq-4.3.2\src\err.cpp:383)
abstractExtensionService.ts:645 Extension host (LocalProcess) terminated unexpectedly. Code: 1073741845, Signal: null
_onExtensionHostCrashed # abstractExtensionService.ts:645
log.ts:313 ERR Extension host (LocalProcess) terminated unexpectedly. The following extensions were running: vscode.microsoft-authentication, vscode.debug-auto-launch, vscode.git-base, vscode.git, vscode.github, vscode.emmet, vscode.merge-conflict, ms-vscode-remote.remote-wsl-recommender, vscode.github-authentication, ms-python.python, ms-toolsai.jupyter
notificationsAlerts.ts:42 Extension host terminated unexpectedly.

Python error in serverless framework stating - Serverless Error: spawn docker ENOENT

Error:
Running "serverless" from node_modules
Deploying serverless-flask to stage dev (us-east-1)
✖ Stack serverless-flask-dev failed to deploy (0s)
Environment: darwin, node 16.0.0, framework 3.1.1 (local) 3.1.1v (global), plugin 6.0.0, SDK 4.3.1
Credentials: Local, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Error: spawn docker ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I'm following these instructions (https://www.serverless.com/blog/flask-python-rest-api-serverless-lambda-dynamodb/) and can't seem to figure this out since the base app is in python and not javascript... most people who have solved this solved it using javascript.
To solve this issue you need to update your serverless.yml file with these changes in the custom block
custom:
pythonRequirements:
pythonBin: python3
dockerizePip: "false"
I also face the same issue my issue was with dockerizePip it was set to
dockerizePip: non-linux
either remove this entry from serverless.yml file or just set it to false
To be able to deploy your project with serverless-python-requirements you need to have docker on your machine (if you are on windows consider using docker desktop or a linux vm)
Why do I need Docker ?
When you do a sls deploy, serverless-python-requirements launch a docker container to install all the dependencies you've put in your requirements.txt file that will be used during the deployement process
You are getting this error because your container is not launch correctly

What is the correct method to spark-submit python applications on aws emr?

I'm connected to the master node of a Spark cluster, running inside of emr, and am trying to submit a python based application:
spark-submit --verbose --deploy-mode cluster --master yarn-cluster --num-executors 3 --executor-cores 6 --executor-memory 1g test.py
The process produces a set of logs dump, including the following confirmation of deployment to the cluster:
6/08/29 20:47:51 INFO Client: Uploading resource file:/home/hadoop/test.py -> hdfs://ip-xxx-xxx-xxx-xxx.ec2.internal:8020/user/hadoop/.sparkStaging/application_1472396426409_0007/test.py
16/08/29 20:47:51 INFO Client: Uploading resource file:/usr/lib/spark/python/lib/pyspark.zip -> hdfs://ip-xxx-xxx-xxx-xxx.ec2.internal:8020/user/hadoop/.sparkStaging/application_1472396426409_0007/pyspark.zip
16/08/29 20:47:51 INFO Client: Uploading resource file:/usr/lib/spark/python/lib/py4j-0.10.1-src.zip -> hdfs://ip-xxx-xxx-xxx-xxx.ec2.internal:8020/user/hadoop/.sparkStaging/application_1472396426409_0007/py4j-0.10.1-src.zip
Yet, the application fails to run, reporting a missing py4j library? :
6/08/29 20:48:47 INFO Client: Application report for application_1472396426409_0007 (state: ACCEPTED)
16/08/29 20:48:48 INFO Client: Application report for application_1472396426409_0007 (state: FAILED)
16/08/29 20:48:48 INFO Client:
client token: N/A
diagnostics: Application application_1472396426409_0007 failed 2 times due to AM Container for appattempt_1472396426409_0007_000002 exited with exitCode: -1000
For more detailed output, check application tracking page:http://ip-xxx-xxx-xxx-xxx.ec2.internal:8088/cluster/app/application_1472396426409_0007Then, click on links to logs of each attempt.
Diagnostics: File does not exist: hdfs://ip-xxx-xxx-xxx-xxx.ec2.internal:8020/user/hadoop/.sparkStaging/application_1472396426409_0007/py4j-0.10.1-src.zip
java.io.FileNotFoundException: File does not exist: hdfs://ip-xxx-xxx-xxx-xxx.ec2.internal:8020/user/hadoop/.sparkStaging/application_1472396426409_0007/py4j-0.10.1-src.zip
at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1309)
at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1301)
Am I misusing the command or something?
This appears to be a bug with the aws system. Yarn monitors the system and notices that the deployed code is no longer there - which is really a sign that spark is done processing.
To verify that this is the problem, double check by reading the logs for your application - ie, run something like this against your master node:
yarn logs -applicationId application_1472396426409_0007
and double check that you see a success message in the logs:
INFO ApplicationMaster: Unregistering ApplicationMaster with SUCCEEDED

How can I debug Openstack Dashboard?

I'm running the Openstack Cloud System. I installed and deployed the kilo version on the server successful, but this is only the default version of Openstack. So that, I want to have some modifies on this openstack source and add more features to it.
I started to change something with the Openstack Dashboard. However, there are some problems happened. Therefore, I have debugged this django web application. All everything I have configured is the same as the official tutorials on the openstack website (http://docs.openstack.org).
So, I have search on my server and find out 2 places that have the sources:
The first one is /usr/share/openstack-dashboard/
The second one is /usr/lib/python2.7/dist-packages/horizon/
And the config file is /etc/openstack-dashboard/local_settings.py
I set the option Debug = True in local_settings.py file.
On the server I typed these commands:
cd /usr/share/openstack-dashboard/
python manage.py runserver
Here is the output:
RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
WARNING:py.warnings:RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
WARNING:py.warnings:RemovedInDjango18Warning: XViewMiddleware has been moved to django.contrib.admindocs.middleware.
Performing system checks...
System check identified no issues (0 silenced).
August 05, 2015 - 09:28:50
Django version 1.7.6, using settings 'openstack_dashboard.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
But in the browser, it shows the error:
And then, on the console, it shows:
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[05/Aug/2015 10:21:29] "GET / HTTP/1.1" 302 0
Not Found: /horizon/auth/login/
[05/Aug/2015 10:21:29] "GET /horizon/auth/login/?next=/ HTTP/1.1" 404 4237
Not Found: /favicon.ico
[05/Aug/2015 10:21:29] "GET /favicon.ico HTTP/1.1" 404 4206
Please help me to get out of this problems. And how can to debug Openstack Django Website properly.Thank you very much !
As you run server by runserver command you should go to the root url like
127.0.0.1:8000/
not
127.0.0.1:8000/horizon
The difference is in running method.
When you installed openstack_dashboard there is apache config that listen to address http://host/horizon look in to /etc/apache2/conf/sites-available/
The directories
/usr/lib/python2.7/dist-packages/horizon/
Is like the framework for all dashboards
/usr/share/openstack-dashboard/
Is the default dashboard for openstack
/etc/openstack-dashboard/local_settings.py
The config file for dashboard. Here you can apply changes for default dash, for example attach your project that modifies or extends default dash
So, your problem will be solved if you follow that link http://127.0.0.1:8000/
For debugging use
pdb or ide with integrated debugger
Follow this link.
http://docs.openstack.org/developer/horizon/quickstart.html
Once this is done, add pdb statements to your code that you wish to debug.Go into the horizon folder and run the following command
./run_tests.sh --runserver 127.0.0.1:port_number
Instead of local host you can put in the IP address where horizon is running
I have written the OpenStack documentation for debugging dashboards using PyCharm.
(It is good for any Openstack Dashboard including Horizon)
http://docs.openstack.org/developer/mistral/developer/troubleshooting.html

Google App Engine Devserver + dispatch.yaml (gcloud)

I am trying to start my app using the new cloud SDK preview (gcloud preview app run DIRNAME) and the response is:
INFO: Starting API server at: http://localhost:51695
INFO: Starting module "api" running at: http://localhost:8080
INFO: Starting module "default" running at: http://localhost:8081
INFO: Starting admin server at: http://localhost:8000
The dispatcher is not running and I can't get a dispatcher service URL as described
here.
The dispatcher is fully function on production, but I just can't get it started via dev server.
How can i make Google Cloud SDK recognize dispatch.yaml?
The dispatch.yaml looks like this:
application: my-super-secret-app-id
dispatch:
- url: "*/"
module: default
- url: "*/_*"
module: api
The goal is to server all "regular" requests from the default module, and request begins with underscore to the "api" module.
Removing Google Cloud SDK completely and re-installing it's latest version solved the problem.

Categories