Comments (9)
Are you serving the pages over HTTPS? The sensor APIs are only available over secure connections.
from generic-sensor-demos.
Yes! The command: polymer serve build/bundled --hostname 0.0.0.0 --protocol https/1.1 serves the application over https. It looks like the Chrome flag #allow-insecure-localhost yields a better view of the pages when it is enabled. Thanks again!
from generic-sensor-demos.
One more point is that the port to be accessed is 8081 and not 8000, as suggested by the response to the command. And the browser flag about allowing insecure localhost does not really matter.
from generic-sensor-demos.
Right, do you mean everything's working now or is there anything left to solve?
from generic-sensor-demos.
Sorry again, it stopped working once more: the web page takes forever (same as before when it was served over http) and is shown right away only when the raspberry is turned off or when the demo is accessed remotely from my PC (which is USB-connected to the Android phone). The log console then complains about "Subject Alternative Name missing" and then reports "ERR_CERT_AUTHORITY_INVALID", while saying that "the connection is secure" and "the resources are served securely". Thanks in advance.
from generic-sensor-demos.
@kenchris does this ring any bells based on how Polymer serves pages via https?
from generic-sensor-demos.
I re-installed everything and it works now, although a bit slow. Before closing this thread, can you tell me whether the Security Certificates, key.pem and cert.pem, are generated simply by the command "polymer serve --protocol https/1.1" and whether they are referred to by any of the js files in the sensor-info folder (I'm trying to modify the demo in order to record and display sensor data over time)? Thanks again for your help.
from generic-sensor-demos.
can you tell me whether the Security Certificates, key.pem and cert.pem, are generated simply by the command "polymer serve --protocol https/1.1"
I don't think they are, as they're supposed to be actual certificates for your web server (I recently had to generate some self-signed ones via openssl
to serve those files to another machine for testing too).
and whether they are referred to by any of the js files in the sensor-info folder (I'm trying to modify the demo in order to record and display sensor data over time)?
They are not. The code doesn't assume anything about the environment it runs in as far as I can see (as they're supposed to work without polymer-cli
too).
from generic-sensor-demos.
Sorry it took so long to respond to this one! I guess we can close it now.
from generic-sensor-demos.
Related Issues (20)
- ambient-map demo: missing API key
- npm package?
- Sensor.start() is not a function HOT 4
- How can I use it in Angular 6? HOT 11
- Review distributed Generic Sensor polyfill HOT 1
- Use new mwc- elements HOT 4
- Move to LitElement to simplify the code HOT 4
- Remove the @apply for flex box and just use flex box directly
- Some files are missing HOT 3
- Migrate all demos to at least Polymer 3.0 HOT 7
- Use proper drawer icon color HOT 1
- Orientation lock is not reset during navigation between pages HOT 5
- sensor-tester: Don't display test contents if sensor is not supported by the device/browser HOT 1
- sensor-tester: orientation locking does not always work HOT 3
- Ambient Map: The background style doesn't change HOT 2
- Track the points raised by @kenchris in #80 HOT 1
- How to Set Flags in Android'WebView with Java or Kotlin?? HOT 1
- browsers support HOT 3
- Auto-publish after new commits
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generic-sensor-demos.