I have a project using React but the component WebCam that works perfectly in all browsers locally; but when tested in a server, doesn't show the permits pop-up to allow the use of the camera.
I don't think the code is the problem. Instead some security on the browsers. I tried to give permissions directly to the site on Chrome and I can't change it. And is not blocked, on either browser.
Some other considerations:
I haven't install any ssl certificate, is just a small testing server to play, so I wasn't thinking to install them for the moment.
could this be the problem?
The getUserMedia API requires you to serve the page over HTTPS (or on localhost). So if you haven’t set that up, that is why it’s not working in production.
See the Security section of this documentation for more details: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#security
Related
I use osm in my AngularJS app and in Google Chrome browser I get the following messages
So I do not have access (any more) to the tiles. Three days ago it worked fine. If I open the application in Firefox everything is fine and works.
Is this an adjustment in Google Chrome or how I can find out what I have to do in order to get it work with Google Chrome anymore.
Not sure if this will help, but from PINTOSTACK, in
https://help.openstreetmap.org/questions/83887/unable-to-download-tiles-403-forbidden
"Maybe this will help someone else, for those using leaflet, we fixed it by changing http to https on the tileLayer png. Seems to work on localhost in Chrome & Edge."
I made the change and this worked for me.
You are not adhering to the tile usage policy. That's why your access denied message links to that policy.
OSM became stricter in enforcing the policy recently.
Could be related to another provider that slashed It's free tier by 99% recently and therefore users flocking to OSM.
As the tile usage policy stats: "OpenStreetMap data is free for everyone to use. Our tile servers are not."
(see: https://operations.osmfoundation.org/policies/tiles/ )
So please follow that policy closely if you use OSM for light use. For use in a business context or an app you shouldn't use those tile servers by the OSMF anyway (see the usage policy that asks you not to hardcode the tile.openstreetmap.org URL into an app).
Alternatives can be found here: https://wiki.openstreetmap.org/wiki/Tile_servers
If your angular application is producing only light use and not used for business contexts, check your dev tools in Chrome about the User-Agent and referrer your angular app is sending.
In my PWA everything is working except POST HTTP calls. I have a login on my first screen. It says Network Error. But it works fine Desktop/Laptop web browser. Only found the problem on mobile app [Android]
Note
I used Vue CLI for creating project.
I also tried with React. Happened the same. I don't know what's wrong with me.
You most likely try to connect to localhost. When deploying to a different device localhost is the actual device you are deploying and most likely you are not running a web server there.
You need to find your local machine's ip and use that as base url for HTTP calls.
Chrome desktop application for web based product. Is this possible in chrome web apps
Product has following items
Angular JS --- Front-end framework
Rails --- JSon Communication
I have created the chrome desktop apps, which will directly open the site with icon. It's more feel like desktop application. In any OS it will run. The thing is working fine.
Problem:
It will always download the js and css files.
How i want to develop the chrome desktop apps
When launching the chrome desktop app, save all the assets locally.
Whenever chrome desktop app launched, it should refer the locally saved assets (I mean angular js files and css)
Before launching the chrome desktop app, it should request the server whether the assets are changed or not. If changed delete the locally saved files and save the latest one.
If assets are not changed use the old assets files. In this way, we can avoid the initial loading of all the files from the server.
Anybody did it previously or chrome provide any options for this?
Ideas are welcome!
Its totaly possible.
Read these docs: https://developer.chrome.com/apps/offline_apps
By myself i pack the css and javascript into the chrome app so you never have to download them on startup. But in your context its more like a webview app with caching functions.
You can use indexeddb or other local storage APIs to store assets in the client computer.
You can solve this on the web app side by employing ApplicationCache, which specifically fits what you describe.
Using the cache interface gives your application three advantages:
Offline browsing - users can navigate your full site when they're offline
Speed - resources come straight from disk, no trip to the network.
Resilience - if your site goes down for "maintenance" (as in, someone accidentally breaks everything), your users will get the offline experience
The Application Cache (or AppCache) allows a developer to specify which files the browser should cache and make available to offline users. Your app will load and work correctly, even if the user presses the refresh button while they're offline.
While it is primarily an offline-fallback technique, it allows you to cache resources locally just for speedup purposes. Actually having an offline fallback is a bonus in this case.
Actually building a Chrome app for this will probably not help - you cannot update local resources from your web app side, you'll need to update your app through WebStore channels only.
I am experiencing a strange issue with AngularJS on a local (windows) environment. I use two bootstrap frameworks build with angular (homer and neuboard). When I run the template (both!) in its AngularJS version locally on windows Chrome freezes completely and causes a huge cpu activity. Firefox on the other hand works fine.
When I upload the same files (distributed template, now compilation neccessary) on my server both chrome and firefox are working fine!
Has anybody experienced something like that or a clue whats causing this?
I have one: Both use angulars ui-router. Maybe Chrome has in this case a problem with resolving/routing the URL, if it starts with file:///C:/...?
Kind regards,
Nico
I would try to check the dev tools in the browser. Check for errors and also the Network tab (https://developers.google.com/web/tools/chrome-devtools/)
You can precisely tell which operation took too long.
I sometimes had issues with cross-referencing on a local machine which is only an issue on some browsers (normally a useful security measure). There is a plugin to turn this off, if that is the error.
This issue is caused by chromes web security itself. By default chrome doesn't allow HTTP-Request from cross origins from other protocols than http, https, data, chrome and so on - but not from file:///
According to this question: Allow Google Chrome to use XMLHttpRequest to load a URL from a local file
I started chrome without Web Security and everything workes fine!
We've got an Angular app that uses Auth0 for SSO login. We primarily use Macs and develop and test locally using the localhost web server. Browsing the site locally using browsers on Mac works fine. We can authenticate and the subsequent redirect does the right thing. The problem is browsing with IE. We can connect to the localhost web server on OS X using the IP address. We had to edit the Windows hosts file to map the Mac's IP address to localhost due to our app using full URLs/URIs as primary keys, so that the keys match.
When I browse the site using IE11 on Parallels, login using Auth0, it looks to authenticate just fine, but afterwards, we get an error when it tries to redirect:
XMLHttpRequest for https://mindjet.auth0.com/tokeninfo? required Cross Origin Resource Sharing (CORS).
Auth0 does have a field for specifying allowed CORS origins, and I tried every conceivable URL that our app exposes, even just *. But nothing worked. In our Angular app, I've tried setting $httpProvider.defaults.useXDomain = true; That didn't work either. I'm new to the CORS concept, so any insights would be greatly appreciated. We just want to find a way to test with IE without having to deploy to a dev server.
Our main issue that we couldn't test with IE11 seems to have been resolved by updating our auth0-angular and auth0-widget libraries to the latest version. I still occasionally see warnings about CORS issues in the console, but we are able to login and get redirected to the correct part of our app.